AlDistanceLocator
 
 
 

Displays the distance between two locators.

Synopsis

#include <AlDistanceLocator.h>
class AlDistanceLocator : public AlLocator
AlDistanceLocator();
virtual	~AlDistanceLocator();
virtual AlObject *	copyWrapper() const;
virtual AlObjectType	type() const;
statusCode	create(const AlPointLocator *, const AlPointLocator *, boolean trueDisplay = TRUE);
AlPointLocator * 	startLocator() const;
AlPointLocator * 	endLocator() const;
statusCode trueDisplay(boolean &) const;
statusCode setTrueDisplay(boolean);
statusCode offset(double &) const;
statusCode setOffset(double);
statusCode distance(double &, double &, double &) const;

Description

Use this locator to display and find the distance between any two point locators (AlPointLocator). If any of the two point locators on which this locator depends is deleted, this locator is deleted as well. This class contains methods to create the locator, query the distance, and set the display attributes of the locator.

AlDistanceLocator::AlDistanceLocator(void)

Description

Constructs an AlDistanceLocator wrapper object.

AlDistanceLocator::~AlDistanceLocator()

Description

Deletes an AlDistanceLocator wrapper object.

AlObject *AlDistanceLocator::copyWrapper() const

Description

Returns an exact copy of the AlDistanceLocator wrapper.

AlObjectType AlDistanceLocator::type() const

Description

Returns the class identifier kDistanceLocatorType.

statusCode AlDistanceLocator::create(const AlPointLocator *startPointLocator, const AlPointLocator *endPointLocator, boolean trueDisplay)

Description

Creates a distance locator to measure the distance between two point locators.

Arguments

< startLocator - the starting point locator

< endLocator - the ending point locator

< displayType - specifies whether the true value or projection of the true value in the Alias window should be shown. The default is true display.

Return Codes

sSuccess - the distance locator was successfully created

sAlreadyCreated - the object has already been created

sFailure - the distance locator could not be created

sInvalidArgument - either one or both the point locators whose distance is measured are not valid

AlPointLocator *AlDistanceLocator::startLocator() const

Description

Returns the starting point locator of this distance locator. If the distance locator is not valid, NULL is returned.

AlPointLocator *AlDistanceLocator::endLocator() const

Description

Returns the ending point locator of this distance locator. If the distance locator is not valid, NULL is returned.

statusCode AlDistanceLocator::trueDisplay(boolean &trueDisplay) const

Description

Determines if the distance locator is depicting the true length in the Alias Modeling windows.

Arguments

> trueDisplay - the value is true if the distance locator displays true distance as opposed to projected distance in a modeling window

Return Codes

sSuccess - the display mode was found

sInvalidObject - the locator is not valid

statusCode AlDistanceLocator::setTrueDisplay(boolean trueDisplay)

Description

Sets the mode to display the distance locator as either true distance or projected distance in the Alias Modeling windows.

Arguments

< trueDisplay - if true, the distance locator displays true distance; if false, projected distance is displayed.

Return Codes

sSuccess - the display mode was found

sInvalidObject - the locator is not valid

statusCode AlDistanceLocator::setOffset(double offset)

Description

Sets the offset of the distance locator display.

Arguments

< offset - the offset value

Return Codes

sSuccess - the offset value was set

sInvalidObject - the locator is not valid

statusCode AlDistanceLocator::offset(double &offset) const

Description

Finds the offset of the distance locator display.

Arguments

> offset - the offset value

Return Codes

sSuccess - the offset value was found

sInvalidObject - the locator is not valid

statusCode AlDistanceLocator::distance(double &x, double &y, double &z) const

Description

Finds the distance vector of the distance locator from the start locator to the end locator.

Arguments

> x, y, z - the x, y, and z components of the distance vector

Return Codes

sSuccess - the distance was found

sInvalidObject - the locator is not valid