Interface to Alias face curves.
#include <AlFace.h> class AlFace : public AlCurve AlFace(); virtual ~AlFace(); virtual statusCode deleteObject(); virtual AlObject* copyWrapper() const; statusCode create( int, curveFormType, int, const double[], int, const double[][4], const int[] ); virtual AlObjectType type() const; AlFaceNode* faceNode() const; AlFace* prevFace() const; AlFace* nextFace() const; statusCode prevFaceD(); statusCode nextFaceD(); statusCode area( double&, boolean = TRUE, double = 0.001 ); AlShader* firstShader() const; AlShader* nextShader( AlShader* ) const; statusCode nextShaderD( AlShader* ) const; statusCode renderInfo( AlRenderInfo& ) const; statusCode setRenderInfo( const AlRenderInfo& ) const; statusCode normal( double[3] ) const;
An AlFace is derived from AlCurve and inherits AlCurve’s public methods.
AlFace objects are created independently from the AlFaceNode, and then added to the AlFaceNode afterwards. An AlFaceNode requires one valid AlFace object in order for it to be created. Other faces can be added to the list of faces under the AlFaceNode afterwards using AlFaceNode::addFace().
Deleting a face can cause one of two things to happen. If the AlFace is not under an AlFaceNode, or it is one of several faces under an AlFaceNode, then only the face will be deleted. If the AlFace is the only face under the AlFaceNode, then the AlFaceNode will also be deleted.
Each face curve must be planar and each face curve must lie in the same plane as all the others. In addition to the parent class (AlCurve) methods this class allows you to walk through the list of the face curves that make up the face.
All AlFace objects will have at least one shader attached to them. These can be accessed through the firstShader and nextShader methods.
Constructs an AlFace wrapper object.
Deletes an AlFace wrapper object.
Creates an exact copy of the AlFace wrapper.
Returns the face node associated with this face.
If this face isn’t the last face under the parent face node, then this face is removed from the parent node and deleted. If this face is the last face under the parent node, then the face node is deleted as well. If this face doesn’t have a parent node, then only the face is deleted.
sSuccess - the face was successfully removed
sInvalidObject - the face object was invalid
sFailure - the face could not be removed
Similar to the AlCurve::create() method except that the form can only be either closed or periodic (kClosed or kPeriodic). See the description in AlCurve of the AlCurve::create() method for more details.
See AlCurve::create().
sSuccess - the face was successfully created
sInvalidArgument - one of the arguments was NULL or out of range
sFailure - the face could not be created
Returns the class identifier kFaceType.
Returns a pointer to the previous face in the list of faces. Returns NULL for the end of the list.
Destructively points the current wrapper to the previous face in the list of faces.
sSuccess - the wrapper now points to the previous face
sFailure - there is no previous face
sInvalidObject - the face is invalid
Returns a pointer to the previous face in the list of faces. Returns NULL for the end of the list.
Destructively points the current wrapper to the next face in the list of faces.
sSuccess - the wrapper now points to the next face
sFailure - there is no next face in the list
sInvalidObject - this face is invalid
Returns the first shader that this face object references. Note that only the first AlFace of an AlFaceNode has valid render information.
Returns the shader after the given shader in the shader list. Specifying NULL as parameter will return the first shader. Note that only the first AlFace of an AlFaceNode has valid render information.
< last_shader - shader from which to walk forward
Destructively points ’last_shader’ to the shader after the given shader in the shader list.
< last_shader - shader from which to walk forward
sSuccess - ’last_shader’ now points to the next shader
sInvalidArgument - ’last_shader’ was invalid or NULL
sInvalidObject - the current face was invalid
sFailure - there was no next shader
Fills in the renderInfo structure with the render info for this face. If there wasn’t any render information, in which case the renderInfo is unchanged. NOTE that ONLY the first AlFace of an AlFaceNode has valid render information.
> renderInfo - the structure to fill in
sSuccess - getting the render information was successful
sFailure - there wasn’t any render information
sInvalidObject - the face was invalid
Sets the render info for this face to the contents of the renderInfo structure. NOTE that ONLY the first AlFace of an AlFaceNode has valid render information.
< renderInfo - the structure to take the render information from
sSuccess - setting the render information was successful
sFailure - setting the render information failed
sInvalidObject - the face is invalid
sInvalidArgument - one of the parameters in ’render’ was invalid
Returns the normal for a curve on a face. The normal for an AlFaceNode is the normal of the first AlFace.
> norm - returned normal
sSuccess - getting the normal was successful
sInvalidArgument - the parameter ’norm’ was NULL
sFailure - the normal couldn’t be determined
sInvalidObject - the face was invalid
Determines the area of the face sSuccess will be returned if the evaluation succeeded. sFailure will be returned if the evaluation failed.
> area - the returned value
< worldCoordinates - the evaluation is to be in world coordinates
< tolerance - the error tolerance
sSuccess - the coordinate was successfully determined
sFailure - the evaluation failed, or the face was linear or not planar
sInvalidObject - the surface is invalid