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

sglPointSize Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglPointSize::

sglStatelet sglObject List of all members.

Public Methods

 sglPointSize (float point_size=1.0f)
virtual ~sglPointSize ()
void setPointSize (float point_size)
float getPointSize () const
void apply (sglCurrState *curr_state) const
virtual bool getSorted () const
virtual void printInfo (ostream &ostrm, const char *indent_string) const

Detailed Description

This statelet encapsulates OpenGL's glPointSize() function which controls the width, in pixels, for rendered points. The default value is one pixel.

Example:

   sglPointSize *point_size = new sglPointSize;   // the default of 1.
   point_size->setPointSize(2.5f);                // 2.5 times large

Definition at line 1547 of file sglStatelet.hpp.


Constructor & Destructor Documentation

sglPointSize::sglPointSize ( float point_size = 1.0f ) [inline]
 

Constructor (also the default constructor)

Parameters:
point_size   The width of points in pixels. This must be greater than zero, and is 1.0 by default. Values less than or equal to zero will be set to 1.0.

Definition at line 1555 of file sglStatelet.hpp.

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

virtual destructor.

Definition at line 1560 of file sglStatelet.hpp.


Member Function Documentation

void sglPointSize::setPointSize ( float point_size )
 

Set the point size

Parameters:
point_size   The width of points in pixels. This must be greater than zero. Values less than or equal to zero will be set to 1.0.

Referenced by sglPointSize().

float sglPointSize::getPointSize ( ) const [inline]
 

Query the current point size

Returns:
The current point size

Definition at line 1571 of file sglStatelet.hpp.

void sglPointSize::apply ( sglCurrState * curr_state ) const [virtual]
 

Apply this state change to the current rendering state.

Parameters:
curr_state   Required for statelets that affect one another. For example the sglTransparency sets up depth mask and blending modes which interact with the sglBlending and sglDepthMask statelets, and the curr_state object is used to resolve these internal issues.

Reimplemented from sglStatelet.

bool sglPointSize::getSorted ( ) const [inline, virtual]
 

Query the sorting mode for this statelet.

Returns:
true if this type of statelet should be sorted by pointer rather than using m_index to index into an array. The defualt implementation is the latter, but if a statelet can take on an inordinate number of states (e.g. a floating point parameter) then true should be returned.

Reimplemented from sglStatelet.

Definition at line 1580 of file sglStatelet.hpp.

virtual void sglPointSize::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:09 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001