GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOTEXT2 (3)

NAME

SoText2 — screen-aligned 2D text shape node

CONTENTS

Inherits From
Synopsis
Description
Fields
Methods
Action Behavior
File Format/defaults
See Also

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoText2

SYNOPSIS

#include <Inventor/nodes/SoText2.h>

enum Justification {     SoText2::LEFT    
                     SoText2::LEFT        Left edges of all strings are aligned    
SoText2::RIGHT    
                     SoText2::RIGHT       Right edges of all strings are aligned    
SoText2::CENTER    
                     SoText2::CENTER      Centers of all strings are aligned
}

Fields from class SoText2:

    SoMFString    
                    
SoMFString           string    
SoSFFloat    
                    
SoSFFloat            spacing    
SoSFEnum    
                    
SoSFEnum             justification

Methods from class SoText2:

       
                    
                     SoText2()    
static SoType    
                    
static SoType        getClassTypeId()

Methods from class SoNode:

    void    
                    
void                 setOverride(SbBool state)    
SbBool    
                    
SbBool               isOverride() const    
SoNode *    
                    
SoNode *             copy(SbBool copyConnections = FALSE) const    
virtual SbBool    
                    
virtual SbBool       affectsState() const    
static SoNode *    
                    
static SoNode *      getByName(const SbName &name)    
static int    
                    
static int           getByName(const SbName &name, SoNodeList &list)

Methods from class SoFieldContainer:

    void    
                    
void                 setToDefaults()    
SbBool    
                    
SbBool               hasDefaultValues() const    
SbBool    
                    
SbBool               fieldsAreEqual(const SoFieldContainer *fc) const    
void    
                    
void                 copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)    
SbBool    
                    
SbBool               set(const char *fieldDataString)    
void    
                    
void                 get(SbString &fieldDataString)    
virtual int    
                    
virtual int          getFields(SoFieldList &resultList) const    
virtual SoField *    
                    
virtual SoField *    getField(const SbName &fieldName) const    
SbBool    
                    
SbBool               getFieldName(const SoField *field, SbName &fieldName) const    
SbBool    
                    
SbBool               isNotifyEnabled() const    
SbBool    
                    
SbBool               enableNotify(SbBool flag)

Methods from class SoBase:

    void    
                    
void                 ref()    
void    
                    
void                 unref() const    
void    
                    
void                 unrefNoDelete() const    
void    
                    
void                 touch()    
virtual SoType    
                    
virtual SoType       getTypeId() const    
SbBool    
                    
SbBool               isOfType(SoType type) const    
virtual void    
                    
virtual void         setName(const SbName &name)    
virtual SbName    
                    
virtual SbName       getName() const

DESCRIPTION

This node defines one or more strings of 2D text. The text is always aligned horizontally with the screen and does not change size with distance in a perspective projection. The text origin is at (0,0,0) after applying the current transformation. Rotations and scales have no effect on the orientation or size of 2D text, just the location.

SoText2 uses the current font to determine the typeface and size. The text is always drawn with the diffuse color of the current material; it is not lit, regardless of the lighting model. Furthermore, 2D text can not be textured, and it ignores the current drawing style and complexity.

Because 2D text is screen-aligned, it has some unusual characteristics. For example, the 3D bounding box surrounding a 2D text string depends on the current camera and the current viewport size, since changing the field of view or the mapping onto the window changes the relative size of the text with respect to the rest of the scene. This has implications for caching as well, since a render cache in an SoSeparator that contains an SoText2 node depends on the current camera.

FIELDS

    SoMFString    
                    
SoMFString           string
The text string(s) to display. Each string will appear on its own line. The string(s) can be ascii or UTF-8.

    SoSFFloat    
                    
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.

    SoSFEnum    
                    
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.

METHODS

       
                    
                     SoText2()
Creates a 2D text node with default settings.

    static SoType    
                    
static SoType        getClassTypeId()
Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction
Draws text based on the current font, at a location based on the current transformation.

SoRayPickAction
Performs a pick on the text. Text will be picked if the picking ray intersects the bounding box of the strings. The string index and character position are available from the SoTextDetail.

SoGetBoundingBoxAction
Computes the bounding box that encloses the text.

FILE FORMAT/DEFAULTS

Text2 {



string         ""
spacing        1
justification  LEFT


}

SEE ALSO

SoFont, SoText3, SoTextDetail

Search for    or go to Top of page |  Section 3 |  Main Index


SOTEXT2(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.