Interface to the DAG node that gives access to faces.
#include <AlFaceNode.h>
class AlFaceNode : public AlCurveNode
AlFaceNode();
virtual ~AlFaceNode();
virtual AlObject* copyWrapper() const;
statusCode create( AlFace * );
virtual AlObjectType type() const;
AlFace* firstFace() const;
AlFace* firstFace(AlTM&) const;
statusCode addFace( AlFace* );
statusCode removeFace( AlFace* );
AlSurface* convertToTrimmedSurface( boolean = FALSE )const;
statusCode normal( double &, double &, double & ) const;
AlFaceNode is the class used to access faces in the DAG. Faces can be created from scratch or read in from a wire file and accessed via the firstFace() method. A Face is a collection of closed curves that all lie in the same plane. An AlFaceNode points to an AlFace, which points to the next face in the collection and so on...
Add faces to the collection with the addFace() method and remove them with the removeFace() method. In order to access the list of faces, you walk through the face list with AlFace methods nextFace() and prevFace().
There are two ways to delete an AlFaceNode. If the AlFaceNode::deleteObject() method is called, then this node’s AlFace objects are all deleted. If this node only has one face and its deleteObject() method is called, then this node is deleted as well.
statusCode AlFaceNode::removeFace( AlFace* alFace )
Removes a face from the list of faces. This must not be the last face under the face node. When the face is removed from under the face node, it is no longer part of the universe that would be stored. Any animation on the CVs of the face will be deleted, and the CVs will be removed from any clusters or sets they are in.
AlSurface * AlFaceNode::convertToTrimmedSurface( boolean worldSpace ) const
Returns an AlSurface that represents the AlFace geometry converted to a trimmed surface. Returns NULL if the AlFace geometry is invalid for any reason. A trimmed surface will not be created if the AlFace curves are non-planar or intersecting. The AlSurface created does NOT have a parent AlSurfaceNode. The AlSurface will be constructed in object space if worldSpace is FALSE (the default) or in world space if worldSpace is TRUE. As well only the geometry information will be converted. Shader information, and so on, will not be copied over to the new surface.
statusCode AlFaceNode::normal( double &x, double &y, double &z ) const