AlCurveAttributes
 
 
 

Interface to Alias curve attributes.

Synopsis

#include <AlCurveAttributes.h>
class AlCurveAttributes : public AlAttributes
virtual AlObjectType	type() const;
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.

AlObjectType AlCurveAttributes::type() const

Description

Returns the class identifier ’kCurveAttributeType’.

AlObject* AlCurveAttributes::copyWrapper() const

Description

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 Values

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 about what these values mean, see the description for the AlCurve::create() method in AlCurve.

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