Class SoAsciiText
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoAsciiText extends SoShape
Simple 3D text shape node. This node defines one or more strings of 3D text. In contrast withSoText2
, 3D text can be rotated, scaled, lighted, and textured, just like all other 3D shapes. In contrast withSoText3
, this 3D Ascii text cannot be extruded.The text origin is at (0,0,0) after applying the current transformation. The scale of the text is affected by the size field of the current
SoFont
as well as the current transformation.SoAsciiText
uses the current material when rendering. Textures are applied to ascii text as follows. On the front face of the text, the texture origin is at the base point of the first string; the base point is at the lower left for justification LEFT, at the lower right for RIGHT, and at the lower center for CENTER. The texture is scaled equally in both S and T dimensions, with the font height representing 1 unit. S increases to the right on the front face.Shape Antialiasing type is
SoShape.TEXT
.File format/default:
AsciiText {
string "" spacing 1 justification LEFT width 0 Action behavior:
SoGLRenderAction
Draws text based on the current font, 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
If any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry.- See Also:
SoFont
,SoFontStyle
,SoText2
,SoText3
,SoTextDetail
,SoFullSceneAntialiasing
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoAsciiText.Justifications
-
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 SoSFEnum<SoAsciiText.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.SoMFFloat
width
Defines the width of each text string.-
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 SoAsciiText()
Creates an ascii text node with default settings.
-
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<SoAsciiText.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.
-
width
public final SoMFFloat width
Defines the width of each text string. Each string will be scaled so that it spans this many units. Default is 0.
-
-