Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoText3 Class Reference

The SoText3 class renders extruded 3D text. More...

#include <Inventor/nodes/SoText3.h>

Inheritance diagram for SoText3::

SoShape SoNode SoFieldContainer SoBase List of all members.

Public Types

enum  Part { FRONT = 1, SIDES = 2, BACK = 4, ALL = FRONT|BACK|SIDES }
enum  Justification { LEFT = 1, RIGHT, CENTER }

Public Methods

 SoText3 (void)
SbBox3f getCharacterBounds (SoState *state, int stringindex, int charindex)
virtual void GLRender (SoGLRenderAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

Static Public Methods

void initClass (void)

Public Attributes

SoMFString string
SoSFFloat spacing
SoSFEnum justification
SoSFBitMask parts

Protected Methods

virtual ~SoText3 ()
virtual void generatePrimitives (SoAction *)
virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
virtual SoDetailcreateTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)
virtual void notify (SoNotList *list)

Detailed Description

The SoText3 class renders extruded 3D text.

Render text as 3D geometry.

Beware that using a lot of SoText3 text characters in a scene will usually have severe impact on the rendering performance, as each and every character of the text contributes a lot of polygon primitives to the rendering system.

Due to the above mentioned fact, SoText3 nodes are best used in situations where you need just one or a few characters to be placed in your scene, than to visualize e.g. complete sentences.

See also:
SoText2, SoAsciiText, SoProfile


Member Enumeration Documentation

enum SoText3::Part
 

Used to specify which parts should be rendered/generated.

Enumeration values:
FRONT   Front of characters.
SIDES   Sides of characters.
BACK   Back of characters.
ALL   All parts.

enum SoText3::Justification
 

Used to specify horizontal string alignment.

Enumeration values:
LEFT   Left edges of strings are aligned.
RIGHT   Right edges of strings are aligned.
CENTER   Strings are centered.


Constructor & Destructor Documentation

SoText3::SoText3 void
 

Constructor.

SoText3::~SoText3 [protected, virtual]
 

Destructor.


Member Function Documentation

void SoText3::initClass void [static]
 

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoShape.

SbBox3f SoText3::getCharacterBounds SoState * state,
int stringindex,
int charindex
 

Not implemented. Should probably have been private in OIV. Let us know if you need this method for anything, and we'll implement it.

void SoText3::GLRender SoGLRenderAction * action [virtual]
 

Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method.

Reimplemented from SoShape.

void SoText3::getPrimitiveCount SoGetPrimitiveCountAction * action [virtual]
 

Action method for the SoGetPrimitiveCountAction.

Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.

Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.

Reimplemented from SoShape.

void SoText3::generatePrimitives SoAction * action [protected, virtual]
 

For internal use only.

Reimplemented from SoShape.

void SoText3::computeBBox SoAction * action,
SbBox3f & box,
SbVec3f & center
[protected, virtual]
 

For internal use only.

Reimplemented from SoShape.

SoDetail * SoText3::createTriangleDetail SoRayPickAction * action,
const SoPrimitiveVertex * v1,
const SoPrimitiveVertex * v2,
const SoPrimitiveVertex * v3,
SoPickedPoint * pp
[protected, virtual]
 

Will create triangle detail for a SoPickedPoint. This method will only be called internally, when generatePrimitives() is used for picking (SoShape::rayPick() is not overridden).

This method returns NULL in Open Inventor, and subclasses will need to override this method to create details for a SoPickedPoint.

This is not necessary with Coin. Of course, if you choose to override it, it will work in the same way as Open Inventor.

For this to work, you must supply a face or line detail when generating primitives. If you supply NULL for the detail argument in SoShape::beginShape(), you'll have to override this method.

Reimplemented from SoShape.

void SoText3::notify SoNotList * list [protected, virtual]
 

Overloaded to detect when the string field changes.

Reimplemented from SoNode.


Member Data Documentation

SoMFString SoText3::string
 

The strings. Defaults to empty set.

SoSFFloat SoText3::spacing
 

Vertical spacing. 1.0 is the default spacing.

SoSFEnum SoText3::justification
 

Horizontal justification. Default is alignment at the left border.

SoSFBitMask SoText3::parts
 

Character parts. Default is to show only the front-facing part.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:31 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001