11 #include <Atoms/Globals.h>
12 #include <AtomsCore/AtomsMath.h>
13 #include <AtomsUtils/Mesh.h>
14 #include <AtomsCore/Metadata/MapMetadata.h>
18 #include <tbb/atomic.h>
21 #define GETSET_RIGID_BODY_ATTRIBUTE( SET_NAME, GET_NAME, TYPE, ATTRIBUTE ) \
22 inline TYPE GET_NAME() const { return ATTRIBUTE; } \
23 void SET_NAME(TYPE value) { ATTRIBUTE = value; } \
98 static const size_t version;
117 float collisionForceThreshold;
118 float maxAngularVelocity;
119 float angularDamping;
122 float sleepThreshold;
123 float stabilizationThreshold;
126 float staticFriction;
127 float dynamicFriction;
131 float contactReportThreshold;
132 float stuckOnCollisionImpulse;
133 float heightFieldScale;
136 int dynamicOnCollisionPool;
137 int stuckOnCollisionPool;
139 int heightFieldColumns;
146 bool dynamicOnCollision;
147 bool disableCollisionEvent;
148 bool stuckOnCollision;
149 bool aggregateSelfCollision;
150 bool storeImpactData;
176 std::vector<AtomsCore::Vector3f> points;
177 std::vector<AtomsCore::Vector3f> normals;
178 std::vector<unsigned int> indices;
190 enum DynamicOnCollisionType
203 void storeTransform();
205 void setKinematic(
bool value);
209 void getGeometry(std::vector<AtomsCore::Vector3f>& points,
210 std::vector<AtomsCore::Vector3f>& normals,
211 std::vector<unsigned int>& indices)
const;
213 void getShape(ShapeData& data)
const;
215 inline bool isStatic()
const;
217 inline bool isKinematic()
const;
219 inline bool isDynamic()
const;
233 void applyForces(
float scale);
237 void clearFeedbacks();
247 bool updateMeshPoints(
const std::vector<AtomsCore::Vector3f>& newPoints);
251 std::vector<ImpactData> impacts;
253 std::vector<ImpactData> feedback;
255 physx::PxRigidActor* actor;
285 std::atomic<bool> dynamicSwitch;
287 std::atomic<int> dynamicPool;
289 tbb::atomic<bool> dynamicSwitch;
291 tbb::atomic<int> dynamicPool;
311 short dynamicOnCollisionType;
315 float stuckOnCollisionImpulse;
319 float collisionForceThreshold;
321 int dynamicOnCollisionPool;
323 int stuckOnCollisionPool;
327 bool dynamicOnCollision;
331 bool stuckOnCollision;
333 bool aggregateSelfCollision;
337 bool storeImpactData;
344 #include "RigidBody.impl.h"
Definition: RigidBody.h:40
bool serialise(std::string &outStream) const
Binary Serialise.
bool deserialise(const AtomsCore::MapMetadata *inStream)
Binary Deserialise.
bool serialise(AtomsCore::MapMetadata *outStream) const
Binary Serialise.
bool deserialise(const std::string &inStream)
Binary Deserialise.
Definition: RigidBody.h:155
ShapeType
Definition: RigidBody.h:159
@ kGeometryCount
internal use only!
Definition: RigidBody.h:167
AtomsMath::Matrixf Matrixf
Matrix class.
Definition: AtomsMath.h:64
AtomsMath::Vector2f Vector2f
Vector2 class.
Definition: AtomsMath.h:55
AtomsMath::Vector3f Vector3f
Vector3 class.
Definition: AtomsMath.h:58
AtomsMath::Quaternionf Quaternionf
Quaternion class.
Definition: AtomsMath.h:68
Atoms namespace.
Definition: Agent.h:29
Definition: RigidBody.h:182
Definition: RigidBody.h:172