AGX Dynamics  2.38.0.2
RigidBody.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_RIGIDBODY_H
18 #define AGX_RIGIDBODY_H
19 
20 #include <agx/agx.h>
21 #include <agx/Frame.h>
22 #include <agx/MassProperties.h>
23 #include <agx/BitArray.h>
24 
26 
27 #include <agxCollide/Geometry.h>
28 
29 #include <agx/RigidBodyState.h>
30 #include <agx/SetVector.h>
31 
32 #include <agx/macros.h>
33 
34 #ifdef _MSC_VER
35 # pragma warning(push)
36 # pragma warning(disable:4355) //Disable 'this' : used in base member initializer list warning
37 #endif
38 
39 namespace agx
40 {
41  class DynamicsSystem;
42  class InternalData;
43 
47 
52  {
53  public:
63  {
64  STATIC = 1,
65  KINEMATICS = 2,
66  DYNAMICS = 3
67  };
68 
69  public:
76  RigidBody( const agx::Name& name = "" );
77 
83  RigidBody( agxCollide::Geometry* geometry );
84 
88  RigidBody *clone( bool shallowCopyRenderData=false ) const;
89 
95  agx::Frame* getFrame();
96 
102  const agx::Frame* getFrame() const;
103 
109  void setTransform( const agx::AffineMatrix4x4& matrix );
110 
114  const agx::AffineMatrix4x4& getLocalTransform() const;
115 
120  void setLocalTransform( const agx::AffineMatrix4x4& matrix );
121 
125  agx::Vec3 getLocalPosition() const;
126 
131  void setLocalPosition( const agx::Vec3& p );
132 
139  void setLocalPosition( agx::Real x, agx::Real y, agx::Real z );
140 
145  void setRotation( const agx::Quat& q );
146 
151  void setRotation( const agx::EulerAngles& e);
152 
157  void setRotation( const agx::OrthoMatrix3x3& m );
158 
162  agx::Quat getLocalRotation() const;
163 
168  void setLocalRotation( const agx::Quat& q );
169 
174  void setLocalRotation( const agx::EulerAngles& e );
175 
179  agx::Frame* getParentFrame();
180 
184  const agx::Frame* getParentFrame() const;
185 
198  bool setParentFrame( agx::Frame* frame );
199 
204  void setPosition( const agx::Vec3& p );
205 
212  void setPosition( agx::Real x, agx::Real y, agx::Real z );
213 
222  agx::Frame* getCmFrame();
223 
232  const agx::Frame* getCmFrame() const;
233 
238  const agx::AffineMatrix4x4& getTransform() const;
239 
244  CALLABLE_UNIT("m/s")
245  agx::Vec3 getPosition() const;
246 
251  agx::Quat getRotation() const;
252 
264  void setVelocity( const agx::Vec3& velocity );
265 
277  void setVelocity( agx::Real vx, agx::Real vy, agx::Real vz );
278 
290  void setAngularVelocity( const agx::Vec3& angularVelocity );
291 
303  void setAngularVelocity( agx::Real vx, agx::Real vy, agx::Real vz );
304 
310  agx::Vec3 getVelocity() const;
311 
318  agx::Vec3 getAngularVelocity() const;
319 
328  agx::Vec3 getModelVelocity( const agx::Vec3& relPos = agx::Vec3() ) const;
329 
338  agx::Vec3 getModelAcceleration( const agx::Vec3& relPos = agx::Vec3() ) const;
339 
345  void setEnable( bool enable );
346 
351  bool getEnable() const;
352 
357  bool isEnabled() const;
358 
362  agx::RigidBody::MotionControl getMotionControl() const;
363 
371  void setMotionControl( agx::RigidBody::MotionControl control );
372 
376  agx::DynamicsSystem* getSystem();
377 
381  const agx::DynamicsSystem* getSystem() const;
382 
390  agx::Vec3 getLastForce() const;
391 
399  agx::Vec3 getLastTorque() const;
400 
411  agx::PropertyContainer* getPropertyContainer() const;
412 
416  bool hasPropertyContainer() const;
417 
422  void setPropertyContainer( agx::PropertyContainer* container );
423 
427  const agx::Name& getName() const;
428 
433  void setName( const agx::Name& name );
434 
441  agx::UInt32 getId() const;
442 
456  const agx::AffineMatrix4x4& getCmTransform() const;
457 
468  void setCmTransform( const agx::AffineMatrix4x4& matrix, bool synchronizeModel = true );
469 
473  agx::Vec3 getCmLocalTranslate() const;
474 
479  void setCmLocalTranslate(const agx::Vec3& translate);
480 
484  agx::Vec3 getCmPosition() const;
485 
492  void setCmPosition( const agx::Vec3& p, bool synchronizeModel = true );
493 
497  agx::Quat getCmRotation() const;
498 
507  void setCmRotation( const agx::Quat& q);
508 
517  void setCmRotation( const agx::EulerAngles& e);
518 
527  void setCmRotation( const agx::OrthoMatrix3x3& m);
528 
543  void setInertiaTensor( const agx::SPDMatrix3x3& inertiaTensor, const agx::AffineMatrix4x4& cmLocalTransform = agx::AffineMatrix4x4(), bool autogenerateCmOffset = false, bool autogenerateInertia = false );
544 
560  void setInertiaTensor( const agx::Vec3& inertiaDiagonal, const agx::AffineMatrix4x4& cmLocalTransform = agx::AffineMatrix4x4(), bool autogenerateCmOffset = false, bool autogenerateInertia = false );
561 
566  bool addAttachment( agx::Frame* frame, const agx::String& name );
567 
572  bool removeAttachment( const agx::String& name );
573 
579  Frame* getAttachment( const agx::String& name );
580 
584  const agx::MassProperties* getMassProperties() const;
585 
589  agx::MassProperties* getMassProperties();
590 
598  void setForce( const agx::Vec3& force );
599 
607  void setForce( agx::Real fx, agx::Real fy, agx::Real fz );
608 
616  void setTorque( const agx::Vec3& torque );
617 
625  void setTorque( agx::Real tx, agx::Real ty, agx::Real tz );
626 
632  void addForce( const agx::Vec3& force );
633 
639  void addForce( agx::Real fx, agx::Real fy, agx::Real fz );
640 
647  void addForceAtPosition( const agx::Vec3& force, const agx::Vec3& position );
648 
655  void addForceAtPosition( agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz );
656 
663  void addForceAtLocalPosition( const agx::Vec3& force, const agx::Vec3& position );
664 
671  void addForceAtLocalPosition( agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz );
672 
679  void addForceAtLocalCmPosition( const agx::Vec3& force, const agx::Vec3& position );
680 
687  void addForceAtLocalCmPosition( agx::Real fx, agx::Real fy, agx::Real fz, agx::Real px, agx::Real py, agx::Real pz );
688 
694  void addTorque( const agx::Vec3& torque );
695 
701  void addTorque( agx::Real tx, agx::Real ty, agx::Real tz );
702 
708  void addLocalTorque( agx::Real tx, agx::Real ty, agx::Real tz );
709 
715  void addLocalTorque( const agx::Vec3& torque );
716 
736  bool add( agxCollide::Geometry* geometry , const agx::AffineMatrix4x4& localTransform, bool incrementalMassCalculation = false );
737 
761  bool add( agxCollide::Geometry* geometry, bool incrementalMassCalculation = false );
762 
773  bool remove( agxCollide::Geometry* geometry, bool incrementalMassCalculation = false );
774 
780  const agxCollide::Geometry* getGeometry(const agx::Name& name) const;
781 
788  agxCollide::Geometry* getGeometry(const agx::Name& name);
789 
793  const agxCollide::GeometryRefVector& getGeometries() const;
794 
804  void moveTo( const agx::AffineMatrix4x4& target, agx::Real t );
805 
816  void moveTo( const agx::Vec3& targetPosition, const agx::Quat& targetRotation, agx::Real t );
817 
824  void updateMassProperties();
825 
836  void updateMassProperties( agx::UInt32 mask );
837 
844  agx::Real calculateMass() const;
845 
852  agx::Vec3 calculateCenterOfMassOffset( agx::Real mass = agx::Real() ) const;
853 
859  void setLinearVelocityZeroDamping( const agx::Vec3f& dir );
860 
866  void setAngularVelocityZeroDamping( const agx::Vec3f& dir );
867 
872  agx::Vec3f getLinearVelocityZeroDamping() const;
873 
878  agx::Vec3f getAngularVelocityZeroDamping() const;
879 
886  void setLinearVelocityDamping( float damping );
887 
894  void setLinearVelocityDamping( const agx::Vec3f& damping );
895 
902  void setAngularVelocityDamping( float damping );
903 
910  void setAngularVelocityDamping( const agx::Vec3f& damping );
911 
917  void setVelocityDamping( float damping );
918 
922  agx::Vec3f getLinearVelocityDamping() const;
923 
927  agx::Vec3f getAngularVelocityDamping() const;
928 
932  agx::Vec3 getLinearMomentum() const;
933 
937  agx::Vec3 getAngularMomentum() const;
938 
945  void setHandleAsParticle( bool handleAsParticle );
946 
950  bool getHandleAsParticle() const;
951 
956  agx::Vec3 getAcceleration() const;
957 
962  agx::Vec3 getAngularAcceleration() const;
963 
970  bool hasConstraints() const;
971 
978  agx::UInt16 getNumConstraints() const;
979 
984  agx::Referenced* getCustomData() const;
985 
995  void setCustomData( agx::Referenced* data );
996 
1001  agx::Physics::RigidBodyPtr getEntity() const;
1002 
1007  void setEntity( agx::Physics::RigidBodyPtr entity );
1008 
1013  void transfer( agxData::EntityStorage* storage );
1014 
1018  agx::Vec3 getForce() const;
1019 
1023  agx::Vec3 getTorque() const;
1024 
1028  bool isPowerlineBody() const;
1029 
1033  void setIsPowerlineBody(bool isHydraulicBody);
1034 
1035 #ifndef SWIG
1036  inline static bool shouldIgnoreGravity(agx::RigidBodyState state)
1038  {
1039  return !state.enabled() ||
1040  state.motionControl() != agx::RigidBody::DYNAMICS ||
1041  state.powerline();
1042  }
1043 #endif
1044 
1045 
1046 
1048 
1049  bool hasValidEntityIndex() const;
1050 
1051  protected:
1052  friend class DynamicsSystem;
1053  friend class GeometryListener;
1055 
1056  virtual ~RigidBody();
1057 
1058  // Never use these
1059  RigidBody( const agx::RigidBody& );
1060  RigidBody( const agx::Name& name, agx::Physics::RigidBodyPtr entity );
1061  RigidBody& operator = ( const agx::RigidBody& ) { return *this; }
1062 
1067  void setId( agx::UInt32 id );
1068 
1073  void setSystem( agx::DynamicsSystem* system );
1074 
1081  void incrementalMassPropertyUpdate( agx::UInt32 mask, int sign, const agxCollide::Geometry* geometry );
1082 
1083  private:
1084  void init( const agx::Name& name );
1085 
1086  void incrementNumConstraints();
1087  void decrementNumConstraints();
1088  void resetNumConstraints();
1089 
1090  void removeAllGeometries();
1091  void appendGeometry( agxCollide::Geometry* geometry );
1092  void removeGeometry( agx::Physics::GeometryPtr before, agx::Physics::GeometryPtr toBeRemoved );
1093 
1095  friend class InternalData;
1099  agx::Referenced* getInternalData() const;
1100 
1104  void setInternalData( agx::Referenced* data );
1106 
1107  private:
1108  // Low level data.
1109  Physics::RigidBodyRef m_entity;
1110 
1111  mutable PropertyContainerRef m_propertyContainer;
1112 
1113  DynamicsSystem* m_mainSystem;
1114 
1115  FrameRef m_frame;
1116  FrameRef m_cmFrame;
1117 
1118  MassProperties m_massProperties;
1119 
1120  agxCollide::GeometryRefVector m_geometries;
1121 
1122  typedef HashTable<agx::String, FrameRef > FrameTable;
1123  FrameTable m_namedAttachments;
1124 
1125  agx::ref_ptr<agx::Referenced> m_customData;
1126  agx::ref_ptr<agx::Referenced> m_internalData;
1127  };
1128 
1129  AGX_FORCE_INLINE bool RigidBody::getEnable() const
1130  {
1131  return m_entity.state().enabled();
1132  }
1133 
1135  {
1136  return m_entity.state().enabled();
1137  }
1138 
1140  {
1141  return (MotionControl)m_entity.state().motionControl();
1142  }
1143 
1145  {
1146  return ( m_propertyContainer.isValid() );
1147  }
1148 
1150  {
1151  if ( m_propertyContainer == nullptr )
1152  m_propertyContainer = new agx::PropertyContainer;
1153  return m_propertyContainer;
1154  }
1155 
1157  {
1158  return m_entity;
1159  }
1160 
1162  {
1163  return m_entity.id();
1164  }
1165 
1167  {
1168  return m_frame.get();
1169  }
1170 
1172  {
1173  return m_frame.get();
1174  }
1175 
1177  {
1178  return m_cmFrame.get();
1179  }
1180 
1182  {
1183  return m_cmFrame.get();
1184  }
1185 
1187  {
1188  return m_entity.cmTransform();
1189  }
1190 
1192  {
1193  return m_entity.velocity();
1194  }
1195 
1197  {
1198  return m_entity.angularVelocity();
1199  }
1200 
1202  {
1203  return getCmFrame()->getLocalTranslate();
1204  }
1205 
1207  {
1208  return getCmTransform().getTranslate();
1209  }
1210 
1212  {
1213  return getCmTransform().getRotate();
1214  }
1215 
1217  {
1218  return &m_massProperties;
1219  }
1220 
1222  {
1223  return &m_massProperties;
1224  }
1225 
1227  {
1228  return m_entity.state().handleAsParticle();
1229  }
1230 
1232  {
1233  return m_entity.linearAcceleration();
1234  }
1235 
1237  {
1238  return m_entity.angularAcceleration();
1239  }
1240 
1242  {
1243  return m_entity.numConstraints() > 0;
1244  }
1245 
1247  {
1248  return m_entity.numConstraints();
1249  }
1250 
1252  {
1253  return m_customData.get();
1254  }
1255 
1257  {
1258  return m_entity.modelTransform();
1259  }
1260 
1262  {
1263  return m_entity.modelTransform().getTranslate();
1264  }
1265 
1267  {
1268  return m_entity.modelTransform().getRotate();
1269  }
1270 
1271  inline Referenced* RigidBody::getInternalData() const
1272  {
1273  return m_internalData;
1274  }
1275 
1277  {
1278  setVelocity(agx::Vec3(vx,vy,vz));
1279  }
1280 
1282  {
1283  setAngularVelocity(agx::Vec3(vx,vy,vz));
1284  }
1285 
1287  {
1288  addForce( agx::Vec3(fx,fy,fz) );
1289  }
1290 
1292  {
1293  addForceAtPosition( agx::Vec3(fx,fy,fz), agx::Vec3(px,py,pz) );
1294  }
1295 
1297  {
1298  addForceAtLocalPosition( agx::Vec3(fx,fy,fz), agx::Vec3(px,py,pz) );
1299  }
1300 
1302  {
1303  addForceAtLocalCmPosition( agx::Vec3(fx,fy,fz), agx::Vec3(px,py,pz) );
1304  }
1305 
1307  {
1308  addTorque( agx::Vec3(tx,ty,tz) );
1309  }
1310 
1312  {
1313  addLocalTorque( agx::Vec3(tx, ty, tz) );
1314  }
1315 
1317  {
1318  setForce( agx::Vec3(fx,fy,fz) );
1319  }
1320 
1322  {
1323  setTorque( agx::Vec3(tx,ty,tz) );
1324  }
1325 
1326  inline bool RigidBody::isPowerlineBody() const
1327  {
1328  return m_entity.state().powerline();
1329  }
1330 
1331  inline void RigidBody::setIsPowerlineBody(bool isHydraulicBody)
1332  {
1333  m_entity.state().setPowerline(isHydraulicBody);
1334  }
1335 
1336 } // namespace agx
1337 
1338 #ifdef _MSC_VER
1339 # pragma warning(pop)
1340 #endif
1341 
1342 #endif
agx::RigidBody::getMassProperties
const agx::MassProperties * getMassProperties() const
Definition: RigidBody.h:1216
agx::sign
T sign(T v)
Definition: Math.h:328
agx::RigidBody::getPosition
agx::Vec3 getPosition() const
Current model frame position, given in world coordinate frame.
Definition: RigidBody.h:1261
agx::RigidBody::hasConstraints
bool hasConstraints() const
Definition: RigidBody.h:1241
agx::RigidBody::getId
agx::UInt32 getId() const
Internal method.
Definition: RigidBody.h:1161
agx::Real
double Real
Definition: Real.h:42
agx::RigidBody::getCustomData
agx::Referenced * getCustomData() const
Definition: RigidBody.h:1251
agx::RigidBody::setVelocity
void setVelocity(const agx::Vec3 &velocity)
Set the linear velocity of the center of mass of this rigid body.
agx::OrthoMatrix3x3
Specialized types of matrices for holding orthogonal transformation matrices.
Definition: OrthoMatrix3x3.h:33
agx::RigidBody::MotionControl
MotionControl
The MotionControl enumeration indicates what makes a RigidBody move.
Definition: RigidBody.h:62
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
agx::RigidBody::addForceAtPosition
void addForceAtPosition(const agx::Vec3 &force, const agx::Vec3 &position)
Add a force, given in the World coordinate frame, applied at a point specified in world coordinate fr...
CALLABLE
#define CALLABLE
Definition: macros.h:72
agx::RigidBodyRefSetVector
agx::SetVector< ref_ptr< RigidBody > > RigidBodyRefSetVector
Definition: RigidBody.h:46
agx::RigidBody::getCmRotation
agx::Quat getCmRotation() const
Definition: RigidBody.h:1211
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
Geometry.h
agx::RigidBody::getCmTransform
const agx::AffineMatrix4x4 & getCmTransform() const
Convenience methods for center of mass frame.
Definition: RigidBody.h:1186
agx::AffineMatrix4x4T< Real >
agx::RigidBody::getRotation
agx::Quat getRotation() const
Current model frame rotation, given in world coordinate frame.
Definition: RigidBody.h:1266
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
macros.h
agx::ConstraintImplementation
Definition: ConstraintImplementation.h:100
MassProperties.h
agx::RigidBody::getMotionControl
agx::RigidBody::MotionControl getMotionControl() const
Definition: RigidBody.h:1139
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agx::Physics::RigidBodyPtr
Pointer to a entity instance of type Physics.RigidBody.
Definition: RigidBodyEntity.h:371
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agx::RigidBody::hasPropertyContainer
bool hasPropertyContainer() const
Definition: RigidBody.h:1144
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxData
Contains classes for low level data storage for AGX.
Definition: Container.h:23
agx::PropertyContainer
Class that is a container of named properties.
Definition: Property.h:128
agx::InternalData
Internal data for any object, ObjT, with methods: agx::Referenced* ObjT::getInternalData() const; voi...
Definition: InternalData.h:32
agx::RigidBody::getTransform
const agx::AffineMatrix4x4 & getTransform() const
Current model frame transform, given in world coordinate frame.
Definition: RigidBody.h:1256
agx::RigidBody::getCmPosition
agx::Vec3 getCmPosition() const
Definition: RigidBody.h:1206
RigidBodyState.h
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: Vector.h:34
agx::UInt16
uint16_t UInt16
Definition: Integer.h:31
agx::RigidBody::getAngularVelocity
agx::Vec3 getAngularVelocity() const
Angular velocity in world coordinate frame.
Definition: RigidBody.h:1196
agx::RigidBody::addForce
void addForce(const agx::Vec3 &force)
Add the specified force, given in world coordinate frame, that will be affecting this body in the nex...
agx::ref_ptr< RigidBody >
agx::SetVector
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition: SetVector.h:37
agx::RigidBody::addForceAtLocalCmPosition
void addForceAtLocalCmPosition(const agx::Vec3 &force, const agx::Vec3 &position)
Add a force given in world coordinate frame, applied at a point specified in the local Center of Mass...
agx::RigidBody::getNumConstraints
agx::UInt16 getNumConstraints() const
Definition: RigidBody.h:1246
agxUtil::setMotionControl
AGXPHYSICS_EXPORT void setMotionControl(agx::RigidBodyPtrVector &bodies, agx::RigidBody::MotionControl motionControl)
Utility function to set motion control for a vector of rigid bodies.
agx::MassProperties
Class for rigid body inertia tensor and mass.
Definition: MassProperties.h:39
agx::RigidBody::getCmLocalTranslate
agx::Vec3 getCmLocalTranslate() const
Definition: RigidBody.h:1201
agx::RigidBody::getCmFrame
agx::Frame * getCmFrame()
Return the center of mass (CM) frame of this rigid body.
Definition: RigidBody.h:1176
agx::LinearProbingHashTable
Inheritance with partial specialization due to bug with ref_ptr containers.
Definition: LinearProbingHashTable.h:926
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition: Geometry.h:91
agx::Name
Representation of a name string.
Definition: Name.h:32
Frame.h
agx::RigidBody::getAngularAcceleration
agx::Vec3 getAngularAcceleration() const
Will always be 0 for KINEMATIC and STATIC bodies.
Definition: RigidBody.h:1236
agx::SPDMatrix3x3
Specialized type of matrices for holding symmetric positive definite matrices.
Definition: SPDMatrix3x3.h:48
agx::EulerAngles
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
Definition: EulerAngles.h:69
agx::RigidBody::addForceAtLocalPosition
void addForceAtLocalPosition(const agx::Vec3 &force, const agx::Vec3 &position)
Add a force, given in the world coordinate frame, applied at a point specified in the local Model coo...
agx::QuatT< Real >
agx::RigidBody::setTorque
void setTorque(const agx::Vec3 &torque)
Explicitly set the torque, given in world coordinate frame, that will be affecting this body in the n...
agx::Physics::GeometryPtr
Pointer to a entity instance of type Physics.Geometry.
Definition: GeometryEntity.h:269
agx.h
agx::RigidBody::setForce
void setForce(const agx::Vec3 &force)
Explicitly set the force, given in world coordinate frame, that will be affecting this body in the ne...
agx::RigidBody::getHandleAsParticle
bool getHandleAsParticle() const
Definition: RigidBody.h:1226
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
RigidBodyEntity.h
agx::RigidBody::setIsPowerlineBody
void setIsPowerlineBody(bool isHydraulicBody)
Internal method.
Definition: RigidBody.h:1331
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agx::RigidBody::DYNAMICS
@ DYNAMICS
This body moves from the influence of forces.
Definition: RigidBody.h:66
agx::RigidBody::isPowerlineBody
bool isPowerlineBody() const
Definition: RigidBody.h:1326
CALLABLE_UNIT
#define CALLABLE_UNIT(param)
Definition: macros.h:73
agx::AgXString< std::string >
agx::init
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API.
agx::RigidBody::getFrame
agx::Frame * getFrame()
Returns the model frame containing model the transformation and utilities to manipulate position,...
Definition: RigidBody.h:1166
agx::Vec3T< Real >
agx::RigidBody::setAngularVelocity
void setAngularVelocity(const agx::Vec3 &angularVelocity)
Set the angular velocity of the center of mass of this rigid body.
agx::QuatT::getRotate
void getRotate(T &angle, T &x, T &y, T &z) const
Get the angle and vector components represented by the quaternion.
agx::DynamicsSystem
The complete physical system with bodies, interactions, data layout, time stepper,...
Definition: DynamicsSystem.h:63
agx::RigidBody::addLocalTorque
void addLocalTorque(agx::Real tx, agx::Real ty, agx::Real tz)
Adds the specified torque, given in Center of Mass coordinate frame that will be affecting this body ...
Definition: RigidBody.h:1311
agx::UInt32
uint32_t UInt32
Definition: Integer.h:32
agx::RigidBody::isEnabled
bool isEnabled() const
Access the state enable flag.
Definition: RigidBody.h:1134
agx::RigidBody::addTorque
void addTorque(const agx::Vec3 &torque)
Adds the specified torque, given in world coordinate frame, that will be affecting this body in the n...
agx::RigidBody::getEntity
agx::Physics::RigidBodyPtr getEntity() const
Internal method.
Definition: RigidBody.h:1156
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67
agxCollide::GeometryRefVector
agx::Vector< agx::ref_ptr< Geometry > > GeometryRefVector
Definition: agxcollide_vector_types.h:38
BitArray.h
agx::RigidBody::getVelocity
agx::Vec3 getVelocity() const
Velocity of center of mass frame origin, in world coordinate frame.
Definition: RigidBody.h:1191
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition: macros.h:58
agx::RigidBody::getPropertyContainer
agx::PropertyContainer * getPropertyContainer() const
Access property container of this rigid body.
Definition: RigidBody.h:1149
agx::RigidBody::getAcceleration
agx::Vec3 getAcceleration() const
Will always be 0 for KINEMATIC and STATIC bodies.
Definition: RigidBody.h:1231
SetVector.h
agxData::getEntity
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.