Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoMaterialBundle Class Reference

The SoMaterialBundle class simplifies material handling. More...

#include <Inventor/bundles/SoMaterialBundle.h>

Inheritance diagram for SoMaterialBundle:
SoBundle

Public Member Functions

 SoMaterialBundle (SoAction *action)
 
 ~SoMaterialBundle ()
 
void forceSend (const int index)
 
SbBool isColorOnly (void) const
 
void send (const int index, const SbBool betweenbeginend)
 
void sendFirst (void)
 
void setUpMultiple (void)
 

Additional Inherited Members

- Protected Member Functions inherited from SoBundle
 SoBundle (SoAction *action)
 
 ~SoBundle ()
 
- Protected Attributes inherited from SoBundle
SoStatestate
 The state of the current action.
 

Detailed Description

The SoMaterialBundle class simplifies material handling.

Every shape node should create (on the stack) an instance of this class and call sendFirst() before sending anything to GL. During rendering, send() should be used to send material values to GL.

Constructor & Destructor Documentation

◆ SoMaterialBundle()

SoMaterialBundle::SoMaterialBundle ( SoAction * action)

Constructor with action being the action applied to the geometry node.

◆ ~SoMaterialBundle()

SoMaterialBundle::~SoMaterialBundle ( )

Destructor

Member Function Documentation

◆ forceSend()

void SoMaterialBundle::forceSend ( const int index)

Will send the material to GL even though index equals the current index.

Provided for compatibility with the SGI Open Inventor v2.1 API.

◆ isColorOnly()

SbBool SoMaterialBundle::isColorOnly ( void ) const

Returns TRUE if the current light model is BASE_COLOR.

◆ send()

void SoMaterialBundle::send ( const int index,
const SbBool betweenbeginend )

Sends material values with index index to GL. Will test whether the current index equals index before sending.

betweenbeginend should be TRUE if your program is between a glBegin() and glEnd() (it is illegal to change the polygon stipple between a glBegin() and glEnd()).

◆ sendFirst()

void SoMaterialBundle::sendFirst ( void )

Sends the initial material values to GL. Must be done once in all geometry nodes before the rendering begins.

◆ setUpMultiple()

void SoMaterialBundle::setUpMultiple ( void )

Currently not in use. It is only provided for OIV compliance.


The documentation for this class was generated from the following files: