Displays a text string for existing locators
#include <AlAnnotationLocator.h>
class AlAnnotationLocator : public AlLocator
AlAnnotationLocator();
virtual ~AlAnnotationLocator();
virtual AlObject * copyWrapper() const;
virtual AlObjectType type() const;
statusCode create(const AlPointLocator *, const char *, double, double, double);
statusCode setString(const char *);
statusCode setWorldLeaderPosition(double x = 0.0, double y = 0.0, double z = 0.0);
statusCode setLocalLeaderPosition(double x = 0.0, double y = 0.0, double z = 0.0);
statusCode setLeftJustify(boolean);
const char * string() const;
statusCode worldLeaderPosition(double &, double &, double &) const;
statusCode localLeaderPosition(double &, double &, double &) const;
statusCode leftJustify(boolean &) const;
This class creates an annotation to existing point locators (for example, the space locator, curve locator, curve on surface locator, and surface locator). An annotation is a line of text and a leader (line with arrow) that is drawn relative to a locator (point type).
To create an annotation locator, first create a point locator and then attach the annotation string through this class using its create method. There are also methods to manipulate the position and starting point of the leader line for the annotation.
statusCode AlAnnotationLocator::create(const AlPointLocator *pointLocator, const char *string, double x, double y, double z)
> pointLocator - The AlPointLocator on which the annotation locator is created. The pointLocator should be created before creating the annotation locator.
> string - The string to be displayed in the annotation.
> x, y, z - The coordinates relative to the point locator on which annotation depends, at which the leader line of the text starts.
statusCode AlAnnotationLocator::setLocalLeaderPosition(double x, double y, double z)
statusCode AlAnnotationLocator::setLeftJustify(boolean leftJustify)
Sets the justification of the annotation text for the annotation locator. The text can be right justified or left justified.
statusCode AlAnnotationLocator::localLeaderPosition(double &x, double &y, double &z) const
statusCode AlAnnotationLocator::leftJustify(boolean &leftJustify) const