- Direct Known Subclasses:
PxD6Joint,PxDistanceJoint,PxFixedJoint,PxGearJoint,PxPrismaticJoint,PxRackAndPinionJoint,PxRevoluteJoint,PxSphericalJoint
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxJointarrayGet(long baseAddress, int index) Retrieves the PxConstraint corresponding to this joint.get the constraint flags for this joint.floatget the inverse mass scale for actor0.floatget the inverse mass scale for actor1.get the joint local pose for an actor.getName()Retrieves the name string set with setName().get the relative angular velocity of the jointget the relative linear velocity of the jointget the relative pose for this jointgetScene()Retrieves the scene which this joint belongs to.user can assign this to whatever, usually to create a 1:1 relationship with a user object.voidsetActors(PxRigidActor actor0, PxRigidActor actor1) Set the actors for this joint.voidsetBreakForce(float force, float torque) set the break force for this joint.voidsetConstraintFlag(PxConstraintFlagEnum flag, boolean value) set a constraint flags for this joint to a specified value.voidset the constraint flags for this joint.voidsetInvMassScale0(float invMassScale) set the inverse mass scale for actor0.voidsetInvMassScale1(float invMassScale) set the inverse mass scale for actor1.voidsetLocalPose(PxJointActorIndexEnum actor, PxTransform localPose) Set the joint local pose for an actor.voidSets a name string for the object that can be retrieved with getName().voidsetUserData(NativeObject value) user can assign this to whatever, usually to create a 1:1 relationship with a user object.static PxJointwrapPointer(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
-
PxJoint
protected PxJoint() -
PxJoint
protected PxJoint(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getUserData
user can assign this to whatever, usually to create a 1:1 relationship with a user object. -
setUserData
user can assign this to whatever, usually to create a 1:1 relationship with a user object. -
setActors
Set the actors for this joint.An actor may be NULL to indicate the world frame. At most one of the actors may be NULL.
- Parameters:
actor0- the first actor.actor1- the second actor
-
setLocalPose
Set the joint local pose for an actor.This is the relative pose which locates the joint frame relative to the actor.
- Parameters:
actor- 0 for the first actor, 1 for the second actor.localPose- the local pose for the actor this joint- See Also:
-
getLocalPose
get the joint local pose for an actor.- Parameters:
actor- 0 for the first actor, 1 for the second actor.return the local pose for this joint
- See Also:
-
getRelativeTransform
get the relative pose for this jointThis function returns the pose of the joint frame of actor1 relative to actor0
-
getRelativeLinearVelocity
get the relative linear velocity of the jointThis function returns the linear velocity of the origin of the constraint frame of actor1, relative to the origin of the constraint frame of actor0. The value is returned in the constraint frame of actor0
-
getRelativeAngularVelocity
get the relative angular velocity of the jointThis function returns the angular velocity of actor1 relative to actor0. The value is returned in the constraint frame of actor0
-
setBreakForce
public void setBreakForce(float force, float torque) set the break force for this joint.if the constraint force or torque on the joint exceeds the specified values, the joint will break, at which point it will not constrain the two actors and the flag PxConstraintFlag::eBROKEN will be set. The force and torque are measured in the joint frame of the first actor
- Parameters:
force- the maximum force the joint can apply before breakingtorque- the maximum torque the joint can apply before breaking
-
setConstraintFlags
set the constraint flags for this joint.- Parameters:
flags- the constraint flags
-
setConstraintFlag
set a constraint flags for this joint to a specified value.- Parameters:
flag- the constraint flagvalue- the value to which to set the flag
-
getConstraintFlags
get the constraint flags for this joint.- Returns:
- the constraint flags
-
setInvMassScale0
public void setInvMassScale0(float invMassScale) set the inverse mass scale for actor0.- Parameters:
invMassScale- the scale to apply to the inverse mass of actor 0 for resolving this constraint- See Also:
-
getInvMassScale0
public float getInvMassScale0()get the inverse mass scale for actor0.- Returns:
- inverse mass scale for actor0
- See Also:
-
setInvMassScale1
public void setInvMassScale1(float invMassScale) set the inverse mass scale for actor1.- Parameters:
invMassScale- the scale to apply to the inverse mass of actor 1 for resolving this constraint- See Also:
-
getInvMassScale1
public float getInvMassScale1()get the inverse mass scale for actor1.- Returns:
- inverse mass scale for actor1
- See Also:
-
getConstraint
Retrieves the PxConstraint corresponding to this joint.This can be used to determine, among other things, the force applied at the joint.
- Returns:
- the constraint
-
setName
Sets a name string for the object that can be retrieved with getName().This is for debugging and is not used by the SDK. The string is not copied by the SDK, only the pointer is stored.
- Parameters:
name- String to set the objects name to.- See Also:
-
getName
Retrieves the name string set with setName().- Returns:
- Name string associated with object.
- See Also:
-
getScene
Retrieves the scene which this joint belongs to.- Returns:
- Owner Scene. NULL if not part of a scene.
- See Also:
-