Mesh Class Reference

This reference page is linked to from the following overview topics: Scene Graph, Mesh and Topology, Mesh Division, Picking, Sculpting and Brushes.



Detailed Description

A Mesh is a collection of vertices organized into faces, and optional.

Texture Coordinate information. Mudbox models are represented by objects of the class Geometry. Each Geometry object contains a list of Meshes, one for each subdivision level. Each mesh is either entirely triangles, or entirely quads.

Examples:

CurveBrush/CurveCreator.h, FixedFunctionMaterial/FixedFunctionMaterial.h, ImmediateModeRenderer/ImmediateModeRenderer.h, PLYImport/Importer.cpp, PtexExtractor/PtexLayout.h, PtexExtractor/PtexPaintExporter.h, PtexExtractor/PtexUtilizer.h, PtexImporter/PtexImporter.h, and ToonMaterial/ToonMaterial.h.

Definition at line 453 of file mesh.h.

#include <mesh.h>

Inheritance diagram for Mesh:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual class Geometry Geometry (void) const
  Returns a pointer to the Geometry object that this mesh belongs to.
virtual class MeshRenderer Renderer (float fLODLevel=1.0f)
  Returns a pointer to a MeshRenderer with the desired level-of-detail.
virtual void  CopyTo (Mesh *pDestination) const
  Copy the content of this mesh to another one.
virtual class Material Material (void) const
  Returns a pointer to the Material associated with this mesh.
virtual class Material MaterialOverride (void) const
  Material override. Allows user to set an alternate material.
unsigned int  VertexCount (void) const
  Returns the number of vertices in the mesh.
void  SetVertexCount (unsigned int iVertexCount)
  Sets the number of vertices in the mesh. Any existing data (that fits) will be kept.
unsigned int  TCCount (void) const
  Returns the number of texture coordinates in the mesh.
virtual void  SetTCCount (unsigned int iTCCount)
  Sets the number of texture coordinate vertices in the mesh.
bool  HasTC (void) const
  Returns true if the mesh has texture coordinates.
virtual unsigned int  UVlessPaintingStatus (void) const
  Return the status of UV-less setup. 0 means no uv-less setup, 1 means the mesh is being set up, 2 means the mesh is uv-less setup.
virtual void  SetUVlessPaintingStatus (unsigned int iStatus)
  Setup the status of UV-less setup.
const Vertex VertexArray (void) const
  This method returns a pointer to the actual array data.
const Vertex VertexData (unsigned int iVertexIndex) const
  Returns a vertex.
Vertex VertexData (unsigned int iVertexIndex)
  Returns a vertex.
const Vector VertexPosition (unsigned int iVertexIndex) const
  Returns the x,y,z position of the vertex with the given index.
Vector VertexPosition (unsigned int iVertexIndex)
  Returns the x,y,z position of the vertex with the given index.
virtual const Vector VertexOriginalPosition (unsigned int iVertexIndex) const
  Returns the position of the vertex before the current sculpting-brush stroke.
const TC VertexTC (unsigned int iVertexTCIndex) const
  Returns the specified texture coordinate.
