Bookshelf Contents Previous Next Glossary Index Search

AlCurveLocator

Interface to Alias curve locators

Synopsis

#include <AlCurveLocator.h>
class AlCurveLocator : public AlPointLocator
AlCurveLocator();
virtual ~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's normals, tangent, position in the world coordinate system, arc length, and curvature. 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 - the curve parameter at which the locator is created

Return Codes

sSuccess - the locator was successfully created

sAlreadyCreated - the 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 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 the 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, and z components of the second normal vector that has been normalized

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



Bookshelf Contents Previous Next Glossary Index Search

[email protected]
Copyright © 1998, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved.