29#ifndef NP_ARTICULATION_TENDON_H
30#define NP_ARTICULATION_TENDON_H
32#include "foundation/PxInlineArray.h"
33#include "PxArticulationTendon.h"
34#include "ScArticulationTendonCore.h"
35#include "ScArticulationAttachmentCore.h"
36#include "ScArticulationTendonJointCore.h"
43typedef PxU32 ArticulationAttachmentHandle;
44typedef PxU32 ArticulationTendonHandle;
46class NpArticulationReducedCoordinate;
48class NpArticulationAttachment;
49class NpArticulationSpatialTendon;
51class NpArticulationTendonJoint;
52class NpArticulationFixedTendon;
94 void preExportDataReset() { mCore.preExportDataReset(); }
99 virtual bool isSubordinate()
const {
return true; }
133 PX_FORCE_INLINE void setTendon(NpArticulationSpatialTendon* tendon) { mTendon = tendon; }
136 PX_FORCE_INLINE Sc::ArticulationAttachmentCore& getCore() {
return mCore; }
138 void removeChild(NpArticulationAttachment* child);
140 PxArticulationLink* mLink;
141 PxArticulationAttachment* mParent;
142 ArticulationAttachmentHandle mHandle;
143 NpArticulationAttachmentArray mChildren;
144 NpArticulationSpatialTendon* mTendon;
145 Sc::ArticulationAttachmentCore mCore;
156 void preExportDataReset() { mCore.preExportDataReset(); }
161 virtual bool isSubordinate()
const {
return true; }
179 virtual void setDamping(
const PxReal damping);
185 virtual void setOffset(
const PxReal offset,
bool autowake =
true);
194 PX_FORCE_INLINE ArticulationTendonHandle getHandle() {
return mHandle; }
195 PX_FORCE_INLINE void setHandle(ArticulationTendonHandle handle) { mHandle = handle; }
204 ArticulationTendonHandle mHandle;
212 void preExportDataReset() { mCore.preExportDataReset(); }
217 virtual bool isSubordinate()
const {
return true; }
241 PX_FORCE_INLINE void setTendon(NpArticulationFixedTendon* tendon) { mTendon = tendon; }
244 PX_FORCE_INLINE Sc::ArticulationTendonJointCore& getCore() {
return mCore; }
246 void removeChild(NpArticulationTendonJoint* child);
248 PxArticulationLink* mLink;
249 PxArticulationTendonJoint* mParent;
250 NpArticulationTendonJointArray mChildren;
251 NpArticulationFixedTendon* mTendon;
252 Sc::ArticulationTendonJointCore mCore;
262 void preExportDataReset() {}
267 virtual bool isSubordinate()
const {
return true; }
285 virtual void setDamping(
const PxReal damping);
297 virtual void setOffset(
const PxReal offset,
bool autowake =
true);
304 PX_FORCE_INLINE ArticulationTendonHandle getHandle() {
return mHandle; }
305 PX_FORCE_INLINE void setHandle(ArticulationTendonHandle handle) { mHandle = handle; }
316 ArticulationTendonHandle mHandle;
!!AL TODO: check if default of 4 elements makes sense
Definition NpArticulationTendon.h:55
Definition NpArticulationTendon.h:87
virtual void setRelativeOffset(const PxVec3 &offset)
Sets the attachment's relative offset in the link actor frame.
Definition NpArticulationTendon.cpp:140
virtual void setCoefficient(const PxReal coefficient)
Sets the attachment coefficient.
Definition NpArticulationTendon.cpp:153
virtual PxVec3 getRelativeOffset() const
Gets the attachment's relative offset in the link actor frame.
Definition NpArticulationTendon.cpp:148
virtual PxArticulationAttachment * getParent() const
Gets the parent attachment.
Definition NpArticulationTendon.h:123
virtual PxReal getCoefficient() const
Gets the attachment coefficient.
Definition NpArticulationTendon.cpp:163
virtual PxReal getRestLength() const
Gets the spring rest length for the sub-tendon from the root to this leaf attachment.
Definition NpArticulationTendon.cpp:114
virtual void release()
Releases the attachment.
Definition NpArticulationTendon.cpp:173
virtual void setRestLength(const PxReal restLength)
Sets the spring rest length for the sub-tendon from the root to this leaf attachment.
Definition NpArticulationTendon.cpp:104
virtual PxArticulationSpatialTendon * getTendon() const
Gets the spatial tendon that the attachment is a part of.
Definition NpArticulationTendon.cpp:168
virtual PxArticulationLink * getLink() const
Gets the articulation link.
Definition NpArticulationTendon.h:122
virtual PxArticulationTendonLimit getLimitParameters() const
Gets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
Definition NpArticulationTendon.cpp:131
virtual void setLimitParameters(const PxArticulationTendonLimit ¶mters)
Sets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
Definition NpArticulationTendon.cpp:119
virtual bool isLeaf() const
Indicates that this attachment is a leaf, and thus defines a sub-tendon from the root to this attachm...
Definition NpArticulationTendon.h:126
Definition NpArticulationTendon.h:258
virtual PxArticulationTendonJoint * createTendonJoint(PxArticulationTendonJoint *parent, PxArticulationAxis::Enum axis, const PxReal scale, const PxReal recipScale, PxArticulationLink *link)
Creates an articulation tendon joint and adds it to the list of children in the parent tendon joint.
Definition NpArticulationTendon.cpp:636
virtual void setStiffness(const PxReal stiffness)
Sets the spring stiffness term acting on the tendon length.
Definition NpArticulationTendon.cpp:687
virtual PxReal getDamping() const
Gets the damping term acting both on the tendon length and tendon-length limits.
Definition NpArticulationTendon.cpp:712
virtual void setDamping(const PxReal damping)
Sets the damping term acting both on the tendon length and tendon-length limits.
Definition NpArticulationTendon.cpp:703
virtual PxArticulationTendonLimit getLimitParameters() const
Gets the low and high limit on the length of the tendon.
Definition NpArticulationTendon.cpp:760
virtual PxU32 getNbTendonJoints(void) const
Returns the number of tendon joints in the tendon.
Definition NpArticulationTendon.cpp:774
virtual PxReal getRestLength() const
Gets the spring rest length of the tendon.
Definition NpArticulationTendon.cpp:744
virtual PxReal getOffset() const
Gets the length offset term for the tendon.
Definition NpArticulationTendon.cpp:792
virtual void setOffset(const PxReal offset, bool autowake=true)
Sets the length offset term for the tendon.
Definition NpArticulationTendon.cpp:779
virtual PxReal getLimitStiffness() const
Gets the limit stiffness term acting on the tendon's length limits.
Definition NpArticulationTendon.cpp:728
virtual void setLimitStiffness(const PxReal damping)
Sets the limit stiffness term acting on the tendon's length limits.
Definition NpArticulationTendon.cpp:719
virtual PxReal getStiffness() const
Gets the spring stiffness of the tendon.
Definition NpArticulationTendon.cpp:696
virtual PxArticulationReducedCoordinate * getArticulation() const
Gets the articulation that the tendon is a part of.
Definition NpArticulationTendon.cpp:799
virtual PxU32 getTendonJoints(PxArticulationTendonJoint **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
Fills a user-provided buffer of tendon-joint pointers with the set of tendon joints.
Definition NpArticulationTendon.cpp:680
virtual void setRestLength(const PxReal restLength)
Sets the spring rest length of the tendon.
Definition NpArticulationTendon.cpp:735
virtual void release()
Releases a tendon to remove it from the articulation and free its associated memory.
Definition NpArticulationTendon.cpp:618
virtual void setLimitParameters(const PxArticulationTendonLimit ¶mters)
Sets the low and high limit on the length of the tendon.
Definition NpArticulationTendon.cpp:751
Definition NpArticulationReducedCoordinate.h:56
Definition NpArticulationTendon.h:150
virtual void setStiffness(const PxReal stiffness)
Sets the spring stiffness term acting on the tendon length.
Definition NpArticulationTendon.cpp:331
virtual PxU32 getAttachments(PxArticulationAttachment **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
Fills a user-provided buffer of attachment pointers with the set of attachments.
Definition NpArticulationTendon.cpp:324
virtual void setOffset(const PxReal offset, bool autowake=true)
Sets the length offset term for the tendon.
Definition NpArticulationTendon.cpp:383
virtual PxArticulationAttachment * createAttachment(PxArticulationAttachment *parent, const PxReal coefficient, const PxVec3 relativeOffset, PxArticulationLink *link)
Creates an articulation attachment and adds it to the list of children in the parent attachment.
Definition NpArticulationTendon.cpp:280
virtual void release()
Releases a tendon to remove it from the articulation and free its associated memory.
Definition NpArticulationTendon.cpp:408
virtual void setDamping(const PxReal damping)
Sets the damping term acting both on the tendon length and tendon-length limits.
Definition NpArticulationTendon.cpp:351
virtual PxReal getDamping() const
Gets the damping term acting both on the tendon length and tendon-length limits.
Definition NpArticulationTendon.cpp:360
virtual PxReal getStiffness() const
Gets the spring stiffness of the tendon.
Definition NpArticulationTendon.cpp:344
virtual PxArticulationReducedCoordinate * getArticulation() const
Gets the articulation that the tendon is a part of.
Definition NpArticulationTendon.cpp:403
virtual PxReal getOffset() const
Gets the length offset term for the tendon.
Definition NpArticulationTendon.cpp:396
virtual void setLimitStiffness(const PxReal stiffness)
Sets the limit stiffness term acting on the tendon's length limits.
Definition NpArticulationTendon.cpp:367
virtual PxReal getLimitStiffness() const
Gets the limit stiffness term acting on the tendon's length limits.
Definition NpArticulationTendon.cpp:376
PxU32 getNbAttachments() const
Returns the number of attachments in the tendon.
Definition NpArticulationTendon.cpp:432
!!AL TODO: check if default of 4 elements makes sense
Definition NpArticulationTendon.h:71
Definition NpArticulationTendon.h:208
virtual PxArticulationFixedTendon * getTendon() const
Gets the tendon that the joint is a part of.
Definition NpArticulationTendon.cpp:505
virtual void release()
Releases a tendon joint.
Definition NpArticulationTendon.cpp:529
virtual PxArticulationTendonJoint * getParent() const
Gets the parent tendon joint.
Definition NpArticulationTendon.h:228
virtual PxArticulationLink * getLink() const
Gets the articulation link.
Definition NpArticulationTendon.h:226
virtual void getCoefficient(PxArticulationAxis::Enum &axis, PxReal &coefficient, PxReal &recipCoefficient) const
Gets the tendon joint coefficient.
Definition NpArticulationTendon.cpp:524
virtual void setCoefficient(const PxArticulationAxis::Enum axis, const PxReal coefficient, const PxReal recipCoefficient)
Sets the tendon joint coefficient.
Definition NpArticulationTendon.cpp:510
PX_FORCE_INLINE uint32_t size() const
Definition PxArray.h:242
PX_FORCE_INLINE ConstIterator begin() const
Definition PxArray.h:176
PX_FORCE_INLINE bool empty() const
Definition PxArray.h:261
Defines a spatial tendon attachment point on a link.
Definition PxArticulationTendon.h:60
A fixed tendon that can be used to link multiple degrees of freedom of multiple articulation joints v...
Definition PxArticulationTendon.h:478
A component of an articulation that represents a rigid body.
Definition PxArticulationLink.h:54
A tree structure of bodies connected by joints that is treated as a unit by the dynamics solver....
Definition PxArticulationReducedCoordinate.h:448
A spatial tendon that attaches to an articulation.
Definition PxArticulationTendon.h:413
Defines a fixed-tendon joint on an articulation joint degree of freedom.
Definition PxArticulationTendon.h:203
Defines the low/high limits of the length of a tendon.
Definition PxArticulationTendon.h:50
Binary deserialization context class.
Definition PxSerialFramework.h:174
Definition PxInlineArray.h:43
Output stream class for I/O.
Definition PxIO.h:114
Callback class used to process PxBase objects.
Definition PxSerialFramework.h:81
Binary serialization context class.
Definition PxSerialFramework.h:99
3 Element vector class.
Definition PxVec3.h:50
Definition ScArticulationTendonCore.h:101
Definition ScArticulationTendonCore.h:63
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxEMPTY
Definition Px.h:87
Enum
Definition PxSolverDefs.h:252