Annotation text node. More...
#include <Inventor/nodes/SoAnnoText3.h>
Public Types | |
enum | Justification { LEFT = 0x01, CENTER = 0x03, RIGHT = 0x02, INHERITED = 0x04 } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoAnnoText3 () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoMFString | string |
SoSFFloat | spacing |
SoSFEnum | justification |
SoSFNode | alternateRep |
SoAnnoText3 has some features of SoText3 and also some of SoText2.
For example, in the RENDER2D_PRINT_RASTER mode the text is rendered using SoText2, but the font size (see SoFont) is interpreted in the current 3D units like SoText3. As a result, the text is always screen aligned, but the size changes depending on distance from the camera. Text in this mode cannot be rotated.
The current annotation property (SoAnnoText3Property) determines the mode. The default is RENDER3D_PRINT_VECTOR (render like SoText3).
If scaling is applied (e.g. SoTransform) and the mode is RENDER2D_PRINT_RASTER, then the scale factor actually applied to the text is the minimum scale factor of the three axes (x, y, z).
Limitations:
Shape Antialiasing type is SoShape::TEXT.
string | "" |
spacing | 1.0 |
justification | LEFT |
alternateRep | NULL |
SoRayPickAction
Performs a pick on the text. The string index and character position are available from the SoTextDetail.
SoGetBoundingBoxAction
Computes the bounding box that encloses the text.
SoCallbackAction
For non-stroke fonts,if any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry.
For stroke fonts, if any line segment callbacks are registered with the action, they will be invoked for each successive line segment used to approximate the text geometry.
SoAnnoText3Property, SoText2, SoText3, SoFullSceneAntialiasing
Justification types.
LEFT |
Left justification. |
CENTER |
Center justification. |
RIGHT |
Right justification. |
INHERITED |
The text justification is inherited from the current SoTextProperty::alignmentH value. |
SoAnnoText3::SoAnnoText3 | ( | ) |
Constructor.
static SoType SoAnnoText3::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoShape.
virtual SoType SoAnnoText3::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoShape.
This field optionally holds an SoText3 node that will be written out in place of this SoAnnoText3 node when saved to a .iv file.
Indicates placement and alignment of strings.
With LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it.
Use enum Justification. Default is Left.
Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height.
A value of 1 indicates single spacing, a value of 2 indicates double spacing, and so on. Default is 1.
The text string(s) to display.
Each string will appear on its own line.