AlLocator
 
 
 

Contains functionality common to all the Alias locators.

Synopsis

#include <AlLocator.h>
class AlLocator : public AlObject
virtual	~AlLocator();
virtual statusCode	deleteObject();
virtual AlObject *	copyWrapper() const = 0;
virtual AlObjectType	type() const;
statusCode pick();
statusCode unpick();
statusCode isPicked(boolean &) const;
statusCode templated(boolean &) const;

Description

This virtual class encapsulates methods common to all the Alias locators (spaceLocator, curveLocator, curveOnSurfaceLocator, surfaceLocator, annotationLocator, distanceLocator, angleLocator, radialLocator, deviation Locator and minmaxLocator) for picking and unpicking locators. This class also contains static methods for the display of all locators.

To create a locator, the user must instantiate and call the create method of a specific type of locator (for example, a curve locator or a distance locator).

The annotation, distance and angle locators depend on one or more point type locators, such as a curve locator. If a point locator is deleted, its dependent annotation, distance and angle locators are deleted. Similarly, the radial, deviation and minmax locators are dependent on other objects. If those objects are deleted, the dependent radial, deviation, and minmax locators are also deleted.

The locator classes are derived as follows, where a class inherits the functionality defined in the class above it. The user can not instantiate the locator (AlLocator) and point locator (AlPointLocator) classes.

AlLocator::AlLocator(void)

Description

Constructs an AlLocator wrapper object.

AlLocator::~AlLocator()

Description

Deletes an AlLocator wrapper object.

statusCode AlLocator::deleteObject()

Description

Deletes the locator wrapper.

Return Codes

sSuccess - the object was deleted

sInvalidObject - the locator was invalid

AlObjectType AlLocator::type() const

Description

Returns the class identifier kLocatorType.

statusCode AlLocator::pick()

Description

Picks a locator. The function does nothing if the locator is already picked. Similarly, unpick does nothing if the locator is unpicked.

Return Codes

sSuccess - the picking was successful

sInvalidObject - the object is not valid

statusCode AlLocator::unpick()

Description

Unpicks a locator. Unpick does nothing if the locator is already unpicked.

Return Codes

sSuccess - the unpicking was successful

sInvalidObject - the object is not valid

statusCode AlLocator::isPicked(boolean &picked) const

Description

Checks whether the locator is picked or unpicked.

Arguments

> picked - is set to true if the locator is picked, and set to false otherwise

Return Codes

sSuccess - the value was set successfully

sInvalidObject - the object is not valid

statusCode AlLocator::templated(boolean &tmpl) const

Description

Checks whether the object on which a locator depends is templated. If a locator does not depend on any other object, the argument is set to false.

Arguments

> tmpl - is set to true if the object on which a locator depends is templated. Otherwise, tmpl is set to false

Return Codes

sSuccess - the value was set successfully

sInvalidObject - the object is not valid