DzGeometry Class Reference
[Object and Geometry Objects]

The base class for all mesh or geometry type objects. More...

Inheritance diagram for DzGeometry:

DzStorable DzBase QObject Object DzVertexMesh DzPolyMesh DzSubDMesh DzMRMMesh List of all members.

Methods

void addUVSet (DzVertexMap map)
Number addUVSetFromFile (String filename, String name, String label)
void beginEdit (Boolean enableUndo=true)
void cancelEdit ()
Number findUVSetIndexByLabel (String label)
void finishEdit ()
DzBox3 getBoundingBox ()
Number getNumUVSets ()
Number getNumVertices ()
DzOrientedBox3 getOrientedBox (DzVec3 pos, DzQuat rot, DzVec3 scale)
DzMap getUVs ()
DzVertexMap getUVSet (Number which)
void insertUVSet (Number idx, DzVertexMap map)
Boolean isEmpty ()
void removeAllUVSets ()
void removeUVSet (Number which)
void removeUVSet (DzVertexMap map)
void rotate (DzQuat rot)
void scale (Number scalar)
void scale (DzVec3 vec)
void setUVList (DzMap map)
void transform (DzMatrix3 matrix)
void translate (DzVec3 vec)
DzVertexMap vertexMapFromImage (Image img, DzMap::MapType type=DzMap::FLOAT_MAP)

Signals

void needRebuild (Boolean onOff)
 Signature: "needRebuild(bool)"
void uvListChanged ()
 Signature: "uvListChanged()"

Detailed Description

The base class for all mesh or geometry type objects.

The base class for all mesh and geometry objects that can be referenced by DzShape, passed through the geometry pipeline, and drawn in the 3d view.


Member Function Documentation

void DzGeometry::addUVSet ( DzVertexMap  map  ) 

Parameters:
map The new UV set to add to the geometry

Number DzGeometry::addUVSetFromFile ( String  filename,
String  name,
String  label 
)

Loads a new UV set from a native file.

Parameters:
filename The name of the file to load the UV set from
name The name of the UV set
label The label of the UV set
Returns:
The index of the UV set that was loaded, -1 on failure.

void DzGeometry::beginEdit ( Boolean  enableUndo = true  ) 

Begin an edit operation on the geometry. Most meshes will require that this function is called before any topology change (i.e. adding/removing vertices, polygons, etc).

void DzGeometry::cancelEdit (  ) 

Cancel the current edit operation on the geometry

DzVertexMap DzGeometry::findUVSetIndexByLabel ( String  label  ) 

Searches the geometry for a UV set with the given label.

Parameters:
label The label of the UV set to find.
Returns:
The index of the UV set with the matching label, or -1 if none was found.

void DzGeometry::finishEdit (  ) 

Finish the current edit operation on the geometry

DzBox3 DzGeometry::getBoundingBox (  ) 

Returns:
A local space bounding box for the geometry.

Number DzGeometry::getNumUVSets (  ) 

Returns:
The number of UV sets on the geometry.

Number DzGeometry::getNumVertices (  ) 

Returns:
The number of vertices for the geometry

Reimplemented in DzVertexMesh.

DzOrientedBox3 DzGeometry::getOrientedBox ( DzVec3  pos,
DzQuat  rot,
DzVec3  scale 
)

Returns:
A local space bounding box for the geometry.

DzMap DzGeometry::getUVs (  ) 

Gets the texture coordinates for the geometry.

Returns:
The uv set for the geometry.

DzVertexMap DzGeometry::getUVSet ( Number  which  ) 

Parameters:
which The index of the UV set to return
Returns:
The UV set at the given index, of NULL if the index is invalid.

void DzGeometry::insertUVSet ( Number  idx,
DzVertexMap  map 
)

Boolean DzGeometry::isEmpty (  ) 

Returns:
true if the geometry is empty, otherwise false.

void DzGeometry::needRebuild ( Boolean  onOff  )  [signal]

Signature: "needRebuild(bool)"

Emitted when the geometry needs to be rebuilt.

void DzGeometry::removeAllUVSets (  ) 

void DzGeometry::removeUVSet ( Number  map  ) 

void DzGeometry::removeUVSet ( DzVertexMap  map  ) 

void DzGeometry::rotate ( DzQuat  rot  ) 

Rotate this geometry by the given rotation

Parameters:
rot The quaternion that represents the rotation the geometry should rotate itself by.

void DzGeometry::scale ( Number  scalar  ) 

Scale this geometry by the given uniform scale

Parameters:
scalar The value that the geometry should scale itself by.

void DzGeometry::scale ( DzVec3  vec  ) 

Scale this geometry by the given vector

Parameters:
vec The vector that the geometry should scale itself by.

void DzGeometry::setUVList ( DzMap  map  ) 

Sets the texture coordinates for the geometry.

Parameters:
map The new uv set for the geometry.

void DzGeometry::transform ( DzMatrix3  matrix  ) 

Transform this geometry through the transformation matrix. For multiple operations (i.e. translating and rotating, or rotating, scaling and translating) this method is the most efficient. For individual operations, you should use the translate(), rotate() or scale() methods.

Parameters:
matrix The matrix that the geometry should transform itself through.

void DzGeometry::translate ( DzVec3  vec  ) 

Translate this geometry by the given vector

Parameters:
vec The vector that the geometry should translate itself by.

void DzGeometry::uvListChanged (  )  [signal]

Signature: "uvListChanged()"

Emitted when the current uv list has changed.

DzVertexMap DzGeometry::vertexMapFromImage ( Image  img,
DzMap::MapType  type = DzMap::FLOAT_MAP 
)

Caclulates a vertex map using the pixel values of the image in uv space.

Returns:
The vertex map that was calculated using the image.


Generated on Thu Sep 24 12:21:12 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.