Interface
to Alias arc curve attributes.
Synopsis
#include <AlArcAttributes.h>
class AlArcAttributes : public AlAttributes
virtual AlObjectType type() const;
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 calculateStartAndEndAngles( double& start_angle, double&
end_angle, double xaxis[3],
double yaxis[3], double zaxis[3]);
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.
AlObjectType AlArcAttributes::type()
const
Description
Returns
the class identifier ’kArcAttributeType’.
AlObject* AlArcAttributes::copyWrapper()
const
Description
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::calculateStartAndEndAngles( double&
start_angle, double& end_angle, double xaxis[3], double yaxis[3],
double zaxis[3] )
Description
This function will convert
the attribute information to start and end angle format. The start and
end angles are rotated by the axis into their correct position.
Arguments
> x,y,z axis
> start and end angle
Return code
sSuccess - Converting
the data succeeded
sInvalidObject - the
attribute was invalid
sFailure - Conversion
failed
statusCode AlArcAttributes::setStartPoint(double
x, double y, double z)
Description
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 is 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
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 is 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
Changes 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
Changes 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