#include <NxDestructibleAsset.h>
Public Types | |
| enum | ChunkFlags { ChunkEnvironmentallySupported = (1 << 0), ChunkAndDescendentsDoNotFracture = (1 << 1), ChunkDoesNotFracture = (1 << 2), ChunkDoesNotCrumble = (1 << 3), ChunkIsInstanced = (1 << 16) } |
Public Member Functions | |
| virtual void | releaseDestructibleActor (NxDestructibleActor &actor)=0 |
| virtual NxDestructibleActor * | createDestructibleActorFromDeserializedState (::NxParameterized::Interface *actorParams, NxApexScene &apexScene)=0 |
| virtual NxDestructibleParameters | getDestructibleParameters () const =0 |
| virtual NxDestructibleInitParameters | getDestructibleInitParameters () const =0 |
| virtual const char * | getCrumbleEmitterName () const =0 |
| virtual const char * | getDustEmitterName () const =0 |
| virtual physx::PxU32 | getChunkCount () const =0 |
| virtual physx::PxU32 | getDepthCount () const =0 |
| virtual const NxRenderMeshAsset * | getRenderMeshAsset () const =0 |
| virtual bool | setRenderMeshAsset (NxRenderMeshAsset *)=0 |
| virtual physx::PxU32 | getScatterMeshAssetCount () const =0 |
| virtual NxRenderMeshAsset ** | getScatterMeshAssets ()=0 |
| virtual physx::PxU32 | getInstancedChunkCount () const =0 |
| virtual void | getStats (NxDestructibleAssetStats &stats) const =0 |
| virtual void | cacheChunkOverlapsUpToDepth (physx::PxI32 depth=-1)=0 |
| virtual physx::PxU32 | getCachedOverlapCountAtDepth (physx::PxU32 depth)=0 |
| virtual const NxIntPair * | getCachedOverlapsAtDepth (physx::PxU32 depth)=0 |
| virtual physx::PxVec3 | getChunkPositionOffset (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxVec2 | getChunkUVOffset (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxU32 | getChunkFlags (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxU16 | getChunkDepth (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxI32 | getChunkParentIndex (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxU32 | getPartIndex (physx::PxU32 chunkIndex) const =0 |
| virtual physx::PxU32 | getPartConvexHullCount (const physx::PxU32 partIndex) const =0 |
| virtual NxParameterized::Interface ** | getPartConvexHullArray (const physx::PxU32 partIndex) const =0 |
| virtual physx::PxU32 | getActorTransformCount () const =0 |
| Returns the size of the actor transform array. See getActorTransforms() for a description of this data. | |
| virtual const physx::PxMat44 * | getActorTransforms () const =0 |
| Returns the head of the actor transform array. This list is a convenience for placing actors in a level from poses authored in a level editor. The transforms may contain scaling. | |
| virtual void | applyTransformation (const physx::PxMat44 &transformation, physx::PxF32 scale)=0 |
| Apply a transformation to destructible asset. | |
| virtual void | applyTransformation (const physx::PxMat44 &transformation)=0 |
| Apply an arbitrary affine transformation to destructible asset. | |
Protected Member Functions | |
| virtual | ~NxDestructibleAsset () |
Destructible asset API. Destructible actors are instanced from destructible assets.
| virtual physx::apex::NxDestructibleAsset::~NxDestructibleAsset | ( | ) | [inline, protected, virtual] |
Hidden destructor. Use release().
| virtual void physx::apex::NxDestructibleAsset::applyTransformation | ( | const physx::PxMat44 & | transformation, |
| physx::PxF32 | scale | ||
| ) | [pure virtual] |
Apply a transformation to destructible asset.
This is a permanent transformation and it changes the object state. Should only be called immediately before serialization and without further modifying the object later on.
| transformation | This matrix is allowed to contain a translation and a rotation |
| scale | Apply a uniform scaling as well |
| virtual void physx::apex::NxDestructibleAsset::applyTransformation | ( | const physx::PxMat44 & | transformation | ) | [pure virtual] |
Apply an arbitrary affine transformation to destructible asset.
This is a permanent transformation and it changes the object state. Should only be called immediately before serialization and without further modifying the object later on.
| transformation | This matrix is allowed to contain translation, rotation, scale and skew |
| virtual void physx::apex::NxDestructibleAsset::cacheChunkOverlapsUpToDepth | ( | physx::PxI32 | depth = -1 | ) | [pure virtual] |
Ensures that the asset has chunk overlap informationc cached up to the given depth. If depth < 0 (as it is by default), the depth will be taken to be the supportDepth given in the asset's destructibleParameters. It is ok to pass in a depth greater than any chunk depth in the asset.
| virtual NxDestructibleActor* physx::apex::NxDestructibleAsset::createDestructibleActorFromDeserializedState | ( | ::NxParameterized::Interface * | actorParams, |
| NxApexScene & | apexScene | ||
| ) | [pure virtual] |
General Create a destructible actor representing the destructible asset in a scene. Unlike a call to createApexActor, here the created actor takes explicit ownership of the provided actorParams. This can represent either the destructible descriptor or previously serialized destructible state. Note: The client should not attempt to use the provided actorParams after calling this method.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getActorTransformCount | ( | ) | const [pure virtual] |
Returns the size of the actor transform array. See getActorTransforms() for a description of this data.
| virtual const physx::PxMat44* physx::apex::NxDestructibleAsset::getActorTransforms | ( | ) | const [pure virtual] |
Returns the head of the actor transform array. This list is a convenience for placing actors in a level from poses authored in a level editor. The transforms may contain scaling.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getCachedOverlapCountAtDepth | ( | physx::PxU32 | depth | ) | [pure virtual] |
The size of the array returned by getCachedOverlapsAtDepth(depth) (see below). Note: this function will not trigger overlap caching for the given depth. If no overlaps have been calculated for the depth given, this function returns NULL.
| virtual const NxIntPair* physx::apex::NxDestructibleAsset::getCachedOverlapsAtDepth | ( | physx::PxU32 | depth | ) | [pure virtual] |
Array of integer pairs, indexing chunk pairs which touch at a given depth in the heirarcy. The size of the array is given by getCachedOverlapCountAtDepth(depth). Note: this function will not trigger overlap caching for the given depth. If no overlaps have been calculated for the depth given, this function returns NULL.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getChunkCount | ( | ) | const [pure virtual] |
The total number of chunks in the asset.
| virtual physx::PxU16 physx::apex::NxDestructibleAsset::getChunkDepth | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
Accessor to query the depth of a given chunk.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getChunkFlags | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
Retrieve flags (see ChunkFlags) for the given chunk.
| virtual physx::PxI32 physx::apex::NxDestructibleAsset::getChunkParentIndex | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
Returns the index of the given chunk's parent. If the chunk has no parent (is the root of the fracture hierarchy), then -1 is returned.
| virtual physx::PxVec3 physx::apex::NxDestructibleAsset::getChunkPositionOffset | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
If this chunk is instanced within the same asset, then this provides the instancing position offset. Otherwise, this function returns (0,0,0).
| virtual physx::PxVec2 physx::apex::NxDestructibleAsset::getChunkUVOffset | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
If this chunk is instanced within the same asset, then this provides the instancing UV offset. Otherwise, this function returns (0,0).
| virtual const char* physx::apex::NxDestructibleAsset::getCrumbleEmitterName | ( | ) | const [pure virtual] |
The name of the emitter to use when generating crumble particles. Returns NULL if no emitter is configured.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getDepthCount | ( | ) | const [pure virtual] |
The total number of fracture hierarchy depth levels in the asset.
| virtual NxDestructibleInitParameters physx::apex::NxDestructibleAsset::getDestructibleInitParameters | ( | ) | const [pure virtual] |
The parameters used for default destructible initialization. See NxDestructibleInitParameters.
| virtual NxDestructibleParameters physx::apex::NxDestructibleAsset::getDestructibleParameters | ( | ) | const [pure virtual] |
The NxDestructibleParameters which describe the default fracturing behavior for instanced NxDestructibleActors.
| virtual const char* physx::apex::NxDestructibleAsset::getDustEmitterName | ( | ) | const [pure virtual] |
The name of the emitter to use when generating fracture-line dust particles. Returns NULL if no emitter is configured.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getInstancedChunkCount | ( | ) | const [pure virtual] |
Get the number of instanced chunk meshes in this asset.
| virtual NxParameterized::Interface** physx::apex::NxDestructibleAsset::getPartConvexHullArray | ( | const physx::PxU32 | partIndex | ) | const [pure virtual] |
Returns the head of an array to convex hull NxParamterized::Interface* pointers for a given part.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getPartConvexHullCount | ( | const physx::PxU32 | partIndex | ) | const [pure virtual] |
The number of convex hulls associated with a given part.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getPartIndex | ( | physx::PxU32 | chunkIndex | ) | const [pure virtual] |
The render mesh asset part index associated with this chunk.
| virtual const NxRenderMeshAsset* physx::apex::NxDestructibleAsset::getRenderMeshAsset | ( | ) | const [pure virtual] |
Gets the NxRenderMeshAsset associated with this asset.
| virtual physx::PxU32 physx::apex::NxDestructibleAsset::getScatterMeshAssetCount | ( | ) | const [pure virtual] |
Retrieve the number of scatter mesh assets
| virtual NxRenderMeshAsset** physx::apex::NxDestructibleAsset::getScatterMeshAssets | ( | ) | [pure virtual] |
Retrieve the scatter mesh asset array
| virtual void physx::apex::NxDestructibleAsset::getStats | ( | NxDestructibleAssetStats & | stats | ) | const [pure virtual] |
Returns stats (sizes, counts) for the asset. See NxDestructibleAssetStats.
| virtual void physx::apex::NxDestructibleAsset::releaseDestructibleActor | ( | NxDestructibleActor & | actor | ) | [pure virtual] |
Instancing Instances the NxDestructibleAsset, creating an NxDestructibleActor, using the NxDestructibleActorDesc. See NxDestructibleActor and NxDestructibleActorDesc. This asset will own the NxDestructibleActor, so that any NxDestructibleActor created by it will be released when this asset is released. You may also call the NxDestructibleActor's release() method at any time.
| virtual bool physx::apex::NxDestructibleAsset::setRenderMeshAsset | ( | NxRenderMeshAsset * | ) | [pure virtual] |
Set the NxRenderMeshAsset associated with this asset. This is the asset used for non-instanced rendering. NULL is a valid argument, and can be used to clear the internal mesh data. Returns true if successful.