- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedPxArticulationJointReducedCoordinate(long address) -
Method Summary
Modifier and TypeMethodDescriptionarrayGet(long baseAddress, int index) voiddestroy()floatGets the joint armature for the given axis.Gets the child articulation link of this joint.Gets the joint pose in the child link actor frame.floatReturns the joint drive position target for the given axis.floatReturns the joint drive velocity target for the given axis.floatGets the joint friction coefficient.floatGets the joint position for the given axis, i.e.Gets the joint type.floatGets the joint velocity for the given axis.Returns the joint limits for a given axis.floatGets the maximal joint velocity enforced for all axes.Returns the joint motion for the given axis.Gets the parent articulation link of this joint.Gets the joint pose in the parent link actor frame.voidsetArmature(PxArticulationAxisEnum axis, float armature) Sets the joint armature for the given axis.voidsetChildPose(PxTransform pose) Sets the joint pose in the child link actor frame.voidsetDriveParams(PxArticulationAxisEnum axis, PxArticulationDrive drive) Configures a joint drive for the given axis.voidsetDriveTarget(PxArticulationAxisEnum axis, float target) Sets the joint drive position target for the given axis.voidsetDriveTarget(PxArticulationAxisEnum axis, float target, boolean autowake) Sets the joint drive position target for the given axis.voidsetDriveVelocity(PxArticulationAxisEnum axis, float targetVel) Sets the joint drive velocity target for the given axis.voidsetDriveVelocity(PxArticulationAxisEnum axis, float targetVel, boolean autowake) Sets the joint drive velocity target for the given axis.voidsetFrictionCoefficient(float coefficient) Sets the joint friction coefficient, which applies to all joint axes.voidsetJointPosition(PxArticulationAxisEnum axis, float jointPos) Sets the joint position for the given axis.voidsetJointType(PxArticulationJointTypeEnum jointType) Sets the joint type (e.g.voidsetJointVelocity(PxArticulationAxisEnum axis, float jointVel) Sets the joint velocity for the given axis.voidsetLimitParams(PxArticulationAxisEnum axis, PxArticulationLimit limit) Sets the joint limits for a given axis.voidsetMaxJointVelocity(float maxJointV) Sets the maximal joint velocity enforced for all axes.voidsetMotion(PxArticulationAxisEnum axis, PxArticulationMotionEnum motion) Sets the joint motion for a given axis.voidsetParentPose(PxTransform pose) Sets the joint pose in the parent link actor frame.wrapPointer(long address) Methods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxArticulationJointReducedCoordinate
protected PxArticulationJointReducedCoordinate() -
PxArticulationJointReducedCoordinate
protected PxArticulationJointReducedCoordinate(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getParentArticulationLink
Gets the parent articulation link of this joint.- Returns:
- The parent link.
-
setParentPose
Sets the joint pose in the parent link actor frame.- Parameters:
pose- The joint pose. Default: The identity transform.Note: This call is not allowed while the simulation is running.
- See Also:
-
getParentPose
Gets the joint pose in the parent link actor frame.- Returns:
- The joint pose.
- See Also:
-
getChildArticulationLink
Gets the child articulation link of this joint.- Returns:
- The child link.
-
setChildPose
Sets the joint pose in the child link actor frame.- Parameters:
pose- The joint pose. Default: The identity transform.Note: This call is not allowed while the simulation is running.
- See Also:
-
getChildPose
Gets the joint pose in the child link actor frame.- Returns:
- The joint pose.
- See Also:
-
setJointType
Sets the joint type (e.g. revolute).- Parameters:
jointType- The joint type to set.Note: Setting the joint type is not allowed while the articulation is in a scene. In order to amend the joint type, remove and then re-add the articulation to the scene.
Default: PxArticulationJointType::eUNDEFINED
- See Also:
-
getJointType
Gets the joint type.- Returns:
- The joint type.
- See Also:
-
setMotion
Sets the joint motion for a given axis.- Parameters:
axis- The target axis.motion- The motion type to set.Note: Setting the motion of joint axes is not allowed while the articulation is in a scene. In order to set the motion, remove and then re-add the articulation to the scene.
Default: PxArticulationMotion::eLOCKED
- See Also:
-
getMotion
Returns the joint motion for the given axis.- Parameters:
axis- The target axis.- Returns:
- The joint motion of the given axis.
- See Also:
-
setLimitParams
Sets the joint limits for a given axis.- The motion of the corresponding axis should be set to PxArticulationMotion::eLIMITED in order for the limits to be enforced. - The lower limit should be strictly smaller than the higher limit. If the limits should be equal, use PxArticulationMotion::eLOCKED and an appropriate offset in the parent/child joint frames.
- Parameters:
axis- The target axis.limit- The joint limits.Note: This call is not allowed while the simulation is running.
Note: For PxArticulationJointType::eSPHERICAL, limit.min and limit.max must both be in range [-Pi, Pi]. Note: For PxArticulationJointType::eREVOLUTE, limit.min and limit.max must both be in range [-2*Pi, 2*Pi]. Note: For PxArticulationJointType::eREVOLUTE_UNWRAPPED, limit.min and limit.max must both be in range [-PX_MAX_REAL, PX_MAX_REAL]. Note: For PxArticulationJointType::ePRISMATIC, limit.min and limit.max must both be in range [-PX_MAX_REAL, PX_MAX_REAL].
Default: (0,0)
- See Also:
-
getLimitParams
Returns the joint limits for a given axis.- Parameters:
axis- The target axis.- Returns:
- The joint limits.
- See Also:
-
setDriveParams
Configures a joint drive for the given axis.See PxArticulationDrive for parameter details; and the manual for further information, and the drives' implicit spring-damper (i.e. PD control) implementation in particular.
- Parameters:
axis- The target axis.drive- The drive parametersNote: This call is not allowed while the simulation is running.
- See Also:
-
setDriveTarget
Sets the joint drive position target for the given axis.The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.
- Parameters:
axis- The target axis.target- The target position. to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call is not allowed while the simulation is running.
Note: For spherical joints, target must be in range [-Pi, Pi].
Note: The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).
Note: For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation. The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.
- See Also:
-
setDriveTarget
Sets the joint drive position target for the given axis.The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.
- Parameters:
axis- The target axis.target- The target position.autowake- If true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call is not allowed while the simulation is running.
Note: For spherical joints, target must be in range [-Pi, Pi].
Note: The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).
Note: For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation. The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.
- See Also:
-
getDriveTarget
Returns the joint drive position target for the given axis.- Parameters:
axis- The target axis.- Returns:
- The target position.
- See Also:
-
setDriveVelocity
Sets the joint drive velocity target for the given axis.The target units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
- Parameters:
axis- The target axis.targetVel- The target velocity. to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call is not allowed while the simulation is running.
- See Also:
-
setDriveVelocity
Sets the joint drive velocity target for the given axis.The target units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
- Parameters:
axis- The target axis.targetVel- The target velocity.autowake- If true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call is not allowed while the simulation is running.
- See Also:
-
getDriveVelocity
Returns the joint drive velocity target for the given axis.- Parameters:
axis- The target axis.- Returns:
- The target velocity.
- See Also:
-
setArmature
Sets the joint armature for the given axis.- The armature is directly added to the joint-space spatial inertia of the corresponding axis. - The armature is in mass units for a prismatic (i.e. linear) joint, and in mass units * (scene linear units)^2 for a rotational joint.
- Parameters:
axis- The target axis.armature- The joint axis armature.Note: This call is not allowed while the simulation is running.
- See Also:
-
getArmature
Gets the joint armature for the given axis.- Parameters:
axis- The target axis.- Returns:
- The armature set on the given axis.
- See Also:
-
setFrictionCoefficient
public void setFrictionCoefficient(float coefficient) Sets the joint friction coefficient, which applies to all joint axes.- The joint friction is unitless and relates the magnitude of the spatial force [F_trans, T_trans] transmitted from parent to child link to the maximal friction force F_resist that may be applied by the solver to resist joint motion, per axis; i.e. |F_resist| <= coefficient * (|F_trans| + |T_trans|), where F_resist may refer to a linear force or torque depending on the joint axis. - The simulated friction effect is therefore similar to static and Coulomb friction. In order to simulate dynamic joint friction, use a joint drive with zero stiffness and zero velocity target, and an appropriately dimensioned damping parameter.
- Parameters:
coefficient- The joint friction coefficient.Note: This call is not allowed while the simulation is running.
- See Also:
-
getFrictionCoefficient
public float getFrictionCoefficient()Gets the joint friction coefficient.- Returns:
- The joint friction coefficient.
- See Also:
-
setMaxJointVelocity
public void setMaxJointVelocity(float maxJointV) Sets the maximal joint velocity enforced for all axes.- The solver will apply appropriate joint-space impulses in order to enforce the per-axis joint-velocity limit. - The velocity units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
- Parameters:
maxJointV- The maximal per-axis joint velocity.Note: This call is not allowed while the simulation is running.
- See Also:
-
getMaxJointVelocity
public float getMaxJointVelocity()Gets the maximal joint velocity enforced for all axes.- Returns:
- The maximal per-axis joint velocity.
- See Also:
-
setJointPosition
Sets the joint position for the given axis.- For performance, prefer PxArticulationCache::jointPosition to set joint positions in a batch articulation state update. - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
axis- The target axis.jointPos- The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.Note: This call is not allowed while the simulation is running.
Note: For PxArticulationJointType::eSPHERICAL, jointPos must be in range [-Pi, Pi]. Note: For PxArticulationJointType::eREVOLUTE, jointPos must be in range [-2*Pi, 2*Pi]. Note: For PxArticulationJointType::eREVOLUTE_UNWRAPPED, jointPos must be in range [-PX_MAX_REAL, PX_MAX_REAL]. Note: For PxArticulationJointType::ePRISMATIC, jointPos must be in range [-PX_MAX_REAL, PX_MAX_REAL].
Note: Joint position is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the parent and child links will be given poses that obey Gp * Lp * J = Gc * Lc with J denoting the joint pose. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistPos, swing1Pos, swing2Pos))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(xPos, yPos, zPos), PxQuat(PxIdentity)).
Note: For spherical joints with more than 1 degree of freedom, the input joint positions taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint positions is not the shortest path rotation. The joint pose J that is the outcome of setting and applying the joint positions will always be the equivalent of the shortest path rotation.
Default: 0.0
-
getJointPosition
Gets the joint position for the given axis, i.e. joint degree of freedom (DOF).For performance, prefer PxArticulationCache::jointPosition to get joint positions in a batch query.
- Parameters:
axis- The target axis.- Returns:
- The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.
Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
-
setJointVelocity
Sets the joint velocity for the given axis.- For performance, prefer PxArticulationCache::jointVelocity to set joint velocities in a batch articulation state update. - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
axis- The target axis.jointVel- The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.Note: This call is not allowed while the simulation is running.
Default: 0.0
-
getJointVelocity
Gets the joint velocity for the given axis.For performance, prefer PxArticulationCache::jointVelocity to get joint velocities in a batch query.
- Parameters:
axis- The target axis.- Returns:
- The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
-