Public Member Functions | Public Attributes | Protected Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for PxActor:
Collaboration graph
[legend]

Public Member Functions

virtual void release ()=0
 Deletes the actor. More...
 
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor. More...
 
PX_DEPRECATED PX_INLINE
PxRigidStatic
isRigidStatic ()
 Attempts to cast to specific actor type. More...
 
PX_DEPRECATED PX_INLINE const
PxRigidStatic
isRigidStatic () const
 
PX_DEPRECATED PX_INLINE
PxRigidDynamic
isRigidDynamic ()
 
PX_DEPRECATED PX_INLINE const
PxRigidDynamic
isRigidDynamic () const
 
PX_DEPRECATED PX_INLINE
PxParticleSystem
isParticleSystem ()
 
PX_DEPRECATED PX_INLINE const
PxParticleSystem
isParticleSystem () const
 
PX_DEPRECATED PX_INLINE
PxParticleFluid
isParticleFluid ()
 
PX_DEPRECATED PX_INLINE const
PxParticleFluid
isParticleFluid () const
 
PX_DEPRECATED PX_INLINE
PxArticulationLink
isArticulationLink ()
 
PX_DEPRECATED PX_INLINE const
PxArticulationLink
isArticulationLink () const
 
PX_DEPRECATED PX_INLINE PxClothisCloth ()
 
PX_DEPRECATED PX_INLINE const
PxCloth
isCloth () const
 
PX_DEPRECATED PX_INLINE
PxRigidActor
isRigidActor ()
 
PX_DEPRECATED PX_INLINE const
PxRigidActor
isRigidActor () const
 
PX_DEPRECATED PX_INLINE
PxRigidBody
isRigidBody ()
 
PX_DEPRECATED PX_INLINE const
PxRigidBody
isRigidBody () const
 
PX_DEPRECATED PX_INLINE
PxParticleBase
isParticleBase ()
 
PX_DEPRECATED PX_INLINE const
PxParticleBase
isParticleBase () const
 
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 void setClientBehaviorFlags (PxActorClientBehaviorFlags)=0
 Sets the behavior bits of the actor. More...
 
virtual PxActorClientBehaviorFlags getClientBehaviorFlags () const =0
 Retrieves the behavior bits of the actor. 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
 Returns string name of dynamic type. More...
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_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

PX_INLINE PxActor::PxActor ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected
PX_INLINE PxActor::PxActor ( PxBaseFlags  baseFlags)
inlineprotected
virtual PxActor::~PxActor ( )
inlineprotectedvirtual

Member Function Documentation

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()
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
virtual PxActorClientBehaviorFlags PxActor::getClientBehaviorFlags ( ) const
pure virtual

Retrieves the behavior bits of the actor.

The behavior bits determine which types of events the actor will broadcast to foreign clients.

See Also
PxActorClientBehaviorFlag setClientBehaviorFlags()
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()
virtual const char* PxActor::getName ( ) const
pure virtual

Retrieves the name string set with setName().

Returns
Name string associated with object.
See Also
setName()
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()
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
virtual PxActorType::Enum PxActor::getType ( ) const
pure virtual

Retrieves the type of actor.

Returns
The actor type of the actor.
See Also
PxActorType
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

Implemented in PxCloth.

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 PxCloth, PxRigidBody, PxParticleBase, PxRigidDynamic, PxRigidActor, PxParticleFluid, PxArticulationLink, PxParticleSystem, and PxRigidStatic.

References PxBase::isKindOf().

Referenced by PxRigidActor::isKindOf(), PxParticleBase::isKindOf(), and PxCloth::isKindOf().

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 PxCloth, PxRigidActor, and PxArticulationLink.

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()
virtual void PxActor::setActorFlags ( PxActorFlags  inFlags)
pure virtual

sets the actor flags

See the list of flags PxActorFlag

See Also
PxActorFlag setActorFlag()
virtual void PxActor::setClientBehaviorFlags ( PxActorClientBehaviorFlags  )
pure virtual

Sets the behavior bits of the actor.

The behavior bits determine which types of events the actor will broadcast to foreign clients. The actor will always send notice for all possible events to its own owner client. By default it will not send any events to any other clients. If the user however raises a bit flag for any event type using this function, that event will then be sent also to any other clients which are programmed to listed to foreign actor events of that type.

Default: 0

See Also
PxClientID PxActorClientBehaviorFlag PxScene::setClientBehaviorFlags()
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()
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()
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

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 files:


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com