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.
AlCurveNodeJoinErrors AlCurveNode::join(AlCurveNode* curveNode)
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.
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