MeshChange Class Reference

This reference page is linked to from the following overview topics: Mesh and Topology.



Detailed Description

This class represents a change to a mesh, and is used when an operation.

which modifies mesh vertices should be undoable. When you want to change the position of vertices in a mesh, and you want this change to be undoable, you should first call the function Mesh::StartChange to create a MeshChange object.

Definition at line 2165 of file mesh.h.

#include <mesh.h>

Inheritance diagram for MeshChange:
Inheritance graph
[legend]

List of all members.

Classes

struct   VertexChange
  This struct holds the change information about a single vertex. More...

Public Member Functions

const Vector OriginalPosition (unsigned int iVertexIndex) const
  This function returns the position of a vertex before this change.
Vector  OriginalNormal (unsigned int iVertexIndex) const
  This function returns the surface normal before the change for a specified vertex.
VertexChange Add (unsigned int iVertexIndex, unsigned int iFaceIndex, bool bPrecalculateLayerIndex=false)
  Register a vertex for the change, and returns the corresponding VertexChange structure.
void  Finish (bool bUndo=true, bool bMerge=false)
  This function must be called when no more vertices will be changed within the operation.

Friends

class  Mesh

Member Function Documentation

const Vector& OriginalPosition ( unsigned int  iVertexIndex ) const [inline]

This function returns the position of a vertex before this change.

Parameters:
[in] iVertexIndex Index of the vertex

Definition at line 2223 of file mesh.h.

Vector OriginalNormal ( unsigned int  iVertexIndex ) const [inline]

This function returns the surface normal before the change for a specified vertex.

Parameters:
[in] iVertexIndex Index of the vertex

Definition at line 2247 of file mesh.h.

VertexChange& Add ( unsigned int  iVertexIndex,
unsigned int  iFaceIndex,
bool  bPrecalculateLayerIndex = false 
) [inline]

Register a vertex for the change, and returns the corresponding VertexChange structure.

This function must be called before modifying the position of a vertex.

Parameters:
[in] iVertexIndex Index of the vertex
[in] iFaceIndex Index of any face which uses the vertex
[in] bPrecalculateLayerIndex When this parameter is true, the function will precalculate the layer index of the vertex.

Definition at line 2295 of file mesh.h.

void Finish ( bool  bUndo = true,
bool  bMerge = false 
)

This function must be called when no more vertices will be changed within the operation.

Parameters:
[in] bUndo When this parameter is true, the changes made to the vertex positions are automatically stored
bMerge in the undo buffer, and becomes undoable [in] If this is true the undo operation is merged into the previous one causing one single undo

Friends And Related Function Documentation

friend class Mesh [friend]

Definition at line 2351 of file mesh.h.


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

MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange
MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange MeshChange