A DAG node that refers to a NURB curve’s geometry.
#include <AlCurveNode.h> class AlCurveNode : public AlDagNode AlCurveNode(); virtual ~AlCurveNode(); virtual AlObject* copyWrapper() const; statusCode create( AlCurve* ); virtual AlObjectType type() const; AlCurve* curve() const; AlCurve* curve(AlTM&) const; AlCurveNodeJoinErrors join(AlCurveNode*); int curvePrecision() const; statusCode setCurvePrecision( int );
AlCurveNode is the class used to access and manipulate curves within a DAG. This class behaves like other DAG nodes (see AlDagNode for a description of the usage and purpose of DAG nodes). Users access the geometry of the curve via the ’curve()’ method which returns a pointer to an AlCurve object which provides the user with the methods used to modify the geometry of the curve. Curves can be created from scratch by instantiating and creating an AlCurve, and then by instantiating and creating an AlCurveNode (using the AlCurve as a parameter).
There are two ways to delete an AlCurveNode. If the AlCurveNode deleteObject() method is called, then the node’s AlCurve is also deleted. If the AlCurve::deleteObject() method is called, then its associated AlCurveNode is also deleted.
Constructs an AlCurveNode wrapper object.
Deletes an AlCurveNode wrapper object.
Returns an exact duplicate of this AlCurveNode wrapper.
Allocates the DAG node for this object and attaches it to the given AlCurve. This method should only be called once for any AlCurve. It is an error to call this method twice or if the object has been read in from a wire file.
< newCurve - the curve to create this curve node from
sSuccess - everything was successful
sInvalidArgument - the ’newCurve’ was invalid or NULL
sAlreadyCreated - the curve was already created elsewhere
sInsufficientMemory - not enough memory available
Returns the class identifier kCurveNodeType.
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class.
Returns a pointer to the curve data structure that can be used to access the geometry of the curve.
Returns a pointer to the curve data structure that can be used to access the geometry of the curve. The AlTM will be updated with the curveNode’s TM if a curve exists.
> tm - the transformation matrix to be updated with the curveNode’s TM
Joins the passed-in curveNode’s curve to the end of this curve if the end is coincident with the beginning of the of the curveNode’s curve. This is most useful when using curves with attributes.
This operation will remove this curve’s CVs from all clusters and sets but not the curveNode that is passed in. This means that all AlClusterMembers’ and AlSetMembers’ of this curves CVs will no longer be valid after a join. Further all AlCurveCVs and attributes on ’this’ AlCurve will have been deleted and regenerated (the passed curve is unchanged). If the return value is either kJoinSuccess or kJoinFailure so all pointers to this curve’s AlCurveCVs will be invalid.
If the return value is one of kJoinDuplicateCurve, kJoinBadData, kJoinNoAttributes, or kJoinInvalidKeyPoints, the model will not have been modified.
If the return value is kJoinBadCluster, all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters and the cluster effects may have been applied to some CVs.
Finally, if the return code is kJoinFailure, all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters, all AlCurveCVs have been deleted and recreated, existing AlAttributes have been moved to the garbage list and new ones created, and a join was attempted but failed, perhaps because the ends of the two curves did not overlap.
< curveNode - a curve that will be added to the end of this curve
kJoinSuccess - the join succeeded
kJoinFailure - the join failed, perhaps because the end points didn’t overlap
kJoinBadCluster - failed to remove effect of all clusters
kJoinInvalidKeyPoints - one curve may have been a circle
kJoinNoAttributes - attributes for a curve could not be found or created
kJoinBadData - the model is in an incorrect state
kJoinDuplicateCurve - an attempt was made to join a curve to itself
Obtains the curve precision for the curve. This method returns -1 if the curve node is invalid.
Sets the curve precision for the curve.
< precision - the new curve precision (range is 1-129).
sSuccess - curve precision set
sInvalidArgument - value for curve precision was invalid
sInvalidObject - this CurveNode is invalid.