Vector  VertexNormal (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index.
unsigned int  VertexStrokeID (unsigned int iVertexIndex) const
  Internal use only. Do not call this method.
float  VertexMask (unsigned int iVertexIndex) const
  Returns the layer mask of the vertex with the given index for the.
float  VertexFreeze (unsigned int iVertexIndex) const
  Returns the freeze value of the vertex with the given index.
virtual unsigned int  FrozenVertexCount (void) const
  Returns the number of vertices having a non-zero freeze value.
const tnormal VertexNormalArray (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index as an array of.
tnormalv  VertexNormalValue (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index as a single.
unsigned int  VertexNormalIndex (unsigned int iVertexIndex) const
virtual AxisAlignedBoundingBox  BoundingBox (void) const
  Returns the bounding box of the mesh in local space.
virtual AxisAlignedBoundingBox  TCBoundingBox (void) const
  Returns the bounding box of the UV shell of the mesh.
void  SetVertexPosition (unsigned int iVertexIndex, const Vector &vPosition)
  Sets the position of the vertex with the given index.
void  AddVertexPosition (unsigned int iVertexIndex, const Vector &vPosition)
  Adds vPosition to the current position of the vertex with the given index.
void  SetVertexNormal (unsigned int iVertexIndex, int *pNormal)
  Internal use only. Do not call.
void  SetVertexNormal (unsigned int iVertexIndex, const Vector &vNormal)
  Sets the normal of the vertex with the given index.
void  SetVertexNormal (unsigned int iVertexIndex, int iNormal)
  Internal use only. Do not call.
virtual void  SetVertexFreeze (unsigned int iVertexIndex, unsigned int iFaceIndex, float fFreeze)
  Sets the freeze value for the vertex with the given index.
virtual void  SetFreezeValues (Store< float > &aNewFreeze)
  Sets the freeze values for the whole mesh from the given array.
void  SetVertexMask (unsigned int iVertexIndex, unsigned int iFaceIndex, float fFMask)
  Internal use only. Do not call.
void  SetVertexStrokeID (unsigned int iVertexIndex, unsigned int iStrokeID) const
  Internal use only. Do not call.
virtual void  MarkVertex (unsigned int iVertexIndex)
  Mark a particular vertex.
virtual bool  IsVertexMarked (unsigned int iVertexIndex)
  Returns true if a particular vertex is marked.
virtual void  ClearVertexMarks (void)
  Clears all vertex marks.
virtual unsigned int  VertexExternalIndex (unsigned int iVertexIndex) const
  Returns the external vertex index for a given vertex.
virtual void  SetVertexExternalIndex (unsigned int iVertexIndex, unsigned int iExternalVertexIndex)
  Sets the external vertex index for a given internal vertex index in the Mudbox mesh.
const Vector TriangleVertexPosition (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the position of a corner of a mesh face.
const Vector QuadVertexPosition (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the position of a corner of a mesh face. Can be used for quadric meshes only.
const TC TriangleVertexTC (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the texture coordinates of a corner of a mesh face.
const TC QuadVertexTC (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the texture coordinates of a corner of a mesh face. Can be used for quadric meshes only.
Vector  TriangleVertexNormal (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a mesh face. Can be used for triangular meshes only.
Vector  QuadVertexNormal (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a mesh face. Can be used for quad meshes only.
float  TriangleVertexFreeze (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the freeze value of a corner of a mesh face. Can be used for triangular meshes only.
float  QuadVertexFreeze (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the freeze value of a corner of a mesh face. (0.0 is not frozen,.
const tnormal TriangleVertexNormalArray (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a triangle mesh face as an array of 16-bit signed values.
const tnormal QuadVertexNormalArray (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a quad mesh face as an array of 16-bit signed values.
tnormalv  TriangleVertexNormalValue (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal a corner of a triangle mesh face as a single 64-bit signed value.
tnormalv  QuadVertexNormalValue (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal a corner of a quad mesh face as a single 64-bit signed value.
virtual void  EnumerateFaces (unsigned int iFaceIndex, FaceEnumerator *pEnumerator, bool bSymmetry=false)
  This method takes an operation that you define (derived from.
virtual void  EnumerateNearestFaces (unsigned int iFaceIndex, FaceEnumerator *pOperation)
  This method takes an operation that you define (derived from.
virtual void  EnumerateVertices (unsigned int iFaceIndex, VertexEnumerator *pEnumerator)
  This method takes an operation that you define (derived from VertexEnumerator)
unsigned int  EnumerateAdjacentVertices (AdjacentVertexEnumerator *pEnumerator, unsigned int iVertexIndex, unsigned int iFaceIndex)
  This method takes an operation that you define (derived from.
virtual int  MeshVersion (void) const
  Obsolete method; do not use.
virtual void  SmoothTextureCoordinates (float fStrength)
  Obsolete method; do not use.
virtual void  RecalculateNormals (bool bKeep=false)
  Recalculates all the vertex normals. This is called after the mesh shape has changed.
virtual void  RecalculateAdjacency (bool bForce=true)
  Causes the mesh to build internal adjacency tables, if they don't exist already.
virtual unsigned int  CollectionID (void) const
  Obsolete method; do not use.
virtual void  IncreaseCollectionID (void)
  Obsolete method; do not use.
virtual bool  IsSelected (void)
  Returns true if the whole mesh is selected.
virtual void  SetSelected (bool bOn=true)
  Selects or unselects the whole mesh.
virtual class LayerMeshData AddLayer (void)
  Creates and returns a new empty sculpt layer for this mesh, and makes it current.
virtual void  RemoveLayer (LayerMeshData *pLayer)
  Removes a sculpt layer from the mesh and deletes it. Users should not reference.
virtual class LayerMeshData ActiveLayer (void) const
  Returns a pointer to the current sculpt layer for this mesh.
virtual bool  IsActiveLevel (void) const
  Returns true if this mesh is the currently displayed mesh of the Geometry object it is part of.
virtual bool  Lock (class MeshUnlocker *pUnlocker=NULL)
  Locks the mesh for exclusive modifications.
virtual bool  Unlock (void)
  Unlock the mesh.
virtual bool  IsLocked (void)
  Returns true if the mesh is locked.
class MeshChange StartChange (void)
  This method must be called by any plugin before it modifies vertex data.
virtual bool  IsNSided (void)
  Returns if the mesh contains non tri or quad faces.
virtual bool  HasExpandedTCs (void) const
  Returns if the mesh has edge bleeded TC layout.
virtual void  CreateExpandedTCs (void)
  Calculates the edge bleeded TC layout.
virtual TC ExpandedTC (unsigned int index)
  Returns the Expanded TC value for the given vertex.
virtual bool  SupportsTangentMirror () const
  Returns if the mesh supports tangent mirror mode.
virtual unsigned int  TangentMirroredFaceIndex (unsigned int iFaceIndex) const
  Returns the index of tangent mirrored face.

Public Attributes

Store< TC m_pTCs
aevent  Modified
  This event is triggered when the mesh has been editer. During a sculpt stroke this event is only triggered once at the end.

Protected Member Functions

  Mesh (FaceType eFaceType=typeQuadric)
  Constructor. Do not use directly.

Protected Attributes

Store< Vertex m_pVertices
unsigned int  m_iVertexCount

Constructor & Destructor Documentation

Mesh ( FaceType  eFaceType = typeQuadric ) [protected]

Constructor. Do not use directly.

Instead of constructing Meshes directly, you should use CreateInstance() like this:

        Mesh *myNewMesh = CreateInstance<Mesh>();  
Parameters:
[in] eFaceType Must be one of Topology::typeQuadric or Topology::typeTriangular

Member Function Documentation

virtual class Geometry* Geometry ( void  ) const [virtual]

Returns a pointer to the Geometry object that this mesh belongs to.

Reimplemented in SubdivisionLevel.

virtual class MeshRenderer* Renderer ( float  fLODLevel = 1.0f ) [virtual]

Returns a pointer to a MeshRenderer with the desired level-of-detail.

(see MeshRenderer for more information)

Parameters:
[in] fLODLevel the desired level-of-detail
virtual void CopyTo ( Mesh pDestination ) const [virtual]

Copy the content of this mesh to another one.

virtual class Material* Material ( void  ) const [virtual]

Returns a pointer to the Material associated with this mesh.

virtual class Material* MaterialOverride ( void  ) const [virtual]

Material override. Allows user to set an alternate material.

to render to do temporary rendering (e.g. selection)

unsigned int VertexCount ( void  ) const [inline]

Returns the number of vertices in the mesh.

Definition at line 529 of file mesh.h.

{ return VertexNormal( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
void SetVertexCount ( unsigned int  iVertexCount )

Sets the number of vertices in the mesh. Any existing data (that fits) will be kept.

Parameters:
[in] iVertexCount the number of vertices that should be in the mesh
unsigned int TCCount ( void  ) const [inline]

Returns the number of texture coordinates in the mesh.

Definition at line 545 of file mesh.h.

{ return VertexFreeze( QuadIndex( iQuadIndex, iCornerIndex ) ); };
virtual void SetTCCount ( unsigned int  iTCCount ) [virtual]

Sets the number of texture coordinate vertices in the mesh.

Parameters:
[in] iTCCount the number of texture coordinate vertices in the mesh
bool HasTC ( void  ) const [inline]

Returns true if the mesh has texture coordinates.

Definition at line 561 of file mesh.h.

{ return VertexNormalArray( QuadIndex( iQuadIndex, iCornerIndex ) ); };
virtual unsigned int UVlessPaintingStatus ( void  ) const [virtual]

Return the status of UV-less setup. 0 means no uv-less setup, 1 means the mesh is being set up, 2 means the mesh is uv-less setup.

virtual void SetUVlessPaintingStatus ( unsigned int  iStatus ) [virtual]

Setup the status of UV-less setup.

Parameters:
[in] iStatus status value ranging from 0 to 2. 0 means no uv-less setup, 1 means the mesh is being set up, 2 means the mesh is uv-less setup.
const Vertex* VertexArray ( void  ) const [inline]

This method returns a pointer to the actual array data.

This is used in cases where very fast access to the array data is required (i.e. not going through methods)

Definition at line 591 of file mesh.h.

:
const Vertex& VertexData ( unsigned int  iVertexIndex ) const [inline]

Returns a vertex.

Parameters:
[in] iVertexIndex index of the vertex to be retrieved

Definition at line 597 of file mesh.h.

         :
Vertex& VertexData ( unsigned int  iVertexIndex ) [inline]

Returns a vertex.

Parameters:
[in] iVertexIndex index of the vertex to be retrieved

Definition at line 607 of file mesh.h.

         :
const Vector& VertexPosition ( unsigned int  iVertexIndex ) const [inline]

Returns the x,y,z position of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 617 of file mesh.h.

         :
Vector& VertexPosition ( unsigned int  iVertexIndex ) [inline]

Returns the x,y,z position of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 627 of file mesh.h.

         :
virtual const Vector& VertexOriginalPosition ( unsigned int  iVertexIndex ) const [inline, virtual]

Returns the position of the vertex before the current sculpting-brush stroke.

If no stroke is in progress, result is the same as VertexPosition().

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 641 of file mesh.h.

         :
const TC& VertexTC ( unsigned int  iVertexTCIndex ) const [inline]

Returns the specified texture coordinate.

Parameters:
[in] iVertexTCIndex index of the texture coordinate (not the same as a vertex index)

Definition at line 651 of file mesh.h.

         :
Vector VertexNormal ( unsigned int  iVertexIndex ) const [inline]

Returns the normal of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 661 of file mesh.h.

         :
unsigned int VertexStrokeID ( unsigned int  iVertexIndex ) const [inline]

Internal use only. Do not call this method.

Definition at line 671 of file mesh.h.

         :
float VertexMask ( unsigned int  iVertexIndex ) const [inline]

Returns the layer mask of the vertex with the given index for the.

current sculpt layer. Each sculpt layer contains vertex offsets for some subset of vertices in the mesh. Each vertex in a mesh has a mask value for each sculpt layer associated with it. This mask determines how much the vertex offset of that sculpt layer contributes to the final position of the vertex when all the sculpt layers are composited together. This mask is a multiplier, so 0.0 means the layer offset is completely masked, and 1.0 means it is not masked at all.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 697 of file mesh.h.

         :
float VertexFreeze ( unsigned int  iVertexIndex ) const [inline]

Returns the freeze value of the vertex with the given index.

(0.0 is not frozen; 1.0 is completely frozen) The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 719 of file mesh.h.

                             : public Node
{
    DECLARE_CLASS;
public:
    virtual void Freeze( Mesh *pMesh, Store<float> aFreezeData, bool bMerge = false );
virtual unsigned int FrozenVertexCount ( void  ) const [virtual]

Returns the number of vertices having a non-zero freeze value.

If the result is 0, no part of the mesh is frozen.

const tnormal* VertexNormalArray ( unsigned int  iVertexIndex ) const [inline]

Returns the normal of the vertex with the given index as an array of.

16-bit signed values.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 739 of file mesh.h.

                                  : public TreeNode
tnormalv VertexNormalValue ( unsigned int  iVertexIndex ) const [inline]

Returns the normal of the vertex with the given index as a single.

64-bit signed value.

Parameters:
[in] iVertexIndex index of the vertex

Definition at line 751 of file mesh.h.

                                  : public TreeNode
unsigned int VertexNormalIndex ( unsigned int  iVertexIndex ) const [inline]

Definition at line 761 of file mesh.h.

{
    DECLARE_CLASS;
public:
virtual AxisAlignedBoundingBox BoundingBox ( void  ) const [virtual]

Returns the bounding box of the mesh in local space.

virtual AxisAlignedBoundingBox TCBoundingBox ( void  ) const [virtual]

Returns the bounding box of the UV shell of the mesh.

void SetVertexPosition ( unsigned int  iVertexIndex,
const Vector vPosition 
) [inline]

Sets the position of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex
[in] vPosition the new vertex x,y,z position in local space

Definition at line 781 of file mesh.h.

{
void AddVertexPosition ( unsigned int  iVertexIndex,
const Vector vPosition 
) [inline]

Adds vPosition to the current position of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex
[in] vPosition x,y,z offset to be added to the current position in local space

Definition at line 793 of file mesh.h.

{
    class Mesh *m_pMesh;            
    unsigned int m_iFaceIndex;  
    float m_fRelativeRange;     
    Vector m_vLocalPosition;    
    Vector m_vLocalNormal;      
void SetVertexNormal ( unsigned int  iVertexIndex,
int *  pNormal 
) [inline]

Internal use only. Do not call.

Definition at line 807 of file mesh.h.

                        : public TreeNode
void SetVertexNormal ( unsigned int  iVertexIndex,
const Vector vNormal 
) [inline]

Sets the normal of the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex
[in] vNormal the new vertex normal in local space

Definition at line 823 of file mesh.h.

                        : public TreeNode
void SetVertexNormal ( unsigned int  iVertexIndex,
int  iNormal 
) [inline]

Internal use only. Do not call.

Definition at line 857 of file mesh.h.

                        : public TreeNode
virtual void SetVertexFreeze ( unsigned int  iVertexIndex,
unsigned int  iFaceIndex,
float  fFreeze 
) [virtual]

Sets the freeze value for the vertex with the given index.

Parameters:
[in] iVertexIndex index of the vertex
fFreeze WHY DO WE NEED A FACE INDEX HERE? [in] New freeze value, ranging from 0.0 (not frozen) to 1.0 (completely frozen)
virtual void SetFreezeValues ( Store< float > &  aNewFreeze ) [virtual]

Sets the freeze values for the whole mesh from the given array.

Parameters:
[in] aNewFreeze the array of freeze values
void SetVertexMask ( unsigned int  iVertexIndex,
unsigned int  iFaceIndex,
float  fFMask 
)

Internal use only. Do not call.

void SetVertexStrokeID ( unsigned int  iVertexIndex,
unsigned int  iStrokeID 
) const [inline]

Internal use only. Do not call.

Definition at line 897 of file mesh.h.

                        : public TreeNode
virtual void MarkVertex ( unsigned int  iVertexIndex ) [virtual]

Mark a particular vertex.

This method, along with Mesh::IsVertexMarked() and Mesh::ClearVertexMarks() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete.

Parameters:
[in] iVertexIndex index of the vertex to mark
virtual bool IsVertexMarked ( unsigned int  iVertexIndex ) [virtual]

Returns true if a particular vertex is marked.

This method, along with Mesh::MarkVertex() and Mesh::ClearVertexMarks() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete.

Parameters:
[in] iVertexIndex index of the vertex
virtual void ClearVertexMarks ( void  ) [virtual]

Clears all vertex marks.

This method, along with Mesh::MarkVertex() and Mesh::IsVertexMarked() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete. This is a very fast function.

virtual unsigned int VertexExternalIndex ( unsigned int  iVertexIndex ) const [virtual]

Returns the external vertex index for a given vertex.

Internally, Mudbox may reorganize the layout of an imported mesh to optimize performance. This can change the vertex indices and make it difficult to re-import newer versions of the same mesh for tasks like importing a mesh as a sculpt layer. This method can be used to determine the original vertex index is for a given internal vertex index in the Mudbox mesh. When exporting meshes from Mudbox or when trying to map vertices from an imported mesh to this mesh's vertices, you should always use the external vertex indices.

Parameters:
[in] iVertexIndex Internal vertex index within the Mesh
virtual void SetVertexExternalIndex ( unsigned int  iVertexIndex,
unsigned int  iExternalVertexIndex 
) [virtual]

Sets the external vertex index for a given internal vertex index in the Mudbox mesh.

See VertexExternalIndex()

Parameters:
[in] iVertexIndex Internal vertex index
[in] iExternalVertexIndex The new external vertex index that the internal index should map to.
const Vector& TriangleVertexPosition ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the position of a corner of a mesh face.

Can be used for triangular meshes only.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1005 of file mesh.h.

                                 : public TreeNode
const Vector& QuadVertexPosition ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the position of a corner of a mesh face. Can be used for quadric meshes only.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1017 of file mesh.h.

                                 : public TreeNode
const TC& TriangleVertexTC ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the texture coordinates of a corner of a mesh face.

Can be used for triangular meshes only.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1031 of file mesh.h.

                                 : public TreeNode
const TC& QuadVertexTC ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the texture coordinates of a corner of a mesh face. Can be used for quadric meshes only.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1043 of file mesh.h.

                                 : public TreeNode
{
    DECLARE_CLASS;

public:
    virtual Vector SmoothPosition( 
Vector TriangleVertexNormal ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal of a corner of a mesh face. Can be used for triangular meshes only.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1055 of file mesh.h.

                            : public Node
Vector QuadVertexNormal ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal of a corner of a mesh face. Can be used for quad meshes only.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1067 of file mesh.h.

                            : public Node
float TriangleVertexFreeze ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the freeze value of a corner of a mesh face. Can be used for triangular meshes only.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1079 of file mesh.h.

                            : public Node
{
    MeshChange( Mesh *m_pMesh );
float QuadVertexFreeze ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the freeze value of a corner of a mesh face. (0.0 is not frozen,.

1.0 is completely frozen) Can be used for quadric meshes only.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1093 of file mesh.h.

        {
            tnormalv m_iNormal;
            tnormal m_vNormal[4];
const tnormal* TriangleVertexNormalArray ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal of a corner of a triangle mesh face as an array of 16-bit signed values.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1105 of file mesh.h.

    {
const tnormal* QuadVertexNormalArray ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal of a corner of a quad mesh face as an array of 16-bit signed values.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1117 of file mesh.h.

    {
tnormalv TriangleVertexNormalValue ( unsigned int  iTriangleIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal a corner of a triangle mesh face as a single 64-bit signed value.

Parameters:
[in] iTriangleIndex index of a triangular face
[in] iCornerIndex index of a corner in that face (0, 1, or 2)

Definition at line 1129 of file mesh.h.

           :
tnormalv QuadVertexNormalValue ( unsigned int  iQuadIndex,
unsigned int  iCornerIndex 
) const [inline]

Returns the normal a corner of a quad mesh face as a single 64-bit signed value.

Parameters:
[in] iQuadIndex index of a quad face
[in] iCornerIndex index of a corner of that face (0, 1, 2, or 3)

Definition at line 1141 of file mesh.h.

          :
virtual void EnumerateFaces ( unsigned int  iFaceIndex,
FaceEnumerator pEnumerator,
bool  bSymmetry = false 
) [virtual]

This method takes an operation that you define (derived from.

FaceEnumerator) and applies it to the specified face, and sequentially to its neighbors, then the neighbors of those faces, until the mesh has been covered. In normal use, the entire mesh would not be covered. The FaceEnumerator's Tester() function returns false to limit the spread to a particular area. For example, this is used by sculpt operations to touch all the faces inside the brush ring. See FaceEnumerator for more details.

Parameters:
[in] iFaceIndex the index of the starting face
[in] pEnumerator a pointer to a FaceEnumerator that you define
[in] bSymmetry make the enumerator follow the defined symmetry. This will probably be removed in future; you should set this to false.
virtual void EnumerateNearestFaces ( unsigned int  iFaceIndex,
FaceEnumerator pOperation 
) [virtual]

This method takes an operation that you define (derived from.

FaceEnumerator) and applies it to the specified face, and sequentially to its immediate neighbours. See FaceEnumerator for more details.

Parameters:
[in] iFaceIndex the index of the starting face
[in] pOperation a pointer to a FaceEnumerator that you define
virtual void EnumerateVertices ( unsigned int  iFaceIndex,
VertexEnumerator pEnumerator 
) [virtual]

This method takes an operation that you define (derived from VertexEnumerator)

and applies it to all the vertices of the specified face. See VertexEnumerator for more details.

Parameters:
[in] iFaceIndex the index of the starting face
[in] pEnumerator a pointer to a VertexEnumerator that you define
unsigned int EnumerateAdjacentVertices ( AdjacentVertexEnumerator pEnumerator,
unsigned int  iVertexIndex,
unsigned int  iFaceIndex 
)

This method takes an operation that you define (derived from.

VertexEnumerator) and applies it to all the vertices adjacent to the specified one. It returns the number of vertices that were visited. See VertexEnumerator for more details.

Parameters:
[in] pEnumerator a pointer to a VertexEnumerator that you define
[in] iVertexIndex the index of the starting vertex
[in] iFaceIndex index of any face adjacent to that vertex
virtual int MeshVersion ( void  ) const [virtual]

Obsolete method; do not use.

virtual void SmoothTextureCoordinates ( float  fStrength ) [virtual]

Obsolete method; do not use.

virtual void RecalculateNormals ( bool  bKeep = false ) [virtual]

Recalculates all the vertex normals. This is called after the mesh shape has changed.

Parameters:
bKeep Not used
virtual void RecalculateAdjacency ( bool  bForce = true ) [virtual]

Causes the mesh to build internal adjacency tables, if they don't exist already.

Parameters:
[in] bForce Force the tables to be re-built, even if they already exist.
virtual unsigned int CollectionID ( void  ) const [virtual]

Obsolete method; do not use.

virtual void IncreaseCollectionID ( void  ) [virtual]

Obsolete method; do not use.

virtual bool IsSelected ( void  ) [virtual]

Returns true if the whole mesh is selected.

virtual void SetSelected ( bool  bOn = true ) [virtual]

Selects or unselects the whole mesh.

virtual class LayerMeshData* AddLayer ( void  ) [virtual]

Creates and returns a new empty sculpt layer for this mesh, and makes it current.

virtual void RemoveLayer ( LayerMeshData pLayer ) [virtual]

Removes a sculpt layer from the mesh and deletes it. Users should not reference.

pLayer after calling this method.

Parameters:
[in] pLayer The layer to remove.
virtual class LayerMeshData* ActiveLayer ( void  ) const [virtual]

Returns a pointer to the current sculpt layer for this mesh.

virtual bool IsActiveLevel ( void  ) const [virtual]

Returns true if this mesh is the currently displayed mesh of the Geometry object it is part of.

virtual bool Lock ( class MeshUnlocker pUnlocker = NULL ) [virtual]

Locks the mesh for exclusive modifications.

The caller of this function will get exclusive rights to modify the data stored in the mesh if the return value is true. In other words, mudbox guarantees that no other code will modify the mesh until it is unlocked. The caller can pass the address of a MeshUnlocker objects, which will be used to determine if the mesh can be unlocked, and can perform actions before the unlock happens.

Parameters:
[in] pUnlocker Address of the unlocker object. If this parameter is NULL, the object can be unlocked any time
virtual bool Unlock ( void  ) [virtual]

Unlock the mesh.

Returns true if the operation was executed successfully, or if the mesh was unlocked at the time of the call. If the mesh was locked, and a MeshUnlocker object was specified by the Lock call, that MeshUnlocker object will be used to determine if the mesh can be unlocked.

virtual bool IsLocked ( void  ) [virtual]

Returns true if the mesh is locked.

class MeshChange* StartChange ( void  )

This method must be called by any plugin before it modifies vertex data.

It returns a MeshChange object that will hold the needed undo information.

virtual bool IsNSided ( void  ) [virtual]

Returns if the mesh contains non tri or quad faces.

virtual bool HasExpandedTCs ( void  ) const [virtual]

Returns if the mesh has edge bleeded TC layout.

Can be used instead of the normal TC layot if we want to modify texture without artifact at shell borders.

virtual void CreateExpandedTCs ( void  ) [virtual]

Calculates the edge bleeded TC layout.

virtual TC& ExpandedTC ( unsigned int  index ) [virtual]

Returns the Expanded TC value for the given vertex.

virtual bool SupportsTangentMirror ( ) const [virtual]

Returns if the mesh supports tangent mirror mode.

virtual unsigned int TangentMirroredFaceIndex ( unsigned int  iFaceIndex ) const [virtual]

Returns the index of tangent mirrored face.


Member Data Documentation

Definition at line 1415 of file mesh.h.

This event is triggered when the mesh has been editer. During a sculpt stroke this event is only triggered once at the end.

Definition at line 1421 of file mesh.h.

Store<Vertex> m_pVertices [protected]

Definition at line 1427 of file mesh.h.

unsigned int m_iVertexCount [protected]

Definition at line 1429 of file mesh.h.


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

Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh
Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh