29#ifndef PX_ARTICULATION_RC_H
30#define PX_ARTICULATION_RC_H
34#include "PxPhysXConfig.h"
35#include "common/PxBase.h"
36#include "foundation/PxVec3.h"
37#include "foundation/PxTransform.h"
38#include "solver/PxSolverDefs.h"
39#include "PxArticulationFlag.h"
40#include "PxArticulationTendon.h"
41#include "PxArticulationFlag.h"
127 PX_PHYSX_CORE_API
void release();
439#pragma warning(disable : 4435)
905 virtual void packJointData(
const PxReal* maximum, PxReal* reduced)
const = 0;
Class to aggregate actors into a single broad-phase entry.
Definition PxAggregate.h:98
Data structure used to read and write internal articulation data.
Definition PxArticulationReducedCoordinate.h:99
void * scratchAllocator
The scratch allocator is used for internal calculations.
Definition PxArticulationReducedCoordinate.h:286
PxReal * jointForce
The articulation joint DOF forces.
Definition PxArticulationReducedCoordinate.h:206
PxArticulationRootLinkData * rootLinkData
Root link transform, velocities, and accelerations.
Definition PxArticulationReducedCoordinate.h:250
PxU32 version
The cache version used internally to check compatibility with the articulation, i....
Definition PxArticulationReducedCoordinate.h:287
PxSpatialForce * sensorForces
Link sensor spatial forces.
Definition PxArticulationReducedCoordinate.h:261
PxReal * jointPosition
The articulation joint DOF positions.
Definition PxArticulationReducedCoordinate.h:196
PxReal * jointVelocity
The articulation joint DOF velocities.
Definition PxArticulationReducedCoordinate.h:176
PX_PHYSX_CORE_API void release()
Releases an articulation cache.
Definition NpArticulationReducedCoordinate.cpp:45
PxSpatialVelocity * linkVelocity
Link spatial velocity.
Definition PxArticulationReducedCoordinate.h:228
PxReal * jointAcceleration
The articulation joint DOF accelerations.
Definition PxArticulationReducedCoordinate.h:186
PxReal * jointSolverForces
Solver constraint joint DOF forces.
Definition PxArticulationReducedCoordinate.h:216
PxReal * lambda
Constraint lambda values (impulses applied by the respective constraints).
Definition PxArticulationReducedCoordinate.h:283
void * scratchMemory
The scratch memory is used for internal calculations.
Definition PxArticulationReducedCoordinate.h:285
PxSpatialForce * externalForces
External forces acting on the articulation links for inverse dynamics computation.
Definition PxArticulationReducedCoordinate.h:138
PxReal * denseJacobian
Dense Jacobian data.
Definition PxArticulationReducedCoordinate.h:150
PxSpatialVelocity * linkAcceleration
Link classical acceleration.
Definition PxArticulationReducedCoordinate.h:240
PxReal * massMatrix
The generalized mass matrix that maps joint accelerations to joint forces.
Definition PxArticulationReducedCoordinate.h:160
PxReal * coefficientMatrix
Constraint coefficient matrix.
Definition PxArticulationReducedCoordinate.h:273
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
virtual void applyCache(PxArticulationCache &cache, const PxArticulationCacheFlags flags, bool autowake=true)=0
Applies the data in the cache to the articulation.
virtual void computeGeneralizedGravityForce(PxArticulationCache &cache) const =0
Computes the joint DOF forces required to counteract gravitational forces for the given articulation ...
virtual PxArticulationSensor * createSensor(PxArticulationLink *link, const PxTransform &relativePose)=0
Creates a force sensor attached to a link of the articulation.
virtual void computeJointForce(PxArticulationCache &cache) const =0
Computes the joint forces for the given articulation state and joint accelerations,...
virtual void setStabilizationThreshold(PxReal threshold)=0
Sets the mass-normalized kinetic energy threshold below which the articulation may participate in sta...
virtual PxVec3 getRootLinearVelocity(void) const =0
Gets the root link center-of-mass linear velocity.
virtual void setRootAngularVelocity(const PxVec3 &angularVelocity, bool autowake=true)=0
Sets the root link angular velocity.
virtual PxScene * getScene() const =0
Returns the scene which this articulation belongs to.
virtual PxU32 getCacheDataSize() const =0
Returns the size of the articulation cache in bytes.
virtual PxVec3 getRootAngularVelocity(void) const =0
Gets the root link angular velocity.
virtual void zeroCache(PxArticulationCache &cache) const =0
Zeroes all data in the articulation cache, except user-provided and scratch memory,...
virtual PxU32 getNbLoopJoints() const =0
Returns the number of loop joints in the articulation for inverse dynamics.
virtual void commonInit() const =0
Prepares common articulation data based on articulation pose for inverse dynamics calculations.
virtual PxBounds3 getWorldBounds(float inflation=1.01f) const =0
Returns the axis-aligned bounding box enclosing the articulation.
virtual const char * getName() const =0
Returns the name string set with setName().
virtual void removeLoopJoint(PxConstraint *joint)=0
Removes a loop joint from the articulation for inverse dynamics.
virtual PxReal getMaxCOMAngularVelocity() const =0
Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.
virtual PxU32 getSpatialTendons(PxArticulationSpatialTendon **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Returns the spatial tendons attached to the articulation.
virtual PxU32 getNbSpatialTendons()=0
Returns the number of spatial tendons in the articulation.
virtual void setSleepThreshold(PxReal threshold)=0
Sets the mass-normalized energy threshold below which the articulation may go to sleep.
virtual void unpackJointData(const PxReal *reduced, PxReal *maximum) const =0
Converts reduced-coordinate joint DOF data to maximal coordinates.
virtual void copyInternalStateToCache(PxArticulationCache &cache, const PxArticulationCacheFlags flags) const =0
Copies internal data of the articulation to the cache.
virtual PxU32 getSensors(PxArticulationSensor **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Returns the sensors attached to the articulation.
virtual void computeDenseJacobian(PxArticulationCache &cache, PxU32 &nRows, PxU32 &nCols) const =0
Compute the dense Jacobian for the articulation in world space, including the DOFs of a potentially f...
virtual PxU32 getNbFixedTendons()=0
Returns the number of fixed tendons in the articulation.
virtual bool isSleeping() const =0
Returns true if this articulation is sleeping.
virtual void setWakeCounter(PxReal wakeCounterValue)=0
Sets the wake counter for the articulation in seconds.
virtual void putToSleep()=0
Forces the articulation to sleep.
virtual void computeCoefficientMatrix(PxArticulationCache &cache) const =0
Computes the coefficient matrix for contact forces.
virtual PxU32 getFixedTendons(PxArticulationFixedTendon **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Returns the fixed tendons attached to the articulation.
virtual PxU32 getCoefficientMatrixSize() const =0
Returns the required size of the coefficient matrix in the articulation.
virtual PxArticulationFixedTendon * createFixedTendon()=0
Creates a fixed tendon to attach to the articulation with default attribute values.
virtual void computeGeneralizedMassMatrix(PxArticulationCache &cache) const =0
Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * ac...
virtual void setMaxCOMLinearVelocity(const PxReal maxLinearVelocity)=0
Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.
virtual void setArticulationFlags(PxArticulationFlags flags)=0
Sets flags on the articulation.
virtual PxReal getMaxCOMLinearVelocity() const =0
Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.
virtual void setRootGlobalPose(const PxTransform &pose, bool autowake=true)=0
Sets the root link transform (world to actor frame).
virtual PxU32 getLinks(PxArticulationLink **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Returns the set of links in the articulation in the order that they were added to the articulation us...
virtual PxReal getSleepThreshold() const =0
Returns the mass-normalized energy below which the articulation may go to sleep.
void * userData
user can assign this to whatever, usually to create a 1:1 relationship with a user object.
Definition PxArticulationReducedCoordinate.h:1402
virtual PxArticulationLink * createLink(PxArticulationLink *parent, const PxTransform &pose)=0
Adds a link to the articulation with default attribute values.
virtual PxU32 getDofs() const =0
Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.
virtual void computeGeneralizedExternalForce(PxArticulationCache &cache) const =0
Computes the joint DOF forces required to counteract external spatial forces applied to articulation ...
virtual void computeCoriolisAndCentrifugalForce(PxArticulationCache &cache) const =0
Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given ar...
virtual PxU32 getGpuArticulationIndex()=0
Returns the GPU articulation index.
virtual PxReal getStabilizationThreshold() const =0
Returns the mass-normalized kinetic energy below which the articulation may participate in stabilizat...
virtual PxArticulationCache * createCache() const =0
Creates an articulation cache that can be used to read and write internal articulation data.
virtual PxTransform getRootGlobalPose() const =0
Returns the root link transform (world to actor frame).
virtual void computeJointAcceleration(PxArticulationCache &cache) const =0
Computes the joint accelerations for the given articulation state and joint forces.
virtual void setSolverIterationCounts(PxU32 minPositionIters, PxU32 minVelocityIters=1)=0
Sets the solver iteration counts for the articulation.
virtual void updateKinematic(PxArticulationKinematicFlags flags)=0
Update link velocities and/or positions in the articulation.
virtual PxU32 getNbSensors()=0
Returns the number of sensors in the articulation.
virtual void setName(const char *name)=0
Sets a name string for the articulation that can be retrieved with getName().
virtual PxU32 getNbLinks() const =0
Returns the number of links in the articulation.
virtual void release()=0
Releases the articulation, and all its links and corresponding joints.
virtual bool computeLambda(PxArticulationCache &cache, PxArticulationCache &initialState, const PxReal *const jointTorque, const PxU32 maxIter) const =0
Computes the lambda values when the test impulse is 1.
virtual PxU32 getLoopJoints(PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Returns the set of loop constraints (i.e. joints) in the articulation.
virtual void packJointData(const PxReal *maximum, PxReal *reduced) const =0
Converts maximal-coordinate joint DOF data to reduced coordinates.
virtual void getSolverIterationCounts(PxU32 &minPositionIters, PxU32 &minVelocityIters) const =0
Returns the solver iteration counts.
virtual void wakeUp()=0
Wakes up the articulation if it is sleeping.
virtual PxAggregate * getAggregate() const =0
Returns the aggregate the articulation might be a part of.
virtual PxArticulationFlags getArticulationFlags() const =0
Returns the articulation's flags.
virtual void setMaxCOMAngularVelocity(const PxReal maxAngularVelocity)=0
Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.
virtual PxArticulationSpatialTendon * createSpatialTendon()=0
Creates a spatial tendon to attach to the articulation with default attribute values.
virtual void setRootLinearVelocity(const PxVec3 &linearVelocity, bool autowake=true)=0
Sets the root link linear center-of-mass velocity.
virtual PxReal getWakeCounter() const =0
Returns the wake counter of the articulation in seconds.
virtual PxSpatialVelocity getLinkAcceleration(const PxU32 linkId)=0
Returns the (classical) link acceleration in world space for the given low-level link index.
virtual void setArticulationFlag(PxArticulationFlag::Enum flag, bool value)=0
Raises or clears a flag on the articulation.
virtual void addLoopJoint(PxConstraint *joint)=0
Adds a loop joint to the articulation system for inverse dynamics.
virtual PxU32 getNbShapes() const =0
Returns the number of shapes in the articulation.
A force sensor that can be attached to articulation links to measure spatial force.
Definition PxArticulationReducedCoordinate.h:313
virtual void setFlag(PxArticulationSensorFlag::Enum flag, bool enabled)=0
Sets a flag of the sensor.
virtual PxTransform getRelativePose() const =0
Returns the relative pose between this sensor and the body frame of the link that the sensor is attac...
virtual void setRelativePose(const PxTransform &pose)=0
Sets the relative pose between this sensor and the body frame of the link that the sensor is attached...
virtual PxArticulationLink * getLink() const =0
Returns the link that this sensor is attached to.
virtual PxArticulationReducedCoordinate * getArticulation() const =0
Returns the articulation that this sensor is part of.
virtual PxSpatialForce getForces() const =0
Returns the spatial force in the local frame of the sensor.
void * userData
user can assign this to whatever, usually to create a 1:1 relationship with a user object.
Definition PxArticulationReducedCoordinate.h:414
virtual PxU32 getIndex() const =0
Returns the index of this sensor inside the articulation.
virtual PxArticulationSensorFlags getFlags() const =0
Returns the sensor's flags.
virtual const char * getConcreteTypeName() const
Returns the string name of the dynamic type.
Definition PxArticulationReducedCoordinate.h:410
virtual void release()=0
Releases the sensor.
A spatial tendon that attaches to an articulation.
Definition PxArticulationTendon.h:413
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
A plugin class for implementing constraints.
Definition PxConstraint.h:100
Container for bitfield flag variables associated with a specific enum type.
Definition PxFlags.h:73
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
3 Element vector class.
Definition PxVec3.h:50
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Enum
Definition PxSolverDefs.h:294
Flag that configures articulation-state updates by PxArticulationReducedCoordinate::updateKinematic.
Definition PxArticulationReducedCoordinate.h:426
Enum
Definition PxArticulationReducedCoordinate.h:428
@ eVELOCITY
Raise after velocity-only changes to the articulation root or joints using non-cache API calls....
Definition PxArticulationReducedCoordinate.h:430
@ ePOSITION
Raise after any changes to the articulation root or joint positions using non-cache API calls....
Definition PxArticulationReducedCoordinate.h:429
Data structure used to access the root link state and acceleration.
Definition PxArticulationReducedCoordinate.h:83
PxVec3 worldAngVel
Link angular velocity.
Definition PxArticulationReducedCoordinate.h:87
PxTransform transform
Actor transform.
Definition PxArticulationReducedCoordinate.h:84
PxVec3 worldLinVel
Link linear velocity.
Definition PxArticulationReducedCoordinate.h:86
PxVec3 worldLinAccel
Link classical linear acceleration.
Definition PxArticulationReducedCoordinate.h:88
PxVec3 worldAngAccel
Link angular acceleration.
Definition PxArticulationReducedCoordinate.h:89
Flags to configure the forces reported by articulation link sensors.
Definition PxArticulationReducedCoordinate.h:296
Enum
Definition PxArticulationReducedCoordinate.h:298
@ eFORWARD_DYNAMICS_FORCES
Raise to receive forces from forward dynamics.
Definition PxArticulationReducedCoordinate.h:299
@ eWORLD_FRAME
Raise to receive forces in the world rotation frame, otherwise they will be reported in the sensor's ...
Definition PxArticulationReducedCoordinate.h:301
@ eCONSTRAINT_SOLVER_FORCES
Raise to receive forces from constraint solver.
Definition PxArticulationReducedCoordinate.h:300
Data structure to represent spatial forces.
Definition PxArticulationReducedCoordinate.h:53
Data structure to represent spatial velocities.
Definition PxArticulationReducedCoordinate.h:66