This reference page is linked to from the following overview topics: Mesh and Topology.
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.
#include <mesh.h>
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 |
const Vector& OriginalPosition | ( | unsigned int | iVertexIndex | ) | const [inline] |
This function returns the position of a vertex before this change.
[in] | iVertexIndex | Index of the vertex |
Vector OriginalNormal | ( | unsigned int | iVertexIndex | ) | const [inline] |
This function returns the surface normal before the change for a specified vertex.
[in] | iVertexIndex | Index of the vertex |
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.
[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. |
void Finish | ( | bool | bUndo = true , |
bool | bMerge =
false |
||
) |
This function must be called when no more vertices will be changed within the operation.
[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 |
friend class Mesh [friend] |