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

SoAsciiText Class Reference
[Nodes]

The SoAsciiText class renders flat 3D text. More...

#include <Inventor/nodes/SoAsciiText.h>

Inheritance diagram for SoAsciiText:

SoShape SoNode SoFieldContainer SoBase List of all members.

Public Types

enum  Justification { LEFT = 1, RIGHT, CENTER }

Public Member Functions

 SoAsciiText (void)
virtual void GLRender (SoGLRenderAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

Static Public Member Functions

void initClass (void)

Public Attributes

SoMFString string
SoSFFloat spacing
SoSFEnum justification
SoMFFloat width

Protected Member Functions

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

Detailed Description

The SoAsciiText class renders flat 3D text.

The text is rendered using 3D polygon geometry.

This node is different from the SoText2 node in that it rotates, scales, translates etc just like other geometry in the scene. It is different from the SoText3 node in that it renders the text "flat", i.e. does not extrude the fonts to have depth.

Since:
Inventor 2.1


Member Enumeration Documentation

enum SoAsciiText::Justification
 

Font justification values.


Constructor & Destructor Documentation

SoAsciiText::SoAsciiText void   ) 
 

Constructor.

SoAsciiText::~SoAsciiText  )  [protected, virtual]
 

Destructor.


Member Function Documentation

void SoAsciiText::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.

void SoAsciiText::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 SoAsciiText::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 SoAsciiText::computeBBox SoAction action,
SbBox3f box,
SbVec3f center
[protected, virtual]
 

Implemented by SoShape subclasses to let the SoShape superclass know the exact size and weighted center point of the shape's bounding box.

The bounding box and center point should be calculated and returned in the local coordinate system.

The method implements action behavior for shape nodes for SoGetBoundingBoxAction. It is invoked from SoShape::getBoundingBox(). (Subclasses should not override SoNode::getBoundingBox().)

The box parameter sent in is guaranteed to be an empty box, while center is undefined upon function entry.

Implements SoShape.

void SoAsciiText::generatePrimitives SoAction action  )  [protected, virtual]
 

The method implements action behavior for shape nodes for SoCallbackAction. It is invoked from SoShape::callback(). (Subclasses should not override SoNode::callback().)

The subclass implementations uses the convenience methods SoShape::beginShape(), SoShape::shapeVertex(), and SoShape::endShape(), with SoDetail instances, to pass the primitives making up the shape back to the caller.

Implements SoShape.

SoDetail * SoAsciiText::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 SoAsciiText::notify SoNotList list  )  [protected, virtual]
 

Notifies all auditors for this instance when changes are made.

Reimplemented from SoNode.


Member Data Documentation

SoMFString SoAsciiText::string
 

Lines of text to render. Default value is empty.

SoSFFloat SoAsciiText::spacing
 

Spacing between each line. Defaults to 1.0.

SoSFEnum SoAsciiText::justification
 

Horizontal alignment. Default SoAsciiText::LEFT.

SoMFFloat SoAsciiText::width
 

Defines the width of each line.


The documentation for this class was generated from the following files:
Generated on Tue Jul 27 23:53:03 2004 for Coin by doxygen 1.3.7