Nv::Blast::BlastBondGenerator Class Reference

#include <NvBlastExtAuthoringBondGenerator.h>

List of all members.

Public Member Functions

virtual int32_t bondsFromPrefractured (uint32_t meshCount, const uint32_t *convexHullOffset, const CollisionHull **chunkHulls, const bool *chunkIsSupport, const uint32_t *meshGroups, NvBlastBondDesc *&resultBondDescs, float maxSeparation)=0
virtual int32_t bondsFromPrefractured (uint32_t meshCount, const uint32_t *geometryOffset, const Triangle *geometry, const bool *chunkIsSupport, NvBlastBondDesc *&resultBondDescs, BondGenerationConfig conf)=0
virtual int32_t buildDescFromInternalFracture (FractureTool *tool, const bool *chunkIsSupport, NvBlastBondDesc *&resultBondDescs, NvBlastChunkDesc *&resultChunkDescriptors)=0
virtual int32_t createBondBetweenMeshes (uint32_t meshCount, const uint32_t *geometryOffset, const Triangle *geometry, uint32_t overlapsCount, const uint32_t *overlapsA, const uint32_t *overlapsB, NvBlastBondDesc *&resultBond, BondGenerationConfig cfg)=0
virtual int32_t createBondBetweenMeshes (uint32_t meshACount, const Triangle *meshA, uint32_t meshBCount, const Triangle *meshB, NvBlastBond &resultBond, BondGenerationConfig conf)=0
virtual void release ()=0
virtual ~BlastBondGenerator ()


Detailed Description

Tool for gathering bond information from provided mesh geometry

Constructor & Destructor Documentation

virtual Nv::Blast::BlastBondGenerator::~BlastBondGenerator (  )  [inline, virtual]


Member Function Documentation

virtual int32_t Nv::Blast::BlastBondGenerator::bondsFromPrefractured ( uint32_t  meshCount,
const uint32_t *  convexHullOffset,
const CollisionHull **  chunkHulls,
const bool *  chunkIsSupport,
const uint32_t *  meshGroups,
NvBlastBondDesc *&  resultBondDescs,
float  maxSeparation 
) [pure virtual]

Creates bond description for prefractured meshes, when there is no info about which chunks should be connected with bond. This uses the same process as bondsFromPrefractured using the BondGenMode::AVERAGE mode however the existing collision data is used.

Note:
User should call NVBLAST_FREE for resultBondDescs when it not needed anymore.
Parameters:
[in] meshCount Number of meshes
[in] convexHullOffset Pointer to array of convex hull offsets for each mesh. Containts meshCount + 1 element, last one is total number of hulls in the geometry
[in] chunkHulls Pointer to array of convex hulls. Hulls from convexHullOffset[i] to convexHullOffset[i+1] correspond to i-th mesh.
[in] chunkIsSupport Pointer to array of flags, if true - chunk is support. Array size should be equal to chunk count in tool.
[in] meshGroups Pointer to array of group ids for each mesh, bonds will not be generated between meshs of the same group. If null each mesh is assumed to be in it's own group.
[out] resultBondDescs Pointer to array of result bonds.
Returns:
Number of created bonds

virtual int32_t Nv::Blast::BlastBondGenerator::bondsFromPrefractured ( uint32_t  meshCount,
const uint32_t *  geometryOffset,
const Triangle geometry,
const bool *  chunkIsSupport,
NvBlastBondDesc *&  resultBondDescs,
BondGenerationConfig  conf 
) [pure virtual]

Creates bond description for prefractured meshes, when there is no info about which chunks should be connected with bond.

Note:
User should call NVBLAST_FREE for resultBondDescs when it not needed anymore
Parameters:
[in] meshCount Number of meshes
[in] geometryOffset Pointer to array of triangle offsets for each mesh. Containts meshCount + 1 element, last one is total number of triangles in geometry
[in] geometry Pointer to array of triangles. Triangles from geometryOffset[i] to geometryOffset[i+1] correspond to i-th mesh.
[in] chunkIsSupport Pointer to array of flags, if true - chunk is support. Array size should be equal to chunk count in tool.
[out] resultBondDescs Pointer to array of result bonds.
[in] conf Bond creation mode.
Returns:
Number of created bonds

virtual int32_t Nv::Blast::BlastBondGenerator::buildDescFromInternalFracture ( FractureTool tool,
const bool *  chunkIsSupport,
NvBlastBondDesc *&  resultBondDescs,
NvBlastChunkDesc *&  resultChunkDescriptors 
) [pure virtual]

This method based on marking triangles during fracture process, so can be used only with internally fractured meshes.

Note:
User should call NVBLAST_FREE for resultBondDescs when it not needed anymore
Parameters:
[in] tool FractureTool which contains chunks representation, tool->finalizeFracturing() should be called before.
[in] chunkIsSupport Pointer to array of flags, if true - chunk is support. Array size should be equal to chunk count in tool.
[out] resultBondDescs Pointer to array of created bond descriptors.
[out] resultChunkDescriptors Pointer to array of created chunk descriptors.
Returns:
Number of created bonds

virtual int32_t Nv::Blast::BlastBondGenerator::createBondBetweenMeshes ( uint32_t  meshCount,
const uint32_t *  geometryOffset,
const Triangle geometry,
uint32_t  overlapsCount,
const uint32_t *  overlapsA,
const uint32_t *  overlapsB,
NvBlastBondDesc *&  resultBond,
BondGenerationConfig  cfg 
) [pure virtual]

Creates bond description between number of meshes

Note:
User should call NVBLAST_FREE for resultBondDescs when it not needed anymore
Parameters:
[in] meshCount Number of meshes
[in] geometryOffset Pointer to array of triangle offsets for each mesh. Containts meshCount + 1 element, last one is total number of triangles in geometry
[in] geometry Pointer to array of triangles. Triangles from geometryOffset[i] to geometryOffset[i+1] correspond to i-th mesh.
[in] overlapsCount Number of overlaps
[in] overlaps Pointer to array of pairs - indexes of chunks, for which bond should be created.
[out] resultBond Pointer to array of result bonds.
[in] cfg Bond creation mode.
Returns:
Number of created bonds

virtual int32_t Nv::Blast::BlastBondGenerator::createBondBetweenMeshes ( uint32_t  meshACount,
const Triangle meshA,
uint32_t  meshBCount,
const Triangle meshB,
NvBlastBond resultBond,
BondGenerationConfig  conf 
) [pure virtual]

Creates bond description between two meshes

Parameters:
[in] meshACount Number of triangles in mesh A
[in] meshA Pointer to array of triangles of mesh A.
[in] meshBCount Number of triangles in mesh B
[in] meshB Pointer to array of triangles of mesh B.
[out] resultBond Result bond description.
[in] conf Bond creation mode.
Returns:
0 if success

virtual void Nv::Blast::BlastBondGenerator::release (  )  [pure virtual]

Release BlastBondGenerator memory


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