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

SoFont Class Reference
[Nodes]

The SoFont class is an appearance node for setting fonts. More...

#include <Inventor/nodes/SoFont.h>

Inheritance diagram for SoFont:

SoNode SoFieldContainer SoBase SoFontStyle List of all members.

Public Member Functions

 SoFont (void)
virtual void doAction (SoAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void callback (SoCallbackAction *action)
virtual void pick (SoPickAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

Static Public Member Functions

void initClass (void)

Public Attributes

SoSFName name
SoSFFloat size

Protected Member Functions

virtual ~SoFont ()

Detailed Description

The SoFont class is an appearance node for setting fonts.

Successive text rendering nodes (like SoText2, SoText3, SoAsciiText, etc) will use the font specified from an SoFont node when visualizing text.

See also:
SoFontStyle, SoText2, SoText3


Constructor & Destructor Documentation

SoFont::SoFont void   ) 
 

Constructor.

SoFont::~SoFont  )  [protected, virtual]
 

Destructor.


Member Function Documentation

void SoFont::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 SoNode.

Reimplemented in SoFontStyle.

void SoFont::doAction SoAction action  )  [virtual]
 

This function performs the typical operation of a node for any action.

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::getBoundingBox SoGetBoundingBoxAction action  )  [virtual]
 

Action method for the SoGetBoundingBoxAction.

Calculates bounding box and center coordinates for node and modifies the values of the action to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node.

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

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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 SoNode.

Reimplemented in SoFontStyle.

void SoFont::callback SoCallbackAction action  )  [virtual]
 

Action method for SoCallbackAction.

Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph.

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::pick SoPickAction action  )  [virtual]
 

Action method for SoPickAction.

Does common processing for SoPickAction action instances.

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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 SoNode.

Reimplemented in SoFontStyle.


Member Data Documentation

SoSFName SoFont::name
 

Name of font.

Which fontnames are available is rather systemdependent, not only on whether or not you are running on a UNIX/Linux system, Microsoft Windows or whatever, but also on which fonts and font types (like TrueType) are installed on a particular user's system.

All font rendering nodes have a built-in fallback font to use, though, so even though Coin can not find a font on the system of the specified type, the text should be rendered somehow.

In summation, consider this node type and this particular field as a hint to the font rendering engines of Coin, and do not base your models on a particular font being available.

SoSFFloat SoFont::size
 

Size of font. Defaults to 10.0.

For 2D rendered bitmap fonts (like for SoText2), this value is the height of a character in screen pixels. For 3D text, this value is the world-space coordinates height of a character in the current units setting (see documentation for SoUnits node).


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