Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglBooleanStatelet Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglBooleanStatelet::

sglStatelet sglObject sglAntiAliasLine sglAntiAliasPoint sglAntiAliasPolygon sglDepthMask sglDithering sglHighlight sglLighting sglTransparency List of all members.

Public Methods

 sglBooleanStatelet (StateEnum type, bool on)
virtual ~sglBooleanStatelet ()
void enable (bool on)
bool isEnabled () const
virtual void printInfo (ostream &ostrm, const char *indent_string) const

Protected Attributes

bool m_on

Detailed Description

This is the abstract base class of all sglStatelets that use OpenGL's glEnable()/glDisable() calls. The boolean passed into the enable() function determines if the statelet in question is enabled (true) or disabled (false). Subclasses must still implement the apply() (that issue the actual OpenGL command) and printInfo() member functions.

Definition at line 334 of file sglStatelet.hpp.


Constructor & Destructor Documentation

sglBooleanStatelet::sglBooleanStatelet ( StateEnum type,
bool on ) [inline]
 

Constructor.

Parameters:
type   The StateEnum type passed in by the subclass constructors.
on   The initial value of the boolean.

Definition at line 341 of file sglStatelet.hpp.

sglBooleanStatelet::~sglBooleanStatelet ( ) [inline, virtual]
 

virtual desctructor.

Definition at line 345 of file sglStatelet.hpp.


Member Function Documentation

void sglBooleanStatelet::enable ( bool on ) [inline]
 

Enable or disable this statelet

Parameters:
on   True to enable, or false to disable.

Definition at line 350 of file sglStatelet.hpp.

Referenced by sglOcclusionCull::sglOcclusionCull().

bool sglBooleanStatelet::isEnabled ( ) const [inline]
 

Query the current state of this statelet.

Returns:
true if enabled, or false if disabled.

Definition at line 355 of file sglStatelet.hpp.

virtual void sglBooleanStatelet::printInfo ( ostream & ostrm,
const char * indent_string ) const [virtual]
 

Output the state of this node to the specified ostream.

Parameters:
ostrm   the ostream to which the output is sent
indent_string   the string (usually spaces) that is output at the beginning of every line of output

Reimplemented from sglStatelet.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:07 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001