Newton Dynamics  4.00
ndMeshEffect Class Reference
Inheritance diagram for ndMeshEffect:
ndPolyhedra ndTree< ndEdge, ndEdgeKey > ndClassAlloc

Classes

class  dClusterMap
 
class  dMeshVertexFormat
 
class  dVertexCluster
 
class  ndMaterial
 

Public Member Functions

D_COLLISION_API ndMeshEffect (const ndMeshEffect &source)
 
D_COLLISION_API ndMeshEffect (const ndShapeInstance &shapeInstance)
 
D_COLLISION_API ndMeshEffect (ndPolyhedra &mesh, const ndMeshEffect &source)
 
D_COLLISION_API ndMeshEffect (const ndFloat64 *const vertexCloud, ndInt32 count, ndInt32 strideInByte, ndFloat64 distTol)
 
void SetName (const ndString &name)
 
const ndStringGetName () const
 
ndArray< ndMaterial > & GetMaterials ()
 
ndInt32 GetPropertiesCount () const
 
ndInt32 GetVertexCount () const
 
ndInt32 GetVertexStrideInByte () const
 
const ndFloat64 * GetVertexPool () const
 
ndInt32 GetFaceMaterial (ndEdge *const faceEdge) const
 
const dClusterMapGetCluster () const
 
D_COLLISION_API dVertexClusterCreateCluster (const char *const name)
 
D_COLLISION_API dVertexClusterFindCluster (const char *const name) const
 
D_COLLISION_API ndFloat64 CalculateVolume () const
 
D_COLLISION_API ndMatrix CalculateOOBB (ndBigVector &size) const
 
D_COLLISION_API void CalculateAABB (ndBigVector &min, ndBigVector &max) const
 
D_COLLISION_API void ApplyTransform (const ndMatrix &matrix)
 
D_COLLISION_API void CalculateNormals (ndFloat64 angleInRadians)
 
D_COLLISION_API void BuildFromIndexList (const dMeshVertexFormat *const format)
 
D_COLLISION_API void GetVertexIndexChannel (ndInt32 *const bufferOut) const
 
D_COLLISION_API void GetVertexChannel64 (ndInt32 strideInByte, ndFloat64 *const bufferOut) const
 
D_COLLISION_API void GetVertexChannel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API void GetNormalChannel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API void GetBinormalChannel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API void GetUV0Channel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API void GetUV1Channel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API void GetVertexColorChannel (ndInt32 strideInByte, ndFloat32 *const bufferOut) const
 
D_COLLISION_API ndIndexArrayMaterialGeometryBegin ()
 
D_COLLISION_API ndInt32 GetFirstMaterial (ndIndexArray *const handle) const
 
D_COLLISION_API ndInt32 GetNextMaterial (ndIndexArray *const handle, ndInt32 materialHandle) const
 
D_COLLISION_API ndInt32 GetMaterialID (ndIndexArray *const handle, ndInt32 materialHandle) const
 
D_COLLISION_API ndInt32 GetMaterialIndexCount (ndIndexArray *const handle, ndInt32 materialHandle) const
 
D_COLLISION_API void GetMaterialGetIndexStream (ndIndexArray *const handle, ndInt32 materialHandle, ndInt32 *const index) const
 
D_COLLISION_API void GetMaterialGetIndexStream (ndIndexArray *const handle, ndInt32 materialHandle, ndInt16 *const index) const
 
D_COLLISION_API void MaterialGeometryEnd (ndIndexArray *const handle)
 
D_COLLISION_API void BeginBuild ()
 
D_COLLISION_API void BeginBuildFace ()
 
D_COLLISION_API void AddPoint (ndFloat64 x, ndFloat64 y, ndFloat64 z)
 
D_COLLISION_API void AddLayer (ndInt32 layer)
 
D_COLLISION_API void AddMaterial (ndInt32 materialIndex)
 
D_COLLISION_API void AddNormal (ndFloat32 x, ndFloat32 y, ndFloat32 z)
 
D_COLLISION_API void AddBinormal (ndFloat32 x, ndFloat32 y, ndFloat32 z)
 
D_COLLISION_API void AddVertexColor (ndFloat32 x, ndFloat32 y, ndFloat32 z, ndFloat32 w)
 
D_COLLISION_API void AddUV0 (ndFloat32 u, ndFloat32 v)
 
D_COLLISION_API void AddUV1 (ndFloat32 u, ndFloat32 v)
 
D_COLLISION_API void EndBuildFace ()
 
D_COLLISION_API void EndBuild (bool fixTjoint=true)
 
D_COLLISION_API ndBigVector GetOrigin () const
 
D_COLLISION_API void SphericalMapping (ndInt32 materialIndex, const ndMatrix &textureMatrix)
 
D_COLLISION_API void UniformBoxMapping (ndInt32 materialIndex, const ndMatrix &textureMatrix)
 
D_COLLISION_API void BoxMapping (ndInt32 front, ndInt32 side, ndInt32 top, const ndMatrix &textureMatrix)
 
D_COLLISION_API void RepairTJoints ()
 
ndMeshEffectGetFirstLayer ()
 
ndMeshEffectGetNextLayer (ndMeshEffect *const layer)
 
D_COLLISION_API void FlipWinding ()
 
D_COLLISION_API bool HasOpenEdges () const
 
D_COLLISION_API void Triangulate ()
 
D_COLLISION_API void ConvertToPolygons ()
 
D_COLLISION_API ndEdgeInsertEdgeVertex (ndEdge *const edge, ndFloat64 param)
 
D_COLLISION_API void AddInterpolatedEdgeAttribute (ndEdge *const edge, ndFloat64 param)
 
D_COLLISION_API void RemoveUnusedVertices (ndInt32 *const vertexRemapTable)
 
D_COLLISION_API ndInt32 PlaneClip (const ndMeshEffect &convexMesh, const ndEdge *const face)
 
D_COLLISION_API ndShapeInstanceCreateConvexCollision (ndFloat64 tolerance) const
 
D_COLLISION_API ndMeshEffectConvexMeshIntersection (const ndMeshEffect *const convexMesh) const
 
D_COLLISION_API ndMeshEffectInverseConvexMeshIntersection (const ndMeshEffect *const convexMesh) const
 
D_COLLISION_API ndMeshEffectCreateVoronoiConvexDecomposition (const ndArray< ndVector > &pointCloud, ndInt32 interiorMaterialIndex, const ndMatrix &textureProjectionMatrix)
 
- Public Member Functions inherited from ndPolyhedra
D_CORE_API ndPolyhedra (const ndPolyhedra &polyhedra)
 
virtual bool ReportProgress (ndFloat32) const
 
ndEdgeAddFace (ndInt32 v0, ndInt32 v1, ndInt32 v2)
 
ndEdgeAddFace (ndInt32 count, const ndInt32 *const index)
 
D_CORE_API ndEdgeAddFace (ndInt32 count, const ndInt32 *const index, const ndInt64 *const userdata)
 
virtual D_CORE_API void DeleteFace (ndEdge *const edge)
 
D_CORE_API ndInt32 GetFaceCount () const
 
ndInt32 GetEdgeCount () const
 
ndInt32 GetLastVertexIndex () const
 
ndInt32 IncLRU () const
 
ndInt32 GetLRU () const
 
void SetLRU (ndInt32 lru) const
 
ndEdgeFindEdge (ndInt32 v0, ndInt32 v1) const
 
ndNode * FindEdgeNode (ndInt32 v0, ndInt32 v1) const
 
D_CORE_API ndEdgeAddHalfEdge (ndInt32 v0, ndInt32 v1)
 
D_CORE_API void DeleteEdge (ndEdge *const edge)
 
void DeleteEdge (ndInt32 v0, ndInt32 v1)
 
D_CORE_API ndEdgeConnectVertex (ndEdge *const e0, ndEdge *const e1)
 
D_CORE_API bool FlipEdge (ndEdge *const edge)
 
D_CORE_API ndEdgeSpliteEdge (ndInt32 newIndex, ndEdge *const edge)
 
D_CORE_API ndBigVector FaceNormal (const ndEdge *const face, const ndFloat64 *const vertex, ndInt32 strideInBytes) const
 
D_CORE_API void SavePLY (const char *const fileName, const ndFloat64 *const vertex, ndInt32 strideInBytes) const
 
void BeginConectedSurface () const
 
D_CORE_API bool GetConectedSurface (ndPolyhedra &polyhedra) const
 
void EndConectedSurface () const
 
D_CORE_API ndMatrix CalculateSphere (ndBigVector &size, const ndFloat64 *const vertex, ndInt32 strideInBytes) const
 
D_CORE_API void ChangeEdgeIncidentVertex (ndEdge *const edge, ndInt32 newIndex)
 
D_CORE_API void DeleteDegenerateFaces (const ndFloat64 *const pool, ndInt32 dstStrideInBytes, ndFloat64 minArea)
 
D_CORE_API bool Optimize (const ndFloat64 *const pool, ndInt32 strideInBytes, ndFloat64 tol, ndInt32 maxFaceCount=1<< 28)
 
D_CORE_API void Triangulate (const ndFloat64 *const vertex, ndInt32 strideInBytes, ndPolyhedra *const leftOversOut)
 
D_CORE_API void ConvexPartition (const ndFloat64 *const vertex, ndInt32 strideInBytes, ndPolyhedra *const leftOversOut)
 
D_CORE_API bool IsFaceConvex (ndEdge *const face, const ndFloat64 *const pool, ndInt32 strideInBytes) const
 
- Public Member Functions inherited from ndTree< ndEdge, ndEdgeKey >
 operator ndInt32 () const
 
ndInt32 GetCount () const
 
ndNode * GetRoot () const
 
ndNode * Minimum () const
 
ndNode * Maximum () const
 
ndNode * Find (const ndEdgeKey &key) const
 
ndNode * FindGreater (const ndEdgeKey &key) const
 
ndNode * FindLessEqual (const ndEdgeKey &key) const
 
ndNode * FindGreaterEqual (const ndEdgeKey &key) const
 
ndNode * FindCreate (const ndEdgeKey &key, bool &wasFound)
 
ndNode * GetNodeFromInfo (ndEdge &info) const
 
ndNode * Insert (const ndEdgeKey &key)
 
ndNode * Insert (ndNode *const node, const ndEdgeKey &key)
 
ndNode * Insert (const ndEdge &element, const ndEdgeKey &key)
 
ndNode * Insert (const ndEdge &element, const ndEdgeKey &key, bool &wasFound)
 
ndNode * Replace (ndEdge &element, const ndEdgeKey &key)
 
ndNode * ReplaceKey (const ndEdgeKey &oldKey, const ndEdgeKey &newKey)
 
ndNode * ReplaceKey (ndNode *const node, const ndEdgeKey &key)
 
void RemoveAll ()
 
void Remove (const ndEdgeKey &key)
 
void Remove (ndNode *const node)
 
void Unlink (ndNode *const node)
 
void SwapInfo (ndTree &tree)
 
bool SanityCheck () const
 
- Public Member Functions inherited from ndClassAlloc
 ndClassAlloc ()
 Empty default constructor.
 
 ~ndClassAlloc ()
 Empty.
 

Protected Member Functions

D_COLLISION_API void Init ()
 
virtual D_COLLISION_API void BeginFace ()
 
virtual D_COLLISION_API bool EndFace ()
 
ndFloat64 QuantizeCordinade (ndFloat64 val) const
 
bool Sanity () const
 
void PackPoints ()
 
void UnpackPoints ()
 
void PackAttibuteData ()
 
void UnpackAttibuteData ()
 
bool SeparateDuplicateLoops (ndEdge *const face)
 
ndInt32 AddInterpolatedHalfAttribute (ndEdge *const edge, ndInt32 midPoint)
 
void MergeFaces (const ndMeshEffect *const source)
 
D_COLLISION_API ndMeshEffectGetNextLayer (ndInt32 mark)
 
- Protected Member Functions inherited from ndPolyhedra
D_CORE_API ndEdgeCollapseEdge (ndEdge *const edge)
 
D_CORE_API bool PolygonizeFace (ndEdge *const face, const ndFloat64 *const pool, ndInt32 stride)
 
D_CORE_API bool TriangulateFace (ndEdge *const face, const ndFloat64 *const pool, ndInt32 stride)
 

Protected Attributes

ndString m_name
 
ndPointFormat m_points
 
ndAttibutFormat m_attrib
 
dClusterMap m_clusters
 
ndArray< ndMaterialm_materials
 
ndInt32 m_vertexBaseCount
 
ndInt32 m_constructionIndex
 

Additional Inherited Members

- Static Public Member Functions inherited from ndTree< ndEdge, ndEdgeKey >
static void FlushFreeList ()
 
- Static Public Member Functions inherited from ndClassAlloc
D_OPERATOR_NEW_AND_DELETE static D_CORE_API void * Malloc (size_t size)
 Generic allocation for any function subclass from ndClassAlloc.
 
static D_CORE_API void Free (void *const ptr)
 Generic destruction for any function subclass from ndClassAlloc.