SoAsciiText(3IV)NAMESoAsciiText (SoAsciiText) - simple 3D text shape node
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoShape > SoAsciiTextSYNOPSIS
#include <Inventor_c/nodes/SoAsciiText.h>
enum SoAsciiTextJustification {
LEFT Left edges of all strings are aligned
RIGHT Right edges of all strings are aligned
CENTER Centers of all strings are aligned
}
Fields from class SoAsciiText:
SoMFString string
SoSFFloat spacing
SoSFEnum justification
SoMFFloat width
Functions from class SoAsciiText:
SoAsciiText * SoAsciiTextCreate()
SoType SoAsciiTextGetClassTypeId()
Functions from class SoNode:
void SoAsciiTextSetOverride(SoAsciiText *this, SbBool
state)
SbBool SoAsciiTextIsOverride(const SoAsciiText *this)
SoNode * SoAsciiTextCopy(const SoAsciiText *this, SbBool
copyConnections = FALSE)
SbBool SoAsciiTextAffectsState(const SoAsciiText *this)
SoNode * SoAsciiTextGetByName(const char *name)
int SoAsciiTextGetByNameList(const char *name, SoNodeList
*list)
Functions from class SoFieldContainer:
void SoAsciiTextSetToDflts(SoAsciiText *this)
SbBool SoAsciiTextHasDfltVals(const SoAsciiText *this)
SbBool SoAsciiTextFldsAreEq(const SoAsciiText *this, const
SoFieldContainer *fc)
void SoAsciiTextCopyFieldVals(SoAsciiText *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
SbBool SoAsciiTextSet(SoAsciiText *this, const char
*fieldDataString)
void SoAsciiTextGet(SoAsciiText *this, SbString
*fieldDataString)
Page 1SoAsciiText(3IV)
int SoAsciiTextGetFields(const SoAsciiText *this,
SoFieldList *resultList)
SoField * SoAsciiTextGetField(const SoAsciiText *this, const
char *fieldName)
SbBool SoAsciiTextGetFieldName(const SoAsciiText *this,
const SoField *field, SbName *fieldName)
SbBool SoAsciiTextIsNotifyEnabled(const SoAsciiText *this)
SbBool SoAsciiTextEnableNotify(SoAsciiText *this, SbBool
flag)
Functions from class SoBase:
void SoAsciiTextRef(SoAsciiText *this)
void SoAsciiTextUnref(const SoAsciiText *this)
void SoAsciiTextUnrefNoDelete(const SoAsciiText *this)
void SoAsciiTextTouch(SoAsciiText *this)
SoType SoAsciiTextGetTypeId(const SoAsciiText *this)
SbBool SoAsciiTextIsOfType(const SoAsciiText *this, SoType
type)
void SoAsciiTextSetName(SoAsciiText *this, const char
*name)
SbName SoAsciiTextGetName(const SoAsciiText *this)
DESCRIPTION
This node defines one or more strings of 3D text. In contrast with
SoText2, 3D text can be rotated, scaled, lighted, and textured, just like
all other 3D shapes. In constrast with SoText3, 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.
FIELDS
SoMFString string
The text string(s) to display. Each string will appear on its own
line.
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.
Page 2SoAsciiText(3IV)
SoSFEnum 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.
SoMFFloat width
Defines the width of each text string. Each string will be scaled so
that it spans this many units.
FUNCTIONSSoAsciiText * SoAsciiTextCreate()
Creates an ascii text node with default settings.
SoType SoAsciiTextGetClassTypeId()
Returns type identifier for this class.
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 the SoTextDetail.
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.
FILE FORMAT/DEFAULTS
AsciiText {
string ""
spacing 1
justification LEFT
width 0
}
SEE ALSO
SoFont, SoFontStyle, SoText2, SoText3, SoTextDetail
Page 3