DzShape Class Reference
[Object and Geometry Objects]

A container class for a geometry and related materials, etc. More...

Inheritance diagram for DzShape:

DzElement DzBase QObject Object DzPolyShape DzSubDBase DzMRMShape DzSubDFigure DzSubDShape DzSubDProp List of all members.

Methods

DzError addMaterial (DzMaterial mat)
void clearMaterialSelection ()
DzMaterial findMaterial (String name)
Number findMaterialIndex (DzMaterial mat)
Number findMaterialIndex (String name)
Array getAllMaterials ()
Array getAllRenderPrioritizedMaterials ()
Array getAllSelectedMaterials ()
DzGeometry getGeometry ()
DzMaterial getMaterial (Number which)
Number getNumMaterials ()
Number getNumSelectedMaterials ()
DzMaterial getSelectedMaterial (Number which)
Boolean hasMultipleLOD ()
DzError insertMaterial (DzMaterial newmat, Number index=-1)
void rebuildBaseMap (Number whichUVSet)
DzError removeMaterial (DzMaterial mat)
DzError replaceMaterial (DzMaterial current, DzMaterial newMat)

Signals

void geomChanged ()
 Signature: "geomChanged()"
void materialAdded (DzMaterial mat)
 Signature: "materialAdded(DzMaterial*)"
void materialChanged ()
 Signature: "materialChanged()"
void materialListChanged ()
 Signature: "materialListChanged()"
void materialRemoved (DzMaterial mat)
 Signature: "materialRemoved(DzMaterial*)"
void materialSelected (DzMaterial mat)
 Signature: "materialSelected(DzMaterial*)"
void materialSelectionChanged ()
 Signature: "materialSelectionChanged()"
void materialUnselected (DzMaterial mat)
 Signature: "materialUnselected(DzMaterial*)"
void smoothingChanged ()
 Signature: "smoothingChanged()"
void uvsChanged ()
 Signature: "uvsChanged()"

Detailed Description

A container class for a geometry and related materials, etc.

A container class that references a DzGeometry and holds all the pertinent material definitions, etc for that geometry.


Member Function Documentation

DzError DzShape::addMaterial ( DzMaterial  mat  ) 

Adds the given material to the available material list for this shape. Also sets the currently active material index.

Parameters:
newmat Shared pointer referencing the material to be added to the list of materials for this shape.

void DzShape::clearMaterialSelection (  ) 

Sets the selection status to false for all materials of this shape.

DzMaterial DzShape::findMaterial ( String  name  ) 

Called to find a named material. Returns NULL if the material does not exist.

Returns:
The first material found in the list for the shadpe, with the given name.
Parameters:
name Name of the material to find

Number DzShape::findMaterialIndex ( DzMaterial  mat  ) 

Returns:
The index of the given material in the list, -1 if the material is not in the list for this shape.
Parameters:
mat Shared pointer referencing the material to find

Number DzShape::findMaterialIndex ( String  name  ) 

Returns:
The index of the first material found in the list with the given name, -1 if no material with that name is found.
Parameters:
name Name of the material to find

DzShape::geomChanged (  )  [signal]

Signature: "geomChanged()"

Emitted when the geometry referenced by this shape changes or is swapped out.

Array DzShape::getAllMaterials (  ) 

Returns:
A list of all materials for this shape

Array DzShape::getAllRenderPrioritizedMaterials (  ) 

Returns:
A list of all materials in this shape, ordered by render priority from highest to lowest.

Array DzShape::getAllSelectedMaterials (  ) 

Returns:
A list of all selected materials in this shape

DzGeometry DzShape::getGeometry (  ) 

Returns:
The geometry this shape references.

Reimplemented in DzPolyShape.

DzMaterial DzShape::getMaterial ( Number  which  ) 

Returns:
A shared material in the list for the shape
Parameters:
which Index of the material in the list to return

Number DzShape::getNumMaterials (  ) 

Returns:
The number of materials in the list for this shape.

Number DzShape::getNumSelectedMaterials (  ) 

Returns:
The number of selected materials in the list for this shape.

DzMaterial DzShape::getSelectedMaterial ( Number  which  ) 

Returns:
A shared material in the selected list for the shape
Parameters:
which Index of the material in the list of selected materials to return

Boolean DzShape::hasMultipleLOD (  ) 

Returns:
true if the shape has multiple levels of detail, otherwise false.

DzError DzShape::insertMaterial ( DzMaterial  newmat,
Number  index = -1 
)

Inserts the given material at the given index in the material list, or appends to the list of index is <0 or out of range. Also sets the currently active material index.

Parameters:
newmat Shared pointer referencing the material to be added to the list of materials for this shape.
index The index at which to insert the material. If -1, it will be appended to the material list.

DzShape::materialAdded ( DzMaterial  mat  )  [signal]

Signature: "materialAdded(DzMaterial*)"

Emitted after a material has been added to the shape

Parameters:
mat The material that was added to the shape

DzShape::materialChanged (  )  [signal]

Signature: "materialChanged()"

Emitted when a material associated with this shape changes.

DzShape::materialListChanged (  )  [signal]

Signature: "materialListChanged()"

Emitted after a material has been added to or removed from the shape

DzShape::materialRemoved ( DzMaterial  mat  )  [signal]

Signature: "materialRemoved(DzMaterial*)"

Emitted after a material has been removed from the shape

Parameters:
mat The material that was removed from the shape

DzShape::materialSelected ( DzMaterial  mat  )  [signal]

Signature: "materialSelected(DzMaterial*)"

Emitted after a material used by this shape is selected

Parameters:
mat The material that was selected

DzShape::materialSelectionChanged (  )  [signal]

Signature: "materialSelectionChanged()"

Emitted after a material used by this shape is selected or deselected

DzShape::materialUnselected ( DzMaterial  mat  )  [signal]

Signature: "materialUnselected(DzMaterial*)"

Emitted after a material used by this shape is deselected

Parameters:
mat The material that was deselected

DzMaterial DzShape::rebuildBaseMap ( Number  whichUVSet  ) 

Rebuilds the base map of the base geometry with the specified uv set.

Parameters:
whichUVSet The UV Set index in the list of this shapes uv sets which which to build the new map with.

Reimplemented in DzPolyShape.

DzError DzShape::removeMaterial ( DzMaterial  mat  ) 

Removes the given material from this shape. Also removes any references to this materal that existed on any faces.

Parameters:
mat Shared pointer referencing the material to be removed from the list of materials for this shape.

DzError DzShape::replaceMaterial ( DzMaterial  current,
DzMaterial  newMat 
)

Attempts to find and replace the given material with the new material.

Parameters:
current Shared pointer referencing the material to be replaced.
newMat Shared pointer referencing the material to be added.

DzShape::smoothingChanged (  )  [signal]

Signature: "smoothingChanged()"

Emitted when the smoothing settings for the shape have changed.

DzShape::uvsChanged (  )  [signal]

Signature: "uvsChanged()"

Emitted when the current UV set has changed.

Reimplemented in DzSubDShape.


Generated on Thu Sep 24 12:21:15 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.