Class SoAnnoText3
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoAnnoText3 extends SoShape
Annotation text node.SoAnnoText3
has some features ofSoText3
and also some ofSoText2
.For example, in the RENDER2D_PRINT_RASTER mode the text is rendered using
SoText2
, but the font size (seeSoFont
) is interpreted in the current 3D units likeSoText3
. 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 likeSoText3
).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:
- If a stroke font is used (see
SoFont
), the text is rendered with lines rather than faces. Line attributes apply instead of polygon attributes. Text is not extruded. - When using one of the xxx_PRINT_RASTER options (see
SoAnnoText3Property
), the export limitations ofSoText2
apply. See that class for more information.
Shape Antialiasing type is
SoShape.TEXT
.File format/default:
AnnoText3 {
string "" spacing 1.0 justification LEFT alternateRep NULL Action behavior:
SoGLRenderAction
Draws text based on the current font, profiles, transformation, drawing style, material, texture, complexity, and so on.SoRayPickAction
Performs a pick on the text. The string index and character position are available from theSoTextDetail
.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.
- See Also:
SoAnnoText3Property
,SoText2
,SoText3
,SoFullSceneAntialiasing
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoAnnoText3.Justifications
Justification types.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoShape
SoShape.ShapeTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFNode
alternateRep
This field optionally holds anSoText3
node that will be written out in place of thisSoAnnoText3
node when saved to a .iv file.SoSFEnum<SoAnnoText3.Justifications>
justification
Indicates placement and alignment of strings.SoSFFloat
spacing
Defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height.SoMFString
string
The text string(s) to display.-
Fields inherited from class com.openinventor.inventor.nodes.SoShape
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoAnnoText3()
Constructor.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoShape
getShapeType, isPrimitiveRestartAvailable, isPrimitiveRestartAvailable
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
string
public final SoMFString string
The text string(s) to display. Each string will appear on its own line.
-
spacing
public final SoSFFloat spacing
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.
-
justification
public final SoSFEnum<SoAnnoText3.Justifications> justification
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.
. Default is Left.
-
alternateRep
public final SoSFNode alternateRep
This field optionally holds anSoText3
node that will be written out in place of thisSoAnnoText3
node when saved to a .iv file.
-
-