AlCurveLocator
Interface to Alias curve locators
Synopsis
#include <AlCurveLocator.h>
class AlCurveLocator : public AlPointLocator
AlCurveLocator();
~AlCurveLocator();
virtual AlObject * copyWrapper() const;
virtual AlObjectType type() const;
statusCode create(const AlCurve *, double);
statusCode setParameter(double);
statusCode parameter(double &) const;
virtual statusCode worldPosition(double &, double &, double &) const;
statusCode tangent(double &, double &, double &) const;
statusCode normal1(double &, double &, double &) const;
statusCode normal2(double &, double &, double &) const;
statusCode radius(double &) const;
statusCode arcLength(double &) const;
Description
A locator can be created in the parametric space of any AlCurve. This locator can be queried for the curve normals, tangent, position in world coordinate system, arc length, and curvature information. This class contains methods for creating, and moving the curve locator.
If the AlCurve is deleted, the curve locator created on it is automatically deleted.
SUMMARY
AlCurveLocator::AlCurveLocator(void)
Description:
Constructs an AlCurveLocator wrapper object.
AlCurveLocator::~AlCurveLocator()
Description:
Deletes an AlCurveLocator wrapper object.
AlObject *AlCurveLocator::copyWrapper() const
Description:
Returns an exact copy of the AlCurveLocator wrapper.
AlObjectType AlCurveLocator::type() const
Description:
Returns the class identifier kCurveLocatorType.
statusCode AlCurveLocator::create(const AlCurve *curve, double u)
Description:
Creates a locator on the given curve.
Arguments:
< curve - the curve on which the locator is created.
< u - curve parameter at which locator is created.
Return codes:
sSuccess - the locator was successfully created.
sAlreadyCreated - object has already been created.
sFailure - the locator could not be created on the curve.
sInvalidArgument - the curve is not a valid object.
statusCode AlCurveLocator::setParameter(double u)
Description:
Moves the position of a locator created on a curve.
Arguments:
< u - the parameter on the curve where the locator has has to be moved.
Return codes:
sSuccess - the locator was moved.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::parameter(double &u) const
Description:
Finds the parameter value at which the locator is present.
Arguments:
> u - the curve parameter where locator is present.
Return codes:
sSuccess - the parameter was found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::worldPosition(double &x, double &y, double &z) const
Description:
Finds the world coordinates of the curve locator.
Arguments:
> x, y, z - the world coordinates of the curve locator.
Return codes:
sSuccess - the coordinates were found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::tangent(double &x, double &y, double &z) const
Description:
Finds the tangent vector to the curve at the point where the locator is present.
Arguments:
> x, y, z - the X, Y, Z components of the tangent.
Return codes:
sSuccess - the tangent was found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::normal1(double &x, double &y, double &z) const
Description:
Finds the normal to the curve at the point where the locator is present.
Arguments:
> x, y, z - the X, Y, Z components of the normal.
Return codes:
sSuccess - the normal was found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::normal2(double &x, double &y, double &z) const
Description:
Finds the second normal to the curve at the point where the locator is present.
Arguments:
> x, y, z - the X, Y, Z components of the second normal normalized vector.
Return codes:
sSuccess - the normal was found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::radius(double &rad) const
Description:
Finds the radius of the curve at the point where the locator is present.
Arguments:
> rad - the radius of the curve at the locator.
Return codes:
sSuccess - the radius was found.
sInvalidObject - the locator is not valid.
statusCode AlCurveLocator::arcLength(double &arcLen) const
Description:
Finds the length of the curve on which the locator is present.
Arguments:
> arcLen - the length of the curve.
Return codes:
sSuccess - the arc length was found.
sInvalidObject - the locator is not valid.
aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights
reserved.