PxActor Class Referenceabstract

PxActor is the base class for the main simulation objects in the physics SDK. More...

#include <PxActor.h>

Inheritance diagram for PxActor:
Collaboration diagram for PxActor:

Public Member Functions

virtual void release ()=0
 Deletes the actor. More...
 
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor. More...
 
virtual PxScenegetScene () const =0
 Retrieves the scene which this actor belongs to. More...
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName(). More...
 
virtual const char * getName () const =0
 Retrieves the name string set with setName(). More...
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const =0
 Retrieves the axis aligned bounding box enclosing the actor. More...
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value)=0
 Raises or clears a particular actor flag. More...
 
virtual void setActorFlags (PxActorFlags inFlags)=0
 sets the actor flags More...
 
virtual PxActorFlags getActorFlags () const =0
 Reads the PxActor flags. More...
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup)=0
 Assigns dynamic actors a dominance group identifier. More...
 
virtual PxDominanceGroup getDominanceGroup () const =0
 Retrieves the value set with setDominanceGroup(). More...
 
virtual void setOwnerClient (PxClientID inClient)=0
 Sets the owner client of an actor. More...
 
virtual PxClientID getOwnerClient () const =0
 Returns the owner client that was specified with at creation time. More...
 
virtual PxAggregategetAggregate () const =0
 Retrieves the aggregate the actor might be a part of. More...
 
- Public Member Functions inherited from PxBase
virtual const char * getConcreteTypeName () const =0
 Returns string name of dynamic type. More...
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Public Attributes

void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object. More...
 

Protected Member Functions

PX_INLINE PxActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxActor (PxBaseFlags baseFlags)
 
virtual ~PxActor ()
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 
- Protected Member Functions inherited from PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags. More...
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags. More...
 
virtual ~PxBase ()
 Destructor. More...
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

Detailed Description

PxActor is the base class for the main simulation objects in the physics SDK.

The actor is owned by and contained in a PxScene.

Constructor & Destructor Documentation

◆ PxActor() [1/2]

PX_INLINE PxActor::PxActor ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected

◆ PxActor() [2/2]

PX_INLINE PxActor::PxActor ( PxBaseFlags  baseFlags)
inlineprotected

◆ ~PxActor()

virtual PxActor::~PxActor ( )
inlineprotectedvirtual

Member Function Documentation

◆ getActorFlags()

virtual PxActorFlags PxActor::getActorFlags ( ) const
pure virtual

Reads the PxActor flags.

See the list of flags PxActorFlag

Returns
The values of the PxActor flags.
See also
PxActorFlag setActorFlag()

◆ getAggregate()

virtual PxAggregate* PxActor::getAggregate ( ) const
pure virtual

Retrieves the aggregate the actor might be a part of.

Returns
The aggregate the actor is a part of, or NULL if the actor does not belong to an aggregate.
See also
PxAggregate

◆ getDominanceGroup()

virtual PxDominanceGroup PxActor::getDominanceGroup ( ) const
pure virtual

Retrieves the value set with setDominanceGroup().

Returns
The dominance group of this actor.
See also
setDominanceGroup() PxDominanceGroup PxScene::setDominanceGroupPair()

◆ getName()

virtual const char* PxActor::getName ( ) const
pure virtual

Retrieves the name string set with setName().

Returns
Name string associated with object.
See also
setName()

◆ getOwnerClient()

virtual PxClientID PxActor::getOwnerClient ( ) const
pure virtual

Returns the owner client that was specified with at creation time.

This value cannot be changed once the object is placed into the scene.

See also
PxClientID PxScene::createClient()

◆ getScene()

virtual PxScene* PxActor::getScene ( ) const
pure virtual

Retrieves the scene which this actor belongs to.

Returns
Owner Scene. NULL if not part of a scene.
See also
PxScene

◆ getType()

virtual PxActorType::Enum PxActor::getType ( ) const
pure virtual

Retrieves the type of actor.

Returns
The actor type of the actor.
See also
PxActorType

◆ getWorldBounds()

virtual PxBounds3 PxActor::getWorldBounds ( float  inflation = 1.01f) const
pure virtual

Retrieves the axis aligned bounding box enclosing the actor.

Parameters
[in]inflationScale factor for computed world bounds. Box extents are multiplied by this value.
Returns
The actor's bounding box.
See also
PxBounds3

◆ isKindOf()

virtual bool PxActor::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

Returns whether a given type name matches with the type of this instance.

Reimplemented from PxBase.

Reimplemented in PxRigidBody, PxRigidDynamic, PxRigidActor, PxArticulationLink, and PxRigidStatic.

References PxBase::isKindOf().

Referenced by PxRigidActor::isKindOf().

◆ release()

virtual void PxActor::release ( )
pure virtual

Deletes the actor.

Do not keep a reference to the deleted instance.

If the actor belongs to a PxAggregate object, it is automatically removed from the aggregate.

See also
PxBase.release(), PxAggregate

Implements PxBase.

Implemented in PxRigidActor, and PxArticulationLink.

◆ setActorFlag()

virtual void PxActor::setActorFlag ( PxActorFlag::Enum  flag,
bool  value 
)
pure virtual

Raises or clears a particular actor flag.

See the list of flags PxActorFlag

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]flagThe PxActor flag to raise(set) or clear. See PxActorFlag.
[in]valueThe boolean value to assign to the flag.

Default: PxActorFlag::eVISUALIZATION

See also
PxActorFlag getActorFlags()

◆ setActorFlags()

virtual void PxActor::setActorFlags ( PxActorFlags  inFlags)
pure virtual

sets the actor flags

See the list of flags PxActorFlag

See also
PxActorFlag setActorFlag()

◆ setDominanceGroup()

virtual void PxActor::setDominanceGroup ( PxDominanceGroup  dominanceGroup)
pure virtual

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
[in]dominanceGroupThe dominance group identifier. Range: [0..31]
See also
getDominanceGroup() PxDominanceGroup PxScene::setDominanceGroupPair()

◆ setName()

virtual void PxActor::setName ( const char *  name)
pure virtual

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
[in]nameString to set the objects name to.

Default: NULL

See also
getName()

◆ setOwnerClient()

virtual void PxActor::setOwnerClient ( PxClientID  inClient)
pure virtual

Sets the owner client of an actor.

This cannot be done once the actor has been placed into a scene.

Default: PX_DEFAULT_CLIENT

See also
PxClientID PxScene::createClient()

Member Data Documentation

◆ userData

void* PxActor::userData

user can assign this to whatever, usually to create a 1:1 relationship with a user object.


The documentation for this class was generated from the following file: