 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
42 void setGravity(
const Real gravityMagnitude );
45 void setCenter(
const Vec3& center );
48 Real getGravity( )
const;
59 virtual Vec3 calculateGravity(
const Vec3& position )
const override;
63 virtual Task* createRigidBodyTask()
override;
66 virtual Task* createParticleSystemTask()
override;
82 Vec3 pos = m_center->get() - position;
85 return pos * m_gravity->
get();
90 return m_gravity->
get();
95 return m_center->get();
The class PointGravityField calculates a gravity which is uniform in magnitude over the entire space ...
virtual Vec3 calculateGravity(const Vec3 &position) const override
Given position, a gravity acceleration will be calculated and returned.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
A representation of a generic task.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
AGXMODEL_EXPORT agx::Vec3 getCenter(const agxCollide::Mesh::Triangle &triangle)
const Real GRAVITY_ACCELERATION
#define AGX_DECLARE_POINTER_TYPES(type)
The class GravityField is responsible for calculating and applying a gravity force on a set of bodies...
Real normalize()
Normalize the vector so that it has length unity.