10 #include <AtomsGraph/Ports.h>
12 #include <Atoms/Globals.h>
13 #include <Atoms/Graph/Operator.h>
14 #include <AtomsCore/Joint.h>
15 #include <AtomsUtils/Utils.h>
16 #include <Atoms/Physx/RigidBodyConstraint.h>
17 #include <Atoms/HeightField.h>
23 class RigidBodyConstraint;
61 std::map<size_t, ConstraintData> constraints;
73 void updateDynamics();
77 inline void setPhysics(
AtomsPhysx* physx) { m_physx = physx; }
79 inline const std::map<size_t, JointData>& rbs()
const {
return m_rbs; }
80 inline std::map<size_t, JointData>& rbs() {
return m_rbs; }
82 inline void setRagdollSetup(
const std::string& value) { m_ragdollSetup = value; }
84 inline void setPartialRagdollFilter(
const std::string& value)
86 auto clearString = AtomsUtils::eraseFromString(value,
' ');
87 AtomsUtils::splitString(clearString,
',', m_partialRagdollFilter);
90 inline void setDynamicOnCollision(
int value) { m_dynamicOnCollision = value; }
92 inline void setCollisionForceThreshold(
double value) { m_collisionForceThreshold = value; }
94 inline void setMotorRagdollDamping(
double value) { m_motorRagdollDamping = value; }
96 inline void setMotorRagdollStiffness(
double value) { m_motorRagdollStiffness = value; }
98 inline void setBreakable(
int value) { m_breakable = value; }
100 inline void setBreakableFilter(
const std::string& value)
102 auto clearString = AtomsUtils::eraseFromString(value,
' ');
103 AtomsUtils::splitString(clearString,
',', m_breakableFilter);
106 inline void setAnimationBlending(
double value) { m_animationBlending = value; }
108 inline void setStuckOnCollision(
bool value) { m_stuckOnCollision = value; }
110 inline void setPartialRagdollSkipChildren(
bool value) { m_partialRagdollSkipChildren = value; }
112 inline void setMotorRagdollAcceleration(
short value) { m_motorRagdollAcceleration = value; }
114 inline void setMotorRagdollMaxForce(
double value) { m_motorRagdollMaxForce = value; }
118 inline void setSelfCollision(
bool value) { m_selfCollision = value; }
120 inline void setMode(
short value) { m_mode = value; }
122 void updateKinematic(
double value);
126 inline void setHeightField(
const std::string& value) { m_heightField = value; }
128 inline void setGravityField(
const std::string& value) { m_gravityField = value; }
130 inline void setStuckOnCollisionBreakForce(
const AtomsCore::Vector2& value) { m_stuckOnCollisionBreakForce = value; }
132 inline const std::vector<size_t>& rbsOrder()
const {
return m_rbsOrder; }
134 inline void setDynamicOnCollisionFilter(
const std::string& value)
136 auto clearString = AtomsUtils::eraseFromString(value,
' ');
137 AtomsUtils::splitString(clearString,
',', m_dynamicOnCollisionFilter);
140 inline void setStuckOnCollisionImpulse(
double value) { m_stuckOnCollisionImpulse = value; }
142 inline void setCollisionPool(
int value) { m_collisionPool = value; }
144 inline void setDynamicOnCollisionPool(
int value) { m_dynamicOnCollisionPool = value; }
146 inline void setStuckOnCollisionPool(
int value) { m_stuckOnCollisionPool = value; }
148 inline void setAddContactData(
bool value) { m_addContactData = value; }
158 std::map<size_t, JointData> m_rbs;
160 std::vector<size_t> m_rbsOrder;
170 std::string m_ragdollSetup;
172 std::vector<std::string> m_partialRagdollFilter;
174 std::map<size_t, size_t> m_partialRagdollSetup;
176 int m_dynamicOnCollision;
178 std::vector<std::string> m_dynamicOnCollisionFilter;
180 double m_collisionForceThreshold;
182 double m_motorRagdollDamping;
184 double m_motorRagdollStiffness;
186 short m_motorRagdollAcceleration;
188 double m_motorRagdollMaxForce;
194 std::vector<std::string> m_breakableFilter;
196 double m_animationBlending;
198 bool m_stuckOnCollision;
200 double m_stuckOnCollisionImpulse;
204 bool m_partialRagdollSkipChildren;
208 bool m_selfCollision;
210 std::string m_heightField;
212 std::string m_gravityField;
219 int m_dynamicOnCollisionPool;
221 int m_stuckOnCollisionPool;
223 bool m_addContactData;
Definition: AtomsPhysx.h:40
Container for all agent types.
Definition: HeightField.h:17
Operator node.
Definition: Operator.h:26
Definition: RagdollOperator.h:41
Definition: RagdollOperator.h:51
Definition: RagdollOperator.h:26
bool compute(const AtomsGraph::ComputeData *computeData)
Compute function.
void reset()
Operator reset function.
Definition: RigidBodyConstraint.h:78
Definition: RigidBodyConstraint.h:216
Definition: RigidBody.h:155
Joint class.
Definition: Joint.h:30
Pose class.
Definition: Pose.h:32
Generic node port class.
Definition: PortTemplate.h:24
AtomsMath::Vector2 Vector2
Vector2 class.
Definition: AtomsMath.h:54
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63
Atoms namespace.
Definition: Agent.h:29