Inheritance diagram for DzGeometry:
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()" |
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.
void DzGeometry::addUVSet | ( | DzVertexMap | map | ) |
map | The new UV set to add to the geometry |
Loads a new UV set from a native file.
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 |
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.
label | The label of the UV set to find. |
void DzGeometry::finishEdit | ( | ) |
Finish the current edit operation on the geometry
DzBox3 DzGeometry::getBoundingBox | ( | ) |
Number DzGeometry::getNumUVSets | ( | ) |
Number DzGeometry::getNumVertices | ( | ) |
DzOrientedBox3 DzGeometry::getOrientedBox | ( | DzVec3 | pos, | |
DzQuat | rot, | |||
DzVec3 | scale | |||
) |
DzMap DzGeometry::getUVs | ( | ) |
Gets the texture coordinates for the geometry.
DzVertexMap DzGeometry::getUVSet | ( | Number | which | ) |
which | The index of the UV set to return |
void DzGeometry::insertUVSet | ( | Number | idx, | |
DzVertexMap | map | |||
) |
Boolean DzGeometry::isEmpty | ( | ) |
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
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
scalar | The value that the geometry should scale itself by. |
void DzGeometry::scale | ( | DzVec3 | vec | ) |
Scale this geometry by the given vector
vec | The vector that the geometry should scale itself by. |
void DzGeometry::setUVList | ( | DzMap | map | ) |
Sets the texture coordinates for the geometry.
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.
matrix | The matrix that the geometry should transform itself through. |
void DzGeometry::translate | ( | DzVec3 | vec | ) |
Translate this geometry by the given vector
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.