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

osg::PolygonMode Class Reference

Class to for setting OpenGL's polygon culling mode. More...

Inheritance diagram for osg::PolygonMode:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Face { FRONT, BACK, FRONT_AND_BACK }
enum  Mode { POINT = GL_POINT, LINE = GL_LINE, FILL = GL_FILL }

Public Methods

 PolygonMode ()
 PolygonMode (const PolygonMode &pm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.

 META_StateAttribute (osg, PolygonMode, POLYGONMODE)
virtual int compare (const StateAttribute &sa) const
 return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

void setMode (const Face face, const Mode mode)
const Mode getMode (const Face face) const
const bool getFrontAndBack () const
virtual void apply (State &state) const
 apply the OpenGL state attributes.


Protected Methods

virtual ~PolygonMode ()

Protected Attributes

bool _frontAndBack
Mode _modeFront
Mode _modeBack

Detailed Description

Class to for setting OpenGL's polygon culling mode.


Member Enumeration Documentation

enum osg::PolygonMode::Face
 

Enumeration values:
FRONT 
BACK 
FRONT_AND_BACK 

enum osg::PolygonMode::Mode
 

Enumeration values:
POINT 
LINE 
FILL 


Constructor & Destructor Documentation

osg::PolygonMode::PolygonMode  
 

osg::PolygonMode::PolygonMode const PolygonMode &    pm,
const CopyOp   copyop = CopyOp::SHALLOW_COPY
[inline]
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::PolygonMode::~PolygonMode   [protected, virtual]
 


Member Function Documentation

virtual void osg::PolygonMode::apply State   state const [virtual]
 

apply the OpenGL state attributes.

The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

Implements osg::StateAttribute.

virtual int osg::PolygonMode::compare const StateAttribute   sa const [inline, virtual]
 

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

const bool osg::PolygonMode::getFrontAndBack   const [inline]
 

const Mode osg::PolygonMode::getMode const Face    face const
 

osg::PolygonMode::META_StateAttribute osg   ,
PolygonMode   ,
POLYGONMODE   
 

void osg::PolygonMode::setMode const Face    face,
const Mode    mode
 


Member Data Documentation

bool osg::PolygonMode::_frontAndBack [protected]
 

Mode osg::PolygonMode::_modeBack [protected]
 

Mode osg::PolygonMode::_modeFront [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:37 2002 for the Open Scene Graph by doxygen 1.2.16.