DzSubDMesh Class Reference
[Object and Geometry Objects]

A subdivision surface mesh. More...

Inheritance diagram for DzSubDMesh:

DzVertexMesh DzGeometry DzStorable DzBase QObject Object List of all members.

Methods

void activateFaceGroup (Number which)
Number activateFaceGroup (String name)
void activateMaterial (Number which)
void addFace (Number v1, Number uv1, Number v2, Number uv2, Number v3, Number uv3, Number v4, Number uv4)
DzSubDGroup findFaceGroup (String name)
void fromPolyMesh (DzPolyMesh mesh)
DzSubDGroup getActiveFaceGroup ()
DzSubDGroup getActiveMaterialGroup ()
Number getEdgeInterpolationMode ()
DzSubDGroup getFaceGroup (Number i)
DzSubDGroup getMaterialGroup (Number which)
Number getNumEdges ()
Number getNumFaceGroups ()
Number getNumMaterialGroups ()
Number getNumNormals ()
Number getNumPatches ()
void removeAllPatches ()
void removePatch (Number polyIdx)
void setEdgeInterpolationMode (Number mode)
void subdivideCatmullClark (Number level)
DzPolyMesh toPolyMesh ()

Constructors

 DzSubDMesh ()

Detailed Description

A subdivision surface mesh.


Constructor & Destructor Documentation

DzSubDMesh::DzSubDMesh (  ) 

Default Constructor


Member Function Documentation

void DzSubDMesh::activateFaceGroup ( Number  which  ) 

Activates the given face group - all faces added after this call will be added to the group.

Parameters:
which The index of the face group to activate. If the index exceeds the number of groups current on the mesh, then groups are created until the number of groups is equal to the requested index.

Number DzSubDMesh::activateFaceGroup ( String  name  ) 

Activates the given face group - all faces added after this call will be added to the group. If the named group is not found, a new empty group by that name is created and made active.

Parameters:
name The name of the face group to activate.
Returns:
The index of the group that was activated.

void DzSubDMesh::activateMaterial ( Number  which  ) 

Activates the given material group - all faces added after this call will be added to the material.

Parameters:
which The index of the material group to activate.

void DzSubDMesh::addFace ( Number  v1,
Number  uv1,
Number  v2,
Number  uv2,
Number  v3,
Number  uv3,
Number  v4,
Number  uv4 
)

Adds a new face to the mesh.

Parameters:
v1 Index into the vertex list for the first vertex of the face.
uv1 Index into the texture coordinate list for the first vertex of the face.
v2 Index into the vertex list for the second vertex of the face.
uv2 Index into the texture coordinate list for the second vertex of the face.
v3 Index into the vertex list for the third vertex of the face.
uv3 Index into the texture coordinate list for the third vertex of the face.
v4 Index into the vertex list for the fourth vertex of the face.
uv4 Index into the texture coordinate list for the fourth vertex of the face.

DzSubDGroup DzSubDMesh::findFaceGroup ( String  name  ) 

Returns:
The face group with the given name in the mesh. NULL if no matching face group exists.

void DzSubDMesh::fromPolyMesh ( DzPolyMesh  mesh  ) 

Populates this mesh with a subdivision representation of the given poly mesh.

Parameters:
mesh The mesh from which to create a subdivision mesh.

DzSubDGroup DzSubDMesh::getActiveFaceGroup (  ) 

Returns:
The currently active face group in the mesh. NULL if no face group is active.

DzSubDGroup DzSubDMesh::getActiveMaterialGroup (  ) 

Returns:
The currently active material group in the mesh. NULL if no material group is active.

Number DzSubDMesh::getEdgeInterpolationMode (  ) 

Returns:
The edge interpolation mode.
Todo:
Shouldn't the return value for this be an enum instead?

DzSubDGroup DzSubDMesh::getFaceGroup ( Number  which  ) 

Returns:
The face group at the given index in the mesh. NULL if the index is invalid.

DzSubDGroup DzSubDMesh::getMaterialGroup ( Number  which  ) 

Parameters:
which The index of the desired material group.
Returns:
The material group at the given index in the mesh. NULL if the index is invalid.

Number DzSubDMesh::getNumEdges (  ) 

Returns:
The number of edges in the mesh.

Number DzSubDMesh::getNumFaceGroups (  ) 

Returns:
The number of face groups in the mesh.

Number DzSubDMesh::getNumMaterialGroups (  ) 

Returns:
The number of material groups in the mesh.

Number DzSubDMesh::getNumNormals (  ) 

Returns:
The number of normals in the mesh.

Number DzSubDMesh::getNumPatches (  ) 

Returns:
The number of patches in the mesh.

void DzSubDMesh::removeAllPatches (  ) 

Removes all the patches from the mesh.

void DzSubDMesh::removePatch ( Number  polyIdx  ) 

Removes the patch at the given index from the mesh. Not implemented.

Parameters:
polyIdx Not used.

void DzSubDMesh::setEdgeInterpolationMode ( Number  mode  ) 

Set the edge interpolation mode.

Parameters:
mode The edge interpolation mode to set.
Todo:
Describe the valid values for mode. Shouldn't this be an enum instead?

void DzSubDMesh::subdivideCatmullClark ( Number  level  ) 

Subdivides the mesh the given number of times. Each subdivision quadruples the facet count for the mesh - large numbers of subdivisions will likely cause the operation to run out of memory. Typically models are subdivided 1 to 3 times, though in some cases a larger number of subdivisions is reasonable.

Attention:
This operation is not reversible! Calling this function permanently modifies the mesh. If you want to change the subdivision level of an item in the viewport or at render time, use the subdivision level controls - see DzSubDProp::getInteractiveLevelControl(), DzSubDProp::getRenderLevelControl, DzSubDFigure::getInteractiveLevelControl() and DzSubDFigure::getRenderLevelControl.

DzPolyMesh * DzSubDMesh::toPolyMesh (  ) 

Converts this mesh into a poly mesh.

Returns:
A new poly mesh representation of this subdivision mesh.


Generated on Thu Sep 24 12:21:16 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.