AlArcAttributes

Interface to Alias arc curve attributes.

Synopsis

#include <AlArcAttributes.h>
class AlArcAttributes : public AlAttributes
virtual AlObjectType type() const;
virtual AlArcAttributes* asArcAttributesPtr();
AlObject* copyWrapper() const;
statusCode centerPoint(double&, double&, double&) const;
statusCode startPoint(double&, double&, double&) const;
statusCode endPoint(double&, double&, double&) const;
double sweep() const;
double radius() const;
statusCode setStartPoint(double, double, double);
statusCode setEndPoint(double, double, double);
statusCode setSweepFromStartPoint(double);
statusCode setSweepFromEndPoint(double);
statusCode setRadius(double);

Description

AlArcAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for an arc.

The attributes that define an arc are its radius, sweep angle, center point, start point, and end point. Coordinates are given in object space, and not world space.

Summary

AlObjectType AlArcAttributes::type() const

Description

Returns the class identifier 'kArcAttributeType'.

AlArcAttributes* AlArcAttributes::asArcAttributesPtr()

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* AlArcAttributes::copyWrapper() const

Description

This method makes a copy of the AlArcAttributes. The returned AlArcAttributes will reference the same data as the original.

statusCode AlArcAttributes::centerPoint(double& x, double& y, double& z) const

Description

Returns the center point for the arc. Note that there is no "set" method for the center point. The center point is moved by changing the arc's radius.

Arguments

> double& x - center point x coordinate

> double& y - center point y coordinate

> double& z - center point z coordinate

Return codes

sSuccess - the center point was successfully returned.

sInvalidObject - the attribute was invalid.

statusCode AlArcAttributes::startPoint(double& x, double& y, double& z) const

Description

Returns the point where the arc starts.

Arguments

> double& x - start point x coordinate

> double& y - start point y coordinate

> double& z - start point z coordinate

Return codes

sSuccess - the start point was successfully returned.

sInvalidObject - the attribute was invalid.

statusCode AlArcAttributes::endPoint(double& x, double& y, double& z) const

Description

Returns the point where the arc ends.

Arguments

> double& x - end point x coordinate

> double& y - end point y coordinate

> double& z - end point z coordinate

Return codes

sSuccess - the start point was successfully returned.

sInvalidObject - the attribute was invalid.

double AlArcAttributes::sweep() const

Description

Returns the number of degrees in the arc. Zero is returned if the attribute is not valid.

double AlArcAttributes::radius() const

Description

Returns the radius of the arc. Zero is returned if the attribute is not valid.

statusCode AlArcAttributes::setStartPoint(double x, double y, double z)

Description

This method moves the start point of the arc. Changing the start point changes the size of the sweep, and if the new start point is not on the circle about the arc's center point, the center point will be moved.

Arguments

< double x - start point x coordinate

< double y - start point y coordinate

< double z - start point z coordinate

Return code

sSuccess - Setting the start point succeeded.

sInvalidObject - the attribute was not valid

sFailure - Setting the start point failed.

statusCode AlArcAttributes::setEndPoint(double x, double y, double z)

Description

This method moves the end point of the arc. Changing the end point changes the size of the sweep, and if the new end point is not on the circle about the arc's center point, the center point will be moved.

Arguments

< double x - end point x coordinate

< double y - end point y coordinate

< double z - end point z coordinate

Return code

sSuccess - Setting the end point succeeded.

sInvalidObject - the attribute was invalid

sFailure - Setting the end point failed.

statusCode AlArcAttributes::setSweepFromStartPoint(double sweep)

Description

Change the sweep of the arc from the start point. This operation will move the end point. The sweep is given in degrees.

Arguments

< sweep - the sweep from the start point (in degrees)

Return code

sSuccess - Setting the sweep succeeded.

sInvalidObject - the attribute was invalid

sFailure - Setting the sweep failed.

statusCode AlArcAttributes::setSweepFromEndPoint(double sweep)

Description

Change the sweep of the arc from the end point. This operation will move the start point. The sweep is given in degrees.

Arguments

< sweep - the sweep from the end point (in degrees)

Return code

sSuccess - Setting the sweep succeeded.

sInvalidObject - the attribute was invalid

sFailure - Setting the sweep failed.

statusCode AlArcAttributes::setRadius(double radius)

Description

Change the radius for the arc. This operation will move the center point for the arc.

Arguments

< radius - the radius of the arc

Return code

sSuccess - Setting the sweep succeeded.

sInvalidObject - the attribute was invalid

sFailure - Setting the sweep failed.





aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.