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

SoImage Class Reference

The SoImage class draws a 2D image on the viewport. More...

#include <Inventor/nodes/SoImage.h>

Inheritance diagram for SoImage::

SoShape SoNode SoFieldContainer SoBase List of all members.

Public Types

enum  VertAlignment { BOTTOM, HALF, TOP }
enum  HorAlignment { LEFT, CENTER, RIGHT }

Public Methods

 SoImage (void)
virtual void GLRender (SoGLRenderAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

Static Public Methods

void initClass (void)

Public Attributes

SoSFInt32 width
SoSFInt32 height
SoSFEnum vertAlignment
SoSFEnum horAlignment
SoSFImage image
SoSFString filename

Protected Methods

virtual ~SoImage ()
virtual void generatePrimitives (SoAction *action)
virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
virtual SbBool readInstance (SoInput *in, unsigned short flags)
virtual void notify (SoNotList *list)
int getReadStatus (void)
void setReadStatus (SbBool flag)

Detailed Description

The SoImage class draws a 2D image on the viewport.

An image can be specified either by using the image field, or by specifying a filename. If width and or height is specified, the image will be resized to match those values before it is displayed.

The current modelview matrix will be used to find the viewport position, and the image is rendered in that position, with z-buffer testing activated.


Member Enumeration Documentation

enum SoImage::VertAlignment
 

Vertical alignment for image.

Enumeration values:
BOTTOM   Vertical alignment at bottom of image.
HALF   Vertical alignment at center of image.
TOP   Vertical alignment at top of image.

enum SoImage::HorAlignment
 

Horizontal alignment for image.

Enumeration values:
LEFT   Horizontal alignment at left border.
CENTER   Horizontal alignment at center of image.
RIGHT   Horizontal alignment ar right border.


Constructor & Destructor Documentation

SoImage::SoImage void
 

Constructor.

SoImage::~SoImage [protected, virtual]
 

Destructor.


Member Function Documentation

void SoImage::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 SoImage::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 SoImage::rayPick SoRayPickAction * action [virtual]
 

Calculates picked point based on primitives generated by subclasses.

Reimplemented from SoShape.

void SoImage::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 SoImage::generatePrimitives SoAction * action [protected, virtual]
 

Will generate a textured quad, representing the image in 3D.

Reimplemented from SoShape.

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

For internal use only.

Reimplemented from SoShape.

SbBool SoImage::readInstance SoInput * in,
unsigned short flags
[protected, virtual]
 

Overloaded to load image file.

Reimplemented from SoNode.

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

Overloaded to detect when fields change.

Reimplemented from SoNode.

int SoImage::getReadStatus void [protected]
 

Returns TRUE if node was read ok.

void SoImage::setReadStatus SbBool flag [protected]
 

Set read status for this node.


Member Data Documentation

SoSFInt32 SoImage::width
 

If bigger than 0, resize image to this width before rendering.

SoSFInt32 SoImage::height
 

if bigger than 0, resize image to this height before rendering.

SoSFEnum SoImage::vertAlignment
 

Vertical alignment.

SoSFEnum SoImage::horAlignment
 

Horizontal alignment.

SoSFImage SoImage::image
 

Inline image data.

SoSFString SoImage::filename
 

Image filename.


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