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

osg::TexGen Class Reference

TexGen - encapsulates the OpenGL glTexGen (texture coordinate generation) state. More...

Inheritance diagram for osg::TexGen:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Mode {
  OBJECT_LINEAR = GL_OBJECT_LINEAR, EYE_LINEAR = GL_EYE_LINEAR, SPHERE_MAP = GL_SPHERE_MAP, NORMAL_MAP = GL_NORMAL_MAP_ARB,
  REFLECTION_MAP = GL_REFLECTION_MAP_ARB
}
enum  Coord { S, T, R, Q }

Public Methods

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

 META_StateAttribute (osg, TexGen, TEXGEN)
virtual bool isTextureAttribute () const
 return true if StateAttribute is a type which controls texturing and needs to be issued w.r.t to specific texture unit.

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

virtual void getAssociatedModes (std::vector< GLMode > &modes) const
 return the modes associated with this StateSet

virtual void apply (State &state) const
 apply the OpenGL state attributes.

void setMode (const Mode mode)
const Mode getMode () const
void setPlane (const Coord which, const Vec4 &plane)
const Vec4getPlane (const Coord which) const

Protected Methods

virtual ~TexGen (void)

Protected Attributes

Mode _mode
Vec4 _plane_s
 additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 _plane_t
 additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 _plane_r
 additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 _plane_q
 additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,


Detailed Description

TexGen - encapsulates the OpenGL glTexGen (texture coordinate generation) state.


Member Enumeration Documentation

enum osg::TexGen::Coord
 

Enumeration values:
S 
T 
R 
Q 

enum osg::TexGen::Mode
 

Enumeration values:
OBJECT_LINEAR 
EYE_LINEAR 
SPHERE_MAP 
NORMAL_MAP 
REFLECTION_MAP 


Constructor & Destructor Documentation

osg::TexGen::TexGen  
 

osg::TexGen::TexGen const TexGen &    texgen,
const CopyOp   copyop = CopyOp::SHALLOW_COPY
[inline]
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::TexGen::~TexGen void    [protected, virtual]
 


Member Function Documentation

virtual void osg::TexGen::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::TexGen::compare const StateAttribute   sa const [inline, virtual]
 

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

Implements osg::StateAttribute.

virtual void osg::TexGen::getAssociatedModes std::vector< GLMode > &    modes const [inline, virtual]
 

return the modes associated with this StateSet

Reimplemented from osg::StateAttribute.

const Mode osg::TexGen::getMode   const [inline]
 

const Vec4& osg::TexGen::getPlane const Coord    which const
 

virtual bool osg::TexGen::isTextureAttribute   const [inline, virtual]
 

return true if StateAttribute is a type which controls texturing and needs to be issued w.r.t to specific texture unit.

Reimplemented from osg::StateAttribute.

osg::TexGen::META_StateAttribute osg   ,
TexGen   ,
TEXGEN   
 

void osg::TexGen::setMode const Mode    mode [inline]
 

void osg::TexGen::setPlane const Coord    which,
const Vec4   plane
 


Member Data Documentation

Mode osg::TexGen::_mode [protected]
 

Vec4 osg::TexGen::_plane_q [protected]
 

additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 osg::TexGen::_plane_r [protected]
 

additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 osg::TexGen::_plane_s [protected]
 

additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

Vec4 osg::TexGen::_plane_t [protected]
 

additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,


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