Public Member Functions | Protected Member Functions
physx::apex::NxDestructibleActor Class Reference

#include <NxDestructibleActor.h>

List of all members.

Public Member Functions

virtual const NxRenderMeshActor * getRenderMeshActor (NxDestructibleActorMeshType::Enum type=NxDestructibleActorMeshType::Skinned) const =0
virtual const
NxDestructibleParameters
getDestructibleParameters () const =0
virtual void setDestructibleParameters (const NxDestructibleParameters &destructibleParameters)=0
virtual physx::PxMat44 getInitialGlobalPose () const =0
virtual void setInitialGlobalPose (const physx::PxMat44 &pose)=0
virtual physx::PxVec3 getScale () const =0
virtual bool isInitiallyDynamic () const =0
virtual void getChunkVisibilities (physx::PxU8 *visibilityArray, physx::PxU32 visibilityArraySize) const =0
virtual physx::PxU32 getNumVisibleChunks () const =0
virtual const physx::PxU16 * getVisibleChunks () const =0
virtual bool acquireChunkEventBuffer (const physx::NxDestructibleChunkEvent *&buffer, physx::PxU32 &bufferSize)=0
virtual bool releaseChunkEventBuffer (bool clearBuffer=true)=0
virtual bool releasePhysXActorBuffer ()=0
virtual physx::PxMat44 getChunkPose (physx::PxU32 chunkIndex) const =0
virtual physx::PxVec3 getChunkLinearVelocity (physx::PxU32 chunkIndex) const =0
virtual physx::PxVec3 getChunkAngularVelocity (physx::PxU32 chunkIndex) const =0
virtual const physx::PxMat44 getChunkTM (physx::PxU32 chunkIndex) const =0
virtual physx::PxI32 getBehaviorGroupIndex (physx::PxU32 chunkIndex) const =0
virtual void setGlobalPose (const physx::PxMat44 &pose)=0
virtual bool getGlobalPose (physx::PxMat44 &pose)=0
virtual void setLinearVelocity (const physx::PxVec3 &linearVelocity)=0
virtual void setAngularVelocity (const physx::PxVec3 &angularVelocity)=0
virtual void setDynamic (physx::PxI32 chunkIndex=NxModuleDestructibleConst::INVALID_CHUNK_INDEX)=0
virtual bool isDynamic (physx::PxU32 chunkIndex) const =0
virtual void enableHardSleeping ()=0
virtual void disableHardSleeping (bool wake=false)=0
virtual bool isHardSleepingEnabled () const =0
virtual void setSkinnedOverrideMaterial (PxU32 submeshIndex, const char *overrideMaterialName)=0
virtual void setStaticOverrideMaterial (PxU32 submeshIndex, const char *overrideMaterialName)=0
virtual void setRuntimeFractureOverridePattern (const char *overridePatternName)=0
virtual void applyDamage (physx::PxF32 damage, physx::PxF32 momentum, const physx::PxVec3 &position, const physx::PxVec3 &direction, physx::PxI32 chunkIndex=NxModuleDestructibleConst::INVALID_CHUNK_INDEX, void *userData=NULL)=0
virtual void applyRadiusDamage (physx::PxF32 damage, physx::PxF32 momentum, const physx::PxVec3 &position, physx::PxF32 radius, bool falloff, void *userData=NULL)=0
virtual physx::PxI32 rayCast (physx::PxF32 &time, physx::PxVec3 &normal, const NxRay &worldRay, NxDestructibleActorRaycastFlags::Enum flags, physx::PxI32 parentChunkIndex=NxModuleDestructibleConst::INVALID_CHUNK_INDEX) const =0
virtual physx::PxI32 rayCast (physx::PxF32 &time, physx::PxVec3 &normal, const PxVec3 &worldRayOrig, const PxVec3 &worldRayDir, NxDestructibleActorRaycastFlags::Enum flags, physx::PxI32 parentChunkIndex=NxModuleDestructibleConst::INVALID_CHUNK_INDEX) const =0
virtual physx::PxI32 obbSweep (physx::PxF32 &time, physx::PxVec3 &normal, const NxBox &worldBox, const physx::PxVec3 &worldDisplacement, NxDestructibleActorRaycastFlags::Enum flags) const =0
virtual physx::PxI32 obbSweep (physx::PxF32 &time, physx::PxVec3 &normal, const physx::PxVec3 &worldBoxCenter, const physx::PxVec3 &worldBoxExtents, const physx::PxMat33 &worldBoxRot, const physx::PxVec3 &worldDisplacement, NxDestructibleActorRaycastFlags::Enum flags) const =0
virtual void setLODWeights (physx::PxF32 maxDistance, physx::PxF32 distanceWeight, physx::PxF32 maxAge, physx::PxF32 ageWeight, physx::PxF32 bias)=0
virtual void setCrumbleEmitterState (bool enable)=0
virtual void setDustEmitterState (bool enable)=0
virtual void setPreferredRenderVolume (NxApexRenderVolume *volume, NxDestructibleEmitterType::Enum type)=0
virtual NxApexEmitterActor * getApexEmitter (NxDestructibleEmitterType::Enum type)=0
virtual bool recreateApexEmitter (NxDestructibleEmitterType::Enum type)=0
virtual const
::NxParameterized::Interface * 
getNxParameterized (NxDestructibleParameterizedType::Enum type=NxDestructibleParameterizedType::State) const =0
 Returns the actor's NxParamaterized interface This cannot be directly modified! It is read only to the user. This handle can be used to directly serialize the complete actor state.
virtual void setNxParameterized (::NxParameterized::Interface *)=0
 Sets the actor's state via the NxParameterized object This can be used to update the state from deserialized data. The actor assumes control of the interface.
virtual bool setSyncParams (physx::PxU32 userActorID, physx::PxU32 actorSyncFlags=0, const NxDestructibleActorSyncState *actorSyncState=NULL, const NxDestructibleChunkSyncState *chunkSyncState=NULL)=0
virtual bool setHitChunkTrackingParams (bool flushHistory, bool startTracking, physx::PxU32 trackingDepth, bool trackAllChunks=true)=0
virtual bool getHitChunkHistory (const NxDestructibleHitChunk *&hitChunkContainer, physx::PxU32 &hitChunkCount) const =0
virtual bool forceChunkHits (const NxDestructibleHitChunk *hitChunkContainer, physx::PxU32 hitChunkCount, bool removeChunks=true, bool deferredEvent=false, physx::PxVec3 damagePosition=physx::PxVec3(0.0f), physx::PxVec3 damageDirection=physx::PxVec3(0.0f))=0
virtual bool getDamageColoringHistory (const NxDamageEventCoreData *&damageEventCoreDataContainer, physx::PxU32 &damageEventCoreDataCount) const =0
virtual bool forceDamageColoring (const NxDamageEventCoreData *damageEventCoreDataContainer, physx::PxU32 damageEventCoreDataCount)=0
virtual physx::PxBounds3 getLocalBounds () const =0
virtual physx::PxBounds3 getOriginalBounds () const =0
virtual bool isChunkSolitary (physx::PxI32 chunkIndex) const =0
virtual physx::PxBounds3 getChunkBounds (physx::PxU32 chunkIndex) const =0
virtual physx::PxBounds3 getChunkLocalBounds (physx::PxU32 chunkIndex) const =0
virtual bool isChunkDestroyed (physx::PxI32 chunkIndex) const =0
virtual physx::PxU32 getSupportDepthChunkIndices (physx::PxU32 *const OutChunkIndices, physx::PxU32 MaxOutIndices) const =0
virtual physx::PxU32 getSupportDepth () const =0
virtual void setDeleteFracturedChunks (bool inDeleteChunkMode)=0
virtual NxDestructibleRenderableacquireRenderableReference ()=0
virtual physx::PxU32 getCustomBehaviorGroupCount () const =0
virtual bool getBehaviorGroup (physx::NxDestructibleBehaviorGroupDesc &behaviorGroupDesc, physx::PxI32 index=-1) const =0

Protected Member Functions

virtual ~NxDestructibleActor ()

Detailed Description

Destructible actor API. The destructible actor is instanced from an NxDestructibleAsset.


Constructor & Destructor Documentation

virtual physx::apex::NxDestructibleActor::~NxDestructibleActor ( ) [inline, protected, virtual]

Member Function Documentation

virtual bool physx::apex::NxDestructibleActor::acquireChunkEventBuffer ( const physx::NxDestructibleChunkEvent *&  buffer,
physx::PxU32 &  bufferSize 
) [pure virtual]

Locks the chunk event buffer, and (if successful) returns the head of the chunk event buffer in the buffer field and the length of the buffer (the number of events) in the bufferSize field. To unlock the buffer, use releaseChunkEventBuffer(). See NxDestructibleChunkEvent. This buffer is filled with chunk events if the NxDestructibleActor parameter createChunkEvents is set to true. This buffer is not automatically cleared by APEX. The user must clear it using releaseChunkEventBuffer(true). Returns true if successful, false otherwise.

virtual NxDestructibleRenderable* physx::apex::NxDestructibleActor::acquireRenderableReference ( ) [pure virtual]

Acquire a pointer to the destructible's renderable proxy and increment its reference count. The NxDestructibleRenderable will only be deleted when its reference count is zero. Calls to NxDestructibleRenderable::release decrement the reference count, as does a call to NxDestructibleActor::release(). .

virtual void physx::apex::NxDestructibleActor::applyDamage ( physx::PxF32  damage,
physx::PxF32  momentum,
const physx::PxVec3 &  position,
const physx::PxVec3 &  direction,
physx::PxI32  chunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX,
void *  userData = NULL 
) [pure virtual]

Damage Apply damage at a point. Damage will be propagated into the destructible based upon its NxDestructibleParameters. damage = the amount of damage at the damage point momentum = the magnitude of the impulse to transfer to the actor position = the damage location direction = direction of impact. This is valid even if momentum = 0, for use in deformation calculations. chunkIndex = which chunk to damage (returned by rayCast and NxModuleDestructible::getDestructibleAndChunk). If chunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX, then the nearest visible chunk hit is found. userData = pointer which will be returned in damage and fracture event callbacks

virtual void physx::apex::NxDestructibleActor::applyRadiusDamage ( physx::PxF32  damage,
physx::PxF32  momentum,
const physx::PxVec3 &  position,
physx::PxF32  radius,
bool  falloff,
void *  userData = NULL 
) [pure virtual]

Apply damage to all chunks within a radius. Damage will also propagate into the destructible based upon its NxDestructibleParameters. damage = the amount of damage at the damage point momentum = the magnitude of the impulse to transfer to each chunk position = the damage location radius = distance from damage location at which chunks will be affected falloff = whether or not to decrease damage with distance from the damage location. If true, damage will decrease linearly from the full damage (at zero distance) to zero damage (at radius). If false, full damage is applied to all chunks within the radius. userData = pointer which will be returned in damage and fracture event callbacks

virtual void physx::apex::NxDestructibleActor::disableHardSleeping ( bool  wake = false) [pure virtual]

See the comments for enableHardSleeping() for a description of this feature. The disableHardSleeping function takes a "wake" parameter, which (if true) will not only turn kinematic-sleeping actors dynamic, but wake them as well.

virtual void physx::apex::NxDestructibleActor::enableHardSleeping ( ) [pure virtual]

If "hard sleeping" is enabled, physx actors for chunk islands that go to sleep will be turned kinematic. If a chunk island has chunks from more than one NxDestructibleActor, then hard sleeping will be used if ANY of the destructibles have hard sleeping enabled.

virtual bool physx::apex::NxDestructibleActor::forceChunkHits ( const NxDestructibleHitChunk hitChunkContainer,
physx::PxU32  hitChunkCount,
bool  removeChunks = true,
bool  deferredEvent = false,
physx::PxVec3  damagePosition = physx::PxVec3(0.0f),
physx::PxVec3  damageDirection = physx::PxVec3(0.0f) 
) [pure virtual]

Force the actor to register chunk hits.

hitChunkContainer should take in an argument that was generated from another destructible actor. See getHitChunkHistory() removeChunks == true indicates that the chunks given by hitChunkContainer will be forcibly removed. deferredEvent = whether to enable deferred event mode. If true, fracture events won't get processed until the next tick. damagePosition and damageDirection: passed through to NxApexDamageEventReportData::hitPosition and hitDirection in the damage notify output by APEX.

virtual bool physx::apex::NxDestructibleActor::forceDamageColoring ( const NxDamageEventCoreData damageEventCoreDataContainer,
physx::PxU32  damageEventCoreDataCount 
) [pure virtual]

Force the actor to register damage coloring.

damageEventCoreDataContainer should take in an argument that was generated from another destructible actor. See getDamageColoringHistory() damageEventCoreDataCount is the count of damageEventCoreDataContainer.

Returns true if the function executes correctly with the given arguments.

virtual NxApexEmitterActor* physx::apex::NxDestructibleActor::getApexEmitter ( NxDestructibleEmitterType::Enum  type) [pure virtual]

Returns the NxApexEmitterActor of either a dust or crumble emitter Note - only crumble emitters are implemented in 1.2.0

virtual bool physx::apex::NxDestructibleActor::getBehaviorGroup ( physx::NxDestructibleBehaviorGroupDesc &  behaviorGroupDesc,
physx::PxI32  index = -1 
) const [pure virtual]

Access to behavior groups created for this actor. Each chunk has a behavior group index associated with it.

This returns the indexed behavior group. The index must be either -1 (for the default group) or in the range [0, getCustomBehaviorGroupCount()-1]. If any other index is given, this function returns false. Otherwise it returns true and the behavior descriptor is filled in.

virtual physx::PxI32 physx::apex::NxDestructibleActor::getBehaviorGroupIndex ( physx::PxU32  chunkIndex) const [pure virtual]

Returns the behavior group index associated with the chunk. Use getBehaviorGroup() to access the behavior group data. The index will either be -1, in which case it is the default behavior group, or in the range [0, getCustomBehaviorGroupCount()-1]. Any of those values is valid for getBehaviorGroup().

virtual physx::PxVec3 physx::apex::NxDestructibleActor::getChunkAngularVelocity ( physx::PxU32  chunkIndex) const [pure virtual]

Returns a chunk's angular velocity in world space. index = the chunk index within the actor

virtual physx::PxBounds3 physx::apex::NxDestructibleActor::getChunkBounds ( physx::PxU32  chunkIndex) const [pure virtual]

Accessor to query the axis aligned bounding box of a given chunk in world-space.

virtual physx::PxVec3 physx::apex::NxDestructibleActor::getChunkLinearVelocity ( physx::PxU32  chunkIndex) const [pure virtual]

Returns a chunk's linear velocity in world space. index = the chunk index within the actor

virtual physx::PxBounds3 physx::apex::NxDestructibleActor::getChunkLocalBounds ( physx::PxU32  chunkIndex) const [pure virtual]

Accessor to query the axis aligned bounding box of a given chunk in chunk local-space.

virtual physx::PxMat44 physx::apex::NxDestructibleActor::getChunkPose ( physx::PxU32  chunkIndex) const [pure virtual]

Returns the PhysX actor associated with the given chunk. Note, more than one chunk may be associated with a given PhysX actor, and chunks from different NxDestructibleActors may even be associated with the same PhysX actor. Caution is recommended when using this function. During APEX scene simulate/fetchResults, this actor may be deleted, replaced, or tampered with. index = the chunk index within the actor Returns a chunk's pose, without scaling. index = the chunk index within the actor

virtual const physx::PxMat44 physx::apex::NxDestructibleActor::getChunkTM ( physx::PxU32  chunkIndex) const [pure virtual]

Returns the transform of the chunk's graphical representation. This may have a scale component. index = the chunk index within the actor

virtual void physx::apex::NxDestructibleActor::getChunkVisibilities ( physx::PxU8 *  visibilityArray,
physx::PxU32  visibilityArraySize 
) const [pure virtual]

Returns an array of visibility data for each chunk. Each byte in the array is 0 if the corresponding chunkIndex is invisible, 1 if visibile. visibilityArray = a pointer to the byte buffer to hold the visibility values. visibilityArraySize = the size of the visibilityArray

virtual physx::PxU32 physx::apex::NxDestructibleActor::getCustomBehaviorGroupCount ( ) const [pure virtual]

Access to behavior groups created for this actor. Each chunk has a behavior group index associated with it.

This returns the number of custom (non-default) behavior groups.

virtual bool physx::apex::NxDestructibleActor::getDamageColoringHistory ( const NxDamageEventCoreData *&  damageEventCoreDataContainer,
physx::PxU32 &  damageEventCoreDataCount 
) const [pure virtual]

Get the damage coloring history of the actor. To start caching damage coloring, see setHitChunkTrackingParams()

Returns true if the function executes correctly with the given arguments.

virtual const NxDestructibleParameters& physx::apex::NxDestructibleActor::getDestructibleParameters ( ) const [pure virtual]

Gets the destructible's NxDestructibleParameter block of parameters. These are initially set from the asset.

virtual bool physx::apex::NxDestructibleActor::getGlobalPose ( physx::PxMat44 &  pose) [pure virtual]

Get the destructible actor's global pose. This will be the pose of the physx NxActor or PxActor for the static chunks in the structure containing this actor, if there are static chunks. If there are no static chunks in the structure, pose will not be modified and false will be returned. Otherwise pose will be filled in with a scale-free transform, and true is returned.

virtual bool physx::apex::NxDestructibleActor::getHitChunkHistory ( const NxDestructibleHitChunk *&  hitChunkContainer,
physx::PxU32 &  hitChunkCount 
) const [pure virtual]

Get the chunk hit history of the actor. To start caching chunk hits, see setHitChunkTrackingParams()

Returns true if the function executes correctly with the given arguments.

virtual physx::PxMat44 physx::apex::NxDestructibleActor::getInitialGlobalPose ( ) const [pure virtual]

Gets the global pose used when the actor is added to the scene, in the NxDestructibleActorDesc

virtual physx::PxBounds3 physx::apex::NxDestructibleActor::getLocalBounds ( ) const [pure virtual]

Accessor to get the initial locally-aligned bounding box of a destructible actor.

virtual physx::PxU32 physx::apex::NxDestructibleActor::getNumVisibleChunks ( ) const [pure virtual]

Returns the number of visible chunks. This is the number of 1's written to the visibilityArray by getChunkVisibilities.

virtual const ::NxParameterized::Interface* physx::apex::NxDestructibleActor::getNxParameterized ( NxDestructibleParameterizedType::Enum  type = NxDestructibleParameterizedType::State) const [pure virtual]

Returns the actor's NxParamaterized interface This cannot be directly modified! It is read only to the user. This handle can be used to directly serialize the complete actor state.

virtual physx::PxBounds3 physx::apex::NxDestructibleActor::getOriginalBounds ( ) const [pure virtual]

Accessor to get the initial world axis-aligned bounding box of a destructible actor.

virtual const NxRenderMeshActor* physx::apex::NxDestructibleActor::getRenderMeshActor ( NxDestructibleActorMeshType::Enum  type = NxDestructibleActorMeshType::Skinned) const [pure virtual]

Get the render mesh actor for the specified mesh type.

virtual physx::PxVec3 physx::apex::NxDestructibleActor::getScale ( ) const [pure virtual]

Gets the destructible actor's 3D (possibly nonuniform) scale

virtual physx::PxU32 physx::apex::NxDestructibleActor::getSupportDepth ( ) const [pure virtual]

Query the actor's support depth.

virtual physx::PxU32 physx::apex::NxDestructibleActor::getSupportDepthChunkIndices ( physx::PxU32 *const  OutChunkIndices,
physx::PxU32  MaxOutIndices 
) const [pure virtual]

Accessor to get the array of chunk indices at the support depth.

virtual const physx::PxU16* physx::apex::NxDestructibleActor::getVisibleChunks ( ) const [pure virtual]

Returns a pointer to an array of visible chunk indices.

virtual bool physx::apex::NxDestructibleActor::isChunkDestroyed ( physx::PxI32  chunkIndex) const [pure virtual]

Accessor to query if a chunk has been destroyed.

virtual bool physx::apex::NxDestructibleActor::isChunkSolitary ( physx::PxI32  chunkIndex) const [pure virtual]

Accessor to query if a chunk is part of a detached island.

virtual bool physx::apex::NxDestructibleActor::isDynamic ( physx::PxU32  chunkIndex) const [pure virtual]

Returns true if the chunkIndex is valid, and the indexed chunk is dynamic. Returns false otherwise.

virtual bool physx::apex::NxDestructibleActor::isHardSleepingEnabled ( ) const [pure virtual]

Returns true iff hard sleeping is selected for this NxDestructibleActor.

virtual bool physx::apex::NxDestructibleActor::isInitiallyDynamic ( ) const [pure virtual]

Returns true iff the destructible actor starts off life dynamic.

virtual physx::PxI32 physx::apex::NxDestructibleActor::obbSweep ( physx::PxF32 &  time,
physx::PxVec3 &  normal,
const NxBox &  worldBox,
const physx::PxVec3 &  worldDisplacement,
NxDestructibleActorRaycastFlags::Enum  flags 
) const [pure virtual]

Physx SDK 2.8.X. Returns the index of the first visible chunk hit in the actor by swept oriented bounding box, if any. Otherwise returns NxModuleDestructibleConst::INVALID_CHUNK_INDEX. If a chunk is hit, the time and normal fields are modified. time = (return value) of the time to the hit chunk, if any. normal = (return value) the surface normal of the hit chunk's collision volume, if any. worldBox = the obb to sweep against the actor, oriented in world space worldDisplacement = the displacement of the center of the worldBox through the sweep, in world space flags = raycast control flags (see NxDestructibleActorRaycastFlags)

virtual physx::PxI32 physx::apex::NxDestructibleActor::obbSweep ( physx::PxF32 &  time,
physx::PxVec3 &  normal,
const physx::PxVec3 &  worldBoxCenter,
const physx::PxVec3 &  worldBoxExtents,
const physx::PxMat33 &  worldBoxRot,
const physx::PxVec3 &  worldDisplacement,
NxDestructibleActorRaycastFlags::Enum  flags 
) const [pure virtual]

Physx SDK 3.X. Returns the index of the first visible chunk hit in the actor by swept oriented bounding box, if any. Otherwise returns NxModuleDestructibleConst::INVALID_CHUNK_INDEX. If a chunk is hit, the time and normal fields are modified. time = (return value) of the time to the hit chunk, if any. normal = (return value) the surface normal of the hit chunk's collision volume, if any. worldBox = the obb to sweep against the actor, oriented in world space worldDisplacement = the displacement of the center of the worldBox through the sweep, in world space flags = raycast control flags (see NxDestructibleActorRaycastFlags)

virtual physx::PxI32 physx::apex::NxDestructibleActor::rayCast ( physx::PxF32 &  time,
physx::PxVec3 &  normal,
const NxRay &  worldRay,
NxDestructibleActorRaycastFlags::Enum  flags,
physx::PxI32  parentChunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX 
) const [pure virtual]

Register a rigid body impact for impact-based damage. Much like applyDamage, but multplies the input 'force' by the destructible's forceToDamage parameter, and also allows the user to report the impacting PhysX actor PhysX SDK 2.8.X. Returns the index of the first visible chunk hit in the actor by worldRay, if any. Otherwise returns NxModuleDestructibleConst::INVALID_CHUNK_INDEX. If a chunk is hit, the time and normal fields are modified. time = (return value) of the time to the hit chunk, if any. normal = (return value) the surface normal of the hit chunk's collision volume, if any. worldRay = the ray to fire at the actor (the direction need not be normalized) flags = raycast control flags (see NxDestructibleActorRaycastFlags) parentChunkIndex = (if not equal to NxModuleDestructibleConst::INVALID_CHUNK_INDEX) the chunk subhierarchy in which to confine the raycast. If parentChunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX, then the whole actor is searched.

virtual physx::PxI32 physx::apex::NxDestructibleActor::rayCast ( physx::PxF32 &  time,
physx::PxVec3 &  normal,
const PxVec3 &  worldRayOrig,
const PxVec3 &  worldRayDir,
NxDestructibleActorRaycastFlags::Enum  flags,
physx::PxI32  parentChunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX 
) const [pure virtual]

PhysX SDK 3.X. Returns the index of the first visible chunk hit in the actor by worldRay, if any. Otherwise returns NxModuleDestructibleConst::INVALID_CHUNK_INDEX. If a chunk is hit, the time and normal fields are modified. time = (return value) of the time to the hit chunk, if any. normal = (return value) the surface normal of the hit chunk's collision volume, if any. worldRay = the ray to fire at the actor (the direction need not be normalized) flags = raycast control flags (see NxDestructibleActorRaycastFlags) parentChunkIndex = (if not equal to NxModuleDestructibleConst::INVALID_CHUNK_INDEX) the chunk subhierarchy in which to confine the raycast. If parentChunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX, then the whole actor is searched.

virtual bool physx::apex::NxDestructibleActor::recreateApexEmitter ( NxDestructibleEmitterType::Enum  type) [pure virtual]

Recreates the Apex Emitter, if necessary. Use this method to re-initialize the crumble or dust emitter after a change has been made to a dependent asset Note - only crumble emitters are implemented in 1.2.0

virtual bool physx::apex::NxDestructibleActor::releaseChunkEventBuffer ( bool  clearBuffer = true) [pure virtual]

Releases the chunk event buffer, which may have been locked by acquireChunkEventBuffer(). If clearBuffer is true, the buffer will be erased before it is unlocked. Returns true if successful, false otherwise.

virtual bool physx::apex::NxDestructibleActor::releasePhysXActorBuffer ( ) [pure virtual]

Locks a PhysX actor buffer, and (if successful) returns the head of the buffer in the buffer field and the length of the buffer (the number of PhysX actors) in the bufferSize field. To unlock the buffer, use releasePhysXActorBuffer(). The user must release this buffer before another call to releasePhysXActorBuffer. buffer = returned buffer, if successful bufferSize = returned buffer size, if successful flags = flags which control which actors are returned. See NxDestructiblePhysXActorQueryFlags. eliminateRedundantActors = whether or not to ensure that PhysX actors are not listed more than once when this NxDestructibleActor is part of an extended structure. If this is true, then some NxDestructibleActors may not return all PhysX actors associated with all of their chunks (and in fact may return no PhysX actors), but after querying all NxDestructibleActors in a given structure, every PhysX actor will be accounted for. Default = true. Returns true if successful, false otherwise. Releases the PhysX actor buffer, which may have been locked by acquirePhysXActorBuffer(). The buffer will be erased before it is unlocked. Returns true if successful, false otherwise.

virtual void physx::apex::NxDestructibleActor::setAngularVelocity ( const physx::PxVec3 &  angularVelocity) [pure virtual]

Sets the angular velocity of every dynamic chunk to the given value.

virtual void physx::apex::NxDestructibleActor::setCrumbleEmitterState ( bool  enable) [pure virtual]

Enable/disable the crumble emitter

virtual void physx::apex::NxDestructibleActor::setDeleteFracturedChunks ( bool  inDeleteChunkMode) [pure virtual]

Set the actor to delete its fractured chunks instead of simulating them.

virtual void physx::apex::NxDestructibleActor::setDestructibleParameters ( const NxDestructibleParameters destructibleParameters) [pure virtual]

Sets the destructible's NxDestructibleParameter block of parameters. These may be set at runtime.

virtual void physx::apex::NxDestructibleActor::setDustEmitterState ( bool  enable) [pure virtual]

Enable/disable the dust emitter Note - this is a placeholder API. The dust feature is disabled in 1.2.0.

virtual void physx::apex::NxDestructibleActor::setDynamic ( physx::PxI32  chunkIndex = NxModuleDestructibleConst::INVALID_CHUNK_INDEX) [pure virtual]

If the indexed chunk is visible, it is made dynamic (if it is not already). If NxModuleDestructibleConst::INVALID_CHUNK_INDEX is passed in, all visible chunks in the destructible actor are made dynamic, if they are not already.

virtual void physx::apex::NxDestructibleActor::setGlobalPose ( const physx::PxMat44 &  pose) [pure virtual]

Set the destructible actor's global pose. This will only be applied to the physx NxActor or PxActor for the static chunks, and therefore will apply to all static chunks in the structure which contains the this destructible actor. This pose should not contain scale, as the scale is already contained in the actor's scale parameter.

virtual bool physx::apex::NxDestructibleActor::setHitChunkTrackingParams ( bool  flushHistory,
bool  startTracking,
physx::PxU32  trackingDepth,
bool  trackAllChunks = true 
) [pure virtual]

Set the tracking properties of the actor for chunks that are hit. Chunks that are hit are chunks directly affected by fracture events.

flushHistory == true indicates that both the cached chunk hit history and the cached damage event core data will be cleared. To get the chunk hit history of this actor, see getHitChunkHistory() To get the damage coloring history of this actor, see getDamageColoringHistory() startTracking == true indicates that chunk hits and damage coloring will begin caching internally. The actor does not cache chunk hits by default. trackingDepth == the depth at which hit chunks will be cached. This value should not exceed the maximum depth level. trackAllChunks == true indicates that all the chunks will be cached, trackAllChunks == false indicates that only static chunks will be cached.

Returns true if the function executes correctly with the given arguments.

virtual void physx::apex::NxDestructibleActor::setInitialGlobalPose ( const physx::PxMat44 &  pose) [pure virtual]

Resets the initial global pose used for support calculations when the first simulation step is run.

virtual void physx::apex::NxDestructibleActor::setLinearVelocity ( const physx::PxVec3 &  linearVelocity) [pure virtual]

Sets the linear velocity of every dynamic chunk to the given value.

virtual void physx::apex::NxDestructibleActor::setLODWeights ( physx::PxF32  maxDistance,
physx::PxF32  distanceWeight,
physx::PxF32  maxAge,
physx::PxF32  ageWeight,
physx::PxF32  bias 
) [pure virtual]

Misc.

virtual void physx::apex::NxDestructibleActor::setNxParameterized ( ::NxParameterized::Interface *  ) [pure virtual]

Sets the actor's state via the NxParameterized object This can be used to update the state from deserialized data. The actor assumes control of the interface.

virtual void physx::apex::NxDestructibleActor::setPreferredRenderVolume ( NxApexRenderVolume *  volume,
NxDestructibleEmitterType::Enum  type 
) [pure virtual]

Sets a preferred render volume for a dust or crumble emitter Note - only crumble emitters are implemented in 1.2.0

virtual void physx::apex::NxDestructibleActor::setRuntimeFractureOverridePattern ( const char *  overridePatternName) [pure virtual]

Sets the override fracture pattern.

virtual void physx::apex::NxDestructibleActor::setSkinnedOverrideMaterial ( PxU32  submeshIndex,
const char *  overrideMaterialName 
) [pure virtual]

Sets the override material.

virtual void physx::apex::NxDestructibleActor::setStaticOverrideMaterial ( PxU32  submeshIndex,
const char *  overrideMaterialName 
) [pure virtual]

Sets the override material.

virtual bool physx::apex::NxDestructibleActor::setSyncParams ( physx::PxU32  userActorID,
physx::PxU32  actorSyncFlags = 0,
const NxDestructibleActorSyncState actorSyncState = NULL,
const NxDestructibleChunkSyncState chunkSyncState = NULL 
) [pure virtual]

Set the syncing properties of the destructible actor.

userActorID is a user-defined value used to identify the syncing actor. This value will be used to identify destructible actors between the server and client. userActorID = 0 is used for unregistering the actor as a syncing actor, and is the default value. The other arguments will then be forcibly set to the default (non-participating) values. userActorID != 0 registers the actor as a participating syncing actor. userActorID can be overwritten. In this case, the destructible actor which used to hold this userActorID will behave exactly like a call to set userActorID to 0.

actorSyncFlags describes the kind of actor information that participates in syncing. See struct NxDestructibleActorSyncFlags

actorSyncState describes information that allows finer control over the actor that participates in syncing. See struct NxDestructibleActorSyncState

chunkSyncState describes information that allows finer control over the chunk that participates in syncing. See struct NxDestructibleChunkSyncState

Returns true if arguments are accepted. Any one invalid argument will cause a return false. In such a case, no changes are made.


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

Generated on Mon Apr 28 2014 08:01:20

Copyright © 2012-2014 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.