AlCurveAttributes
Interface to Alias curve attributes.
Synopsis
#include <AlCurveAttributes.h>
class AlCurveAttributes : public AlAttributes
virtual AlObjectType type() const;
virtual AlCurveAttributes* asCurveAttributesPtr();
AlObject* copyWrapper() const;
curveFormType form() const;
int degree() const;
int numberOfSpans() const;
int numberOfCVs() const;
statusCode CVsUnaffectedPosition( double[][4], int[] ) const;
int numberOfKnots() const;
statusCode knotVector( double[] ) const;
Description
AlCurveAttributes is a class derived from the AlAttributes class. This class allows access to a curve.
This class provides information similar to that of the AlCurve class but without the ability to modify the curve or its CVs.
NOTE: When an AlCurve has just an AlCurveAttribute attribute, the AlCurveAttribute provides no information that the AlCurve doesn't. For this reason, in this case, no information is provided by the AlCurveAttribute, and all methods return null values.
Summary
AlObjectType AlCurveAttributes::type() const
Description
Returns the class identifier 'kCurveAttributeType'.
AlCurveAttributes* AlCurveAttributes::asCurveAttributesPtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class.
AlObject* AlCurveAttributes::copyWrapper() const
Description
This method makes a copy of the AlAttribute. The returned AlAttribute will reference the same data as the original.
curveFormType AlCurveAttributes::form() const
Description
When a curve is periodic it means that its endpoints are coincident and that the curve is tangent continuous at the point where its endpoints touch. "kPeriodic" is returned in this case. "kClosed" is returned if the curve is not periodic, but if its endpoints are coincident. If a curve is neither "kPeriodic" nor "kClosed" then "kOpen" is returned. (Note: If you use the "close" menu item in the interactive Alias package, you actually make a curve periodic.)
Return codes
kOpen - the curve is open.
kClosed - the curve is closed.
kPeriodic - the curve is periodic.
kInvalidCurve - the attribute is not valid.
int AlCurveAttributes::degree() const
Description
Returns the degree of the curve. Zero will be returned if the attribute is not valid.
int AlCurveAttributes::numberOfSpans() const
Description
Returns the number of spans in the curve. -1 is returned if the attribute is not valid.
int AlCurveAttributes::numberOfCVs() const
Description
Returns the number of CVs. -1 is returned if the attribute is not valid.
statusCode AlCurveAttributes::CVsUnaffectedPosition( double CVList[][4], int mult[] ) const
Description
Returns the CVs in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be numberOfCVs(). The length of the multiplicity vector must also be numberOfCVs(). The multiplicity vector returned by this function is the same as the one returned by CVsWorldPosition().
Arguments
> CVList - returned CVs
> mult - multiplicity of each CV
Return codes
sSuccess - the CVs' unaffected position was successfully returned.
sInvalidObject - the attribute is not valid.
sInvalidArgument - one or both of the arguments were NULL.
sFailure - the position was not returned
int AlCurveAttributes::numberOfKnots() const
Description
Returns the number of knots in this curve. For more information as to what this number means, see the description for the create() method. -1 will be returned if the attribute is not valid.
statusCode AlCurveAttributes::knotVector( double knotVector[]) const
Description
Returns the knot vector in the given vector. This vector must be of length numberOfKnots(). For more information as to what these values mean, see the description in AlCurve for the AlCurve::create() method.
Arguments
> knotVector - returned knot vector
Return codes
sSuccess - the knot vector was successfully returned.
sInvalidObject - the attribute is not valid.
sInvalidArgument - one or both of the arguments was NULL.
sFailure - the knot vector could not be returned
aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights
reserved.