DzObject Class Reference
[Object and Geometry Objects]

The main object class. More...

Inheritance diagram for DzObject:

DzElement DzBase QObject Object DzSubDFigureObject List of all members.

Methods

DzError addModifier (DzModifier modifier, Number index=-1)
void addShape (DzShape shape, Number index=-1)
DzModifier findModifier (String name)
DzBox3 getBoundingBox ()
DzVertexMesh getCachedGeom ()
DzShape getCurrentShape ()
DzEnumProperty getGeometryControl ()
DzBox3 getLocalBoundingBox ()
DzOrientedBox3 getLocalOrientedBox ()
DzModifier getModifier (Number which)
Number getNumModifiers ()
Number getNumShapes ()
DzShape getShape (Number which)
void invalidateCache ()
DzError removeAllModifiers ()
void removeAllShapes ()
DzError removeModifier (DzModifier modifier)
void removeShape (Number index)

Constructors

 DzObject ()

Signals

void currentShapeSwitched ()
 Signature: "currentShapeSwitched()"
void drawnDataChanged ()
 Signature: "drawnDataChanged()"
void materialListChanged ()
 Signature: "materialListChanged()"
void materialSelectionChanged ()
 Signature: "materialSelectionChanged()"
void modifierAdded (DzModifier mod)
 Signature: "modifierAdded(DzModifier*)"
void modifierRemoved (DzModifier mod)
 Signature: "modifierRemoved(DzModifier*)"
void modifierStackChanged ()
 Signature: "modifierStackChanged()"
void shapeAdded (DzShape shape)
 Signature: "shapeAdded(DzShape*)"
void shapeRemoved (DzShape shape)
 Signature: "shapeRemoved(DzShape*)"
void uvsChanged ()
 Signature: "uvsChanged()"

Detailed Description

The main object class.

Responsible for evaluating the geometry pipeline, including caching and drawing of the world-space transformed shape. Can have multiple shapes assigned, though only one can be active at a time.


Constructor & Destructor Documentation

DzObject::DzObject (  ) 

Default Constructor.


Member Function Documentation

DzError DzObject::addModifier ( DzModifier  modifier,
Number  index = -1 
)

Adds a modifier to the modifier stack.

Parameters:
modifier The modifier to add to this object's modifier stack.
index The position in the list to insert the modifer. If index is less than 0, the modifier is appended to the end of the list.
Returns:
DZ_NO_ERROR on succedd, otherwise and appropriate error code.

void DzObject::addShape ( DzShape  shape,
Number  index = -1 
)

Add a shape to this object.

Parameters:
shape The shape that will be added to this object's list of possible shapes.
index The position in the list to insert the shape. If index is less than 0, the shape is appended to the end of the list.

void DzObject::currentShapeSwitched (  )  [signal]

Signature: "currentShapeSwitched()"

Emitted when the current shape is swapped out.

void DzObject::drawnDataChanged (  )  [signal]

Signature: "drawnDataChanged()"

Emitted when this object needs to be redrawn.

DzModifier DzObject::findModifier ( String  name  ) 

Find a modifier with the given name.

Parameters:
name The name of the modifier in the modifier stack to return
Returns:
A pointer to the modifier with the given name, NULL if no matching modifier is found.

DzBox3 DzObject::getBoundingBox (  ) 

Returns:
A world space bounding box for this object.

DzVertexMesh DzObject::getCachedGeom (  ) 

Get the final world-space transformed mesh for this object

Returns:
Re-evaluates the pipeline if necessary and returns the final world-space mesh for the current shape.

DzShape DzObject::getCurrentShape (  ) 

Get the current shape.

Returns:
The current shape this object is caching/drawing.

DzEnumProperty DzObject::getGeometryControl (  ) 

Get the geometry control for the object.

Returns:
A pointer to the property that controls the current shape of this object.

DzBox3 DzObject::getLocalBoundingBox (  ) 

Returns:
A local space bounding box for this object - cached by the last call to evaluate().

DzOrientedBox3 DzObject::getLocalOrientedBox (  ) 

Returns:
A local space oriented bounding box for this object - cached by the last call to evaluate().

DzModifier DzObject::getModifier ( Number  which  ) 

Get a modifier from the stack.

Parameters:
which The index of the modifier in the modifier stack to return
Returns:
A pointer to the modifier at the given position in the modifier stack.

Number DzObject::getNumModifiers (  ) 

Get the number of modifiers in this object.

Returns:
The number of modifiers in the local modifier stack for this object.

Number DzObject::getNumShapes (  ) 

Get the number of shapes referenced by this object.

Returns:
The number of possible shapes that this object can display

DzShape DzObject::getShape ( Number  which  ) 

Get a shape referenced by this object.

Parameters:
which Index of the shape to return.
Returns:
The shape at the given index in this object's list of shapes.

void DzObject::invalidateCache (  ) 

Flags this object to reevaluate its geometry pipeline the next time the cached shape is requested.

void DzObject::materialListChanged (  )  [signal]

Signature: "materialListChanged()"

Emitted when the material list for the current shape changes.

void DzObject::materialSelectionChanged (  )  [signal]

Signature: "materialSelectionChanged()"

Emitted when the material selection state for the current shape changes.

DzObject::modifierAdded ( DzModifier  mod  )  [signal]

Signature: "modifierAdded(DzModifier*)"

Emitted when a modifier is added to this object

Parameters:
mod The modifier added to the object.

DzObject::modifierRemoved ( DzModifier  mod  )  [signal]

Signature: "modifierRemoved(DzModifier*)"

Emitted when a modifier is removed from this object

Parameters:
mod The modifier removed from the object.

void DzObject::modifierStackChanged (  )  [signal]

Signature: "modifierStackChanged()"

Emitted when a modifier is added to or removed from this object

DzError DzObject::removeAllModifiers (  ) 

Removes all the modifiers from the modifier stack.

Returns:
DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError DzObject::removeAllShapes (  ) 

Remove all shapes from this object.

DzError DzObject::removeModifier ( DzModifier  modifier  ) 

Removes a modifier from the modifier stack.

Parameters:
modifier The modifier to remove from this object's modifier stack.
Returns:
DZ_NO_ERROR on success, otherwise an appropriate error code.

void DzObject::removeShape ( Number  index  ) 

Remove a shape from this object.

Parameters:
index The index of the shape to remove from this object's list of possible shapes.
Returns:
DZ_NO_ERROR on success, an appropriate error code if the shape could not ber removed.

DzObject::shapeAdded ( DzShape  shape  )  [signal]

Signature: "shapeAdded(DzShape*)"

Emitted when a shape is added to this object

Parameters:
shape The shape added to the object.

DzObject::shapeRemoved ( DzShape  shape  )  [signal]

Signature: "shapeRemoved(DzShape*)"

Emitted when a shape is removed from this object

Parameters:
shape The shape removed from the object.

void DzObject::uvsChanged (  )  [signal]

Signature: "uvsChanged()"

Emitted when the current uv set for the object has changed.


Generated on Thu Sep 24 12:21:14 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.