Classes | Public Types | Public Member Functions | Protected Member Functions
nvidia::apex::ExplicitHierarchicalMesh Class Reference

#include <ExplicitHierarchicalMesh.h>

List of all members.

Classes

class  ConvexHull
class  Embedding

Public Types

enum  Enum {
  VisualizeMeshBSPOutsideRegions = (1 << 0),
  VisualizeMeshBSPInsideRegions = (1 << 1),
  VisualizeMeshBSPSingleRegion = (1 << 8),
  VisualizeSliceBSPOutsideRegions = (1 << 16),
  VisualizeSliceBSPInsideRegions = (1 << 17),
  VisualizeSliceBSPSingleRegion = (1 << 24),
  VisualizeMeshBSPAllRegions = VisualizeMeshBSPOutsideRegions | VisualizeMeshBSPInsideRegions
}

Public Member Functions

virtual void clear (bool keepRoot=false)=0
virtual int32_t maxDepth () const =0
virtual uint32_t partCount () const =0
virtual uint32_t chunkCount () const =0
virtual int32_t * parentIndex (uint32_t chunkIndex)=0
virtual uint64_t chunkUniqueID (uint32_t chunkIndex)=0
virtual int32_t * partIndex (uint32_t chunkIndex)=0
virtual PxVec3 * instancedPositionOffset (uint32_t chunkIndex)=0
virtual PxVec2 * instancedUVOffset (uint32_t chunkIndex)=0
virtual uint32_t meshTriangleCount (uint32_t partIndex) const =0
virtual ExplicitRenderTriangle * meshTriangles (uint32_t partIndex)=0
virtual PxBounds3 meshBounds (uint32_t partIndex) const =0
virtual PxBounds3 chunkBounds (uint32_t chunkIndex) const =0
virtual uint32_t * chunkFlags (uint32_t chunkIndex) const =0
virtual void buildCollisionGeometryForPart (uint32_t partIndex, const CollisionVolumeDesc &desc)=0
virtual void buildCollisionGeometryForRootChunkParts (const CollisionDesc &desc, bool aggregateRootChunkParentCollision=true)=0
virtual void reduceHulls (const CollisionDesc &desc, bool inflated)=0
virtual uint32_t convexHullCount (uint32_t partIndex) const =0
virtual const ConvexHull ** convexHulls (uint32_t partIndex) const =0
virtual PxVec3 * surfaceNormal (uint32_t partIndex)=0
virtual const
DisplacementMapVolume
displacementMapVolume () const =0
virtual uint32_t submeshCount () const =0
virtual ExplicitSubmeshDatasubmeshData (uint32_t submeshIndex)=0
virtual uint32_t addSubmesh (const ExplicitSubmeshData &submeshData)=0
virtual uint32_t getMaterialFrameCount () const =0
virtual nvidia::MaterialFrame getMaterialFrame (uint32_t index) const =0
virtual void setMaterialFrame (uint32_t index, const nvidia::MaterialFrame &materialFrame)=0
virtual uint32_t addMaterialFrame ()=0
virtual void serialize (PxFileBuf &stream, Embedding &embedding) const =0
virtual void deserialize (PxFileBuf &stream, Embedding &embedding)=0
virtual void set (const ExplicitHierarchicalMesh &mesh)=0
virtual void calculateMeshBSP (uint32_t randomSeed, IProgressListener *progressListener=NULL, const uint32_t *microgridSize=NULL, BSPOpenMode::Enum meshMode=BSPOpenMode::Automatic)=0
virtual void replaceInteriorSubmeshes (uint32_t partIndex, uint32_t frameCount, uint32_t *frameIndices, uint32_t submeshIndex)=0
virtual void visualize (RenderDebugInterface &debugRender, uint32_t flags, uint32_t index=0) const =0
virtual void release ()=0

Protected Member Functions

 ExplicitHierarchicalMesh ()
virtual ~ExplicitHierarchicalMesh ()

Detailed Description

ExplicitHierarchicalMesh

An interface to a representation of a render mesh that is used for authoring.

The "hierarchical" nature of this mesh is represented by extra parent/child relations among the parts that will become the parts of an RenderMeshAsset.


Member Enumeration Documentation

Used in the visualize method to determine what to draw.

Enumerator:
VisualizeMeshBSPOutsideRegions 

Draws the convex hulls associated with the BSP regions marked "outside," if a BSP has been created for this object (see calculateMeshBSP()).

VisualizeMeshBSPInsideRegions 

Draws the convex hulls associated with the BSP regions marked "inside," if a BSP has been created for this object (see calculateMeshBSP()).

VisualizeMeshBSPSingleRegion 

Draws the convex hull associated with a single BSP regions, if a BSP has been created for this object (see calculateMeshBSP()). The region index must be passed into the visualize function if this flag is set.

VisualizeSliceBSPOutsideRegions 

Currently unused

VisualizeSliceBSPInsideRegions 

Currently unused

VisualizeSliceBSPSingleRegion 

Currently unused

VisualizeMeshBSPAllRegions 

Constructor & Destructor Documentation

nvidia::apex::ExplicitHierarchicalMesh::ExplicitHierarchicalMesh ( ) [inline, protected]

Constructor and destructor are not public Use createExplicitHierarchicalMesh() to instantiate an ExplicitHierarchicalMesh and ExplicitHierarchicalMesh::release() to destroy it.

virtual nvidia::apex::ExplicitHierarchicalMesh::~ExplicitHierarchicalMesh ( ) [inline, protected, virtual]

Member Function Documentation

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::addMaterialFrame ( ) [pure virtual]
See also:
ConvexHull::getMaterialFrameCount
virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::addSubmesh ( const ExplicitSubmeshData submeshData) [pure virtual]

Creates a submesh and adds it to the list of submeshes, and returns the index of the newly created submesh.

virtual void nvidia::apex::ExplicitHierarchicalMesh::buildCollisionGeometryForPart ( uint32_t  partIndex,
const CollisionVolumeDesc desc 
) [pure virtual]

Build collision volumes for the part indexed by partIndex, using (See CollisionVolumeDesc.)

virtual void nvidia::apex::ExplicitHierarchicalMesh::buildCollisionGeometryForRootChunkParts ( const CollisionDesc desc,
bool  aggregateRootChunkParentCollision = true 
) [pure virtual]

Build collision volumes for all parts referenced by chunks at the root depth.

If aggregateRootChunkParentCollision, then every chunk which is the parent of root chunks gets all of the collision hulls of its children. Otherwise, all root chunks have their collision volumes separately calculated.

virtual void nvidia::apex::ExplicitHierarchicalMesh::calculateMeshBSP ( uint32_t  randomSeed,
IProgressListener *  progressListener = NULL,
const uint32_t *  microgridSize = NULL,
BSPOpenMode::Enum  meshMode = BSPOpenMode::Automatic 
) [pure virtual]

Creates an internal BSP representation of the mesh parts up to the root depth. This is used by authoring tools to perform CSG operations. If the user instantiates IProgressListener, they may pass it in to report progress of this operation. If microgridSize is not NULL, *microgridSize is used in the BSP calculation. Otherwise the default parameters are used. meshMode is used to determine if the mesh is open or closed. See NxMeshProcessingParameters::MeshMode

virtual PxBounds3 nvidia::apex::ExplicitHierarchicalMesh::chunkBounds ( uint32_t  chunkIndex) const [pure virtual]

The axis aligned bounding box of the triangles for the chunk index by chunkIndex.

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::chunkCount ( ) const [pure virtual]

The number of chunks in this mesh.

virtual uint32_t* nvidia::apex::ExplicitHierarchicalMesh::chunkFlags ( uint32_t  chunkIndex) const [pure virtual]

Flags describing attributes of the part indexed by partIndex. See DestructibleAsset::ChunkFlags

virtual uint64_t nvidia::apex::ExplicitHierarchicalMesh::chunkUniqueID ( uint32_t  chunkIndex) [pure virtual]

A runtime unique identifier for a chunk. During one execution of an application which contains the fracture tools, this chunk ID will be unique for the chunk.

virtual void nvidia::apex::ExplicitHierarchicalMesh::clear ( bool  keepRoot = false) [pure virtual]

"Resets" this object to its initial state, freeing all internal data. If keepRoot is true, then parts up to the root depth will not be cleared. (In this case, not all of the submesh data, etc. will be deleted.) The root depth is set when the ExplicitHierarchicalMesh is first created. Fracturing methods create pieces beyond the root depth.

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::convexHullCount ( uint32_t  partIndex) const [pure virtual]

The number of convex hulls for the given part.

virtual const ConvexHull** nvidia::apex::ExplicitHierarchicalMesh::convexHulls ( uint32_t  partIndex) const [pure virtual]

The convex hulls for the given part.

virtual void nvidia::apex::ExplicitHierarchicalMesh::deserialize ( PxFileBuf &  stream,
Embedding embedding 
) [pure virtual]

Serialization. The user must instantiate Embedding in order to successfully serialize any embedded data.

virtual const DisplacementMapVolume& nvidia::apex::ExplicitHierarchicalMesh::displacementMapVolume ( ) const [pure virtual]

The displacement map volume for the mesh.

virtual nvidia::MaterialFrame nvidia::apex::ExplicitHierarchicalMesh::getMaterialFrame ( uint32_t  index) const [pure virtual]
See also:
ConvexHull::getMaterialFrameCount
virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::getMaterialFrameCount ( ) const [pure virtual]

If there are interior submeshes, then triangles belonging to those submesh will have materials applied to them with a using a coordinate frame. In the event that materials need to be re-applied (possibly at a different scale), it is convenient to store the material frames used. This function returns the array of material frames. The index extraDataIndex stored in each ExplicitRenderTriangle references this array.

virtual PxVec3* nvidia::apex::ExplicitHierarchicalMesh::instancedPositionOffset ( uint32_t  chunkIndex) [pure virtual]

If instanced, the part instance offset (translation).

virtual PxVec2* nvidia::apex::ExplicitHierarchicalMesh::instancedUVOffset ( uint32_t  chunkIndex) [pure virtual]

If instanced, the part instance offset (UV).

virtual int32_t nvidia::apex::ExplicitHierarchicalMesh::maxDepth ( ) const [pure virtual]

The maximum child depth in the hierarchy. Depth 0 is the base, depth 1 parts are children of depth 0, etc. If there are no parts, this function returns -1.

virtual PxBounds3 nvidia::apex::ExplicitHierarchicalMesh::meshBounds ( uint32_t  partIndex) const [pure virtual]

The axis aligned bounding box of the triangles for the part index by partIndex.

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::meshTriangleCount ( uint32_t  partIndex) const [pure virtual]

The number of triangles in the part indexed by partIndex. This includes all submeshes.

virtual ExplicitRenderTriangle* nvidia::apex::ExplicitHierarchicalMesh::meshTriangles ( uint32_t  partIndex) [pure virtual]

A pointer into the array of ExplicitRenderTriangles which form the mesh of the part indexed by partIndex.

virtual int32_t* nvidia::apex::ExplicitHierarchicalMesh::parentIndex ( uint32_t  chunkIndex) [pure virtual]

The parent index of the chunk indexed by chunkIndex. Depth 0 parts have no parents, and for those parts this function returns -1.

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::partCount ( ) const [pure virtual]

The number of parts in this mesh.

virtual int32_t* nvidia::apex::ExplicitHierarchicalMesh::partIndex ( uint32_t  chunkIndex) [pure virtual]

The geometric part index this chunk references

virtual void nvidia::apex::ExplicitHierarchicalMesh::reduceHulls ( const CollisionDesc desc,
bool  inflated 
) [pure virtual]

Calls IConvexMesh::reduceHull on all part convex hulls. See IConvexMesh::reduceHull.

virtual void nvidia::apex::ExplicitHierarchicalMesh::release ( ) [pure virtual]

Releases all memory associated with this object and deletes itself.

virtual void nvidia::apex::ExplicitHierarchicalMesh::replaceInteriorSubmeshes ( uint32_t  partIndex,
uint32_t  frameCount,
uint32_t *  frameIndices,
uint32_t  submeshIndex 
) [pure virtual]

Utility to replace the submesh on a set of interior triangles.

virtual void nvidia::apex::ExplicitHierarchicalMesh::serialize ( PxFileBuf &  stream,
Embedding embedding 
) const [pure virtual]

Serialization. The user must instantiate Embedding in order to successfully serialize any embedded data.

virtual void nvidia::apex::ExplicitHierarchicalMesh::set ( const ExplicitHierarchicalMesh mesh) [pure virtual]

Copies the input mesh in to this object.

virtual void nvidia::apex::ExplicitHierarchicalMesh::setMaterialFrame ( uint32_t  index,
const nvidia::MaterialFrame &  materialFrame 
) [pure virtual]
See also:
ConvexHull::getMaterialFrameCount
virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::submeshCount ( ) const [pure virtual]

The number of submeshes. The explicit mesh representation is just a list of ExplicitRenderTriangles for each part, and each ExplicitRenderTriangle has a submesh index. These indices will lie in a contiguous range from 0 to submeshCount()-1.

virtual ExplicitSubmeshData* nvidia::apex::ExplicitHierarchicalMesh::submeshData ( uint32_t  submeshIndex) [pure virtual]

The submeshData indexed by submeshIndex. See ExplicitSubmeshData.

virtual PxVec3* nvidia::apex::ExplicitHierarchicalMesh::surfaceNormal ( uint32_t  partIndex) [pure virtual]

The outward surface normal associated with the chunk mesh geometry.

virtual void nvidia::apex::ExplicitHierarchicalMesh::visualize ( RenderDebugInterface &  debugRender,
uint32_t  flags,
uint32_t  index = 0 
) const [pure virtual]

Draws various components of this object to the debugRenderer, as defined by the flags (see the visualization Enum above). Some of the flags require an index be passed in as well.


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

Generated on Sat Dec 1 2018 15:51:53

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