- Direct Known Subclasses:
PxParticleSystem,PxRigidActor
The actor is owned by and contained in a PxScene.
-
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 PxActorarrayGet(long baseAddress, int index) Reads the PxActor flags.byteRetrieves the value set with setDominanceGroup().getName()Retrieves the name string set with setName().byteReturns the owner client that was specified at creation time.getScene()Retrieves the scene which this actor belongs to.getType()Retrieves the type of actor.user can assign this to whatever, usually to create a 1:1 relationship with a user object.Retrieves the axis aligned bounding box enclosing the actor.getWorldBounds(float inflation) Retrieves the axis aligned bounding box enclosing the actor.voidsetActorFlag(PxActorFlagEnum flag, boolean value) Raises or clears a particular actor flag.voidsetActorFlags(PxActorFlags flags) Sets the actor flags.voidsetDominanceGroup(byte dominanceGroup) Assigns dynamic actors a dominance group identifier.voidSets a name string for the object that can be retrieved with getName().voidsetOwnerClient(byte inClient) Sets the owner client of an actor.voidsetUserData(NativeObject value) user can assign this to whatever, usually to create a 1:1 relationship with a user object.static PxActorwrapPointer(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
-
PxActor
protected PxActor() -
PxActor
protected PxActor(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. -
getType
Retrieves the type of actor.- Returns:
- The actor type of the actor.
-
getScene
Retrieves the scene which this actor belongs to.- Returns:
- Owner Scene. NULL if not part of a scene.
- See Also:
-
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.Default: NULL
- See Also:
-
getName
Retrieves the name string set with setName().- Returns:
- Name string associated with object.
- See Also:
-
getWorldBounds
Retrieves the axis aligned bounding box enclosing the actor.Note: It is not allowed to use this method while the simulation is running (except during PxScene::collide(), in PxContactModifyCallback or in contact report callbacks).
- Returns:
- The actor's bounding box.
- See Also:
-
getWorldBounds
Retrieves the axis aligned bounding box enclosing the actor.Note: It is not allowed to use this method while the simulation is running (except during PxScene::collide(), in PxContactModifyCallback or in contact report callbacks).
- Parameters:
inflation- Scale factor for computed world bounds. Box extents are multiplied by this value.- Returns:
- The actor's bounding box.
- See Also:
-
setActorFlag
Raises or clears a particular actor flag.See the list of flags #PxActorFlag
Sleeping: Does NOT wake the actor up automatically.
- Parameters:
flag- The PxActor flag to raise(set) or clear. See #PxActorFlag.value- The boolean value to assign to the flag.- See Also:
-
setActorFlags
Sets the actor flags.See the list of flags #PxActorFlag
-
getActorFlags
Reads the PxActor flags.See the list of flags #PxActorFlag
- Returns:
- The values of the PxActor flags.
- See Also:
-
setDominanceGroup
public void setDominanceGroup(byte dominanceGroup) Assigns dynamic actors a dominance group identifier.PxDominanceGroup is a 5 bit group identifier (legal range from 0 to 31).
The PxScene::setDominanceGroupPair() lets you set certain behaviors for pairs of dominance groups. By default every dynamic actor is created in group 0.
Default: 0
Sleeping: Changing the dominance group does NOT wake the actor up automatically.
- Parameters:
dominanceGroup- The dominance group identifier. Range: [0..31]- See Also:
-
getDominanceGroup
public byte getDominanceGroup()Retrieves the value set with setDominanceGroup().- Returns:
- The dominance group of this actor.
- See Also:
-
setOwnerClient
public void setOwnerClient(byte inClient) Sets the owner client of an actor.This cannot be done once the actor has been placed into a scene.
Default: PX_DEFAULT_CLIENT
-
getOwnerClient
public byte getOwnerClient()Returns the owner client that was specified at creation time.This value cannot be changed once the object is placed into the scene.
-