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 Member Functions

 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 bool getModeUsage (StateAttribute::ModeUsage &usage) const
 Return the modes associated with this StateAttribute.
virtual void apply (State &state) const
 apply the OpenGL state attributes.
void setMode (Mode mode)
Mode getMode () const
void setPlane (Coord which, const Plane &plane)
PlanegetPlane (Coord which)
const PlanegetPlane (Coord which) const
void setPlanesFromMatrix (const Matrixd &matrix)
 Set the tex gen planes from specified matrix.

Protected Member Functions

virtual ~TexGen (void)

Protected Attributes

Mode _mode
Plane _plane_s
 Additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,.
Plane _plane_t
Plane _plane_r
Plane _plane_q


Detailed Description

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


Member Enumeration Documentation

enum osg::TexGen::Mode

Enumerator:
OBJECT_LINEAR 
EYE_LINEAR 
SPHERE_MAP 
NORMAL_MAP 
REFLECTION_MAP 

enum osg::TexGen::Coord

Enumerator:
S 
T 
R 
Q 


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

osg::TexGen::META_StateAttribute ( osg  ,
TexGen  ,
TEXGEN   
)

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.

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 bool osg::TexGen::getModeUsage ( StateAttribute::ModeUsage  )  const [inline, virtual]

Return the modes associated with this StateAttribute.

Reimplemented from osg::StateAttribute.

virtual void osg::TexGen::apply ( State  )  const [virtual]

apply the OpenGL state attributes.

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

Reimplemented from osg::StateAttribute.

void osg::TexGen::setMode ( Mode  mode  )  [inline]

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

void osg::TexGen::setPlane ( Coord  which,
const Plane plane 
)

Plane& osg::TexGen::getPlane ( Coord  which  ) 

const Plane& osg::TexGen::getPlane ( Coord  which  )  const

void osg::TexGen::setPlanesFromMatrix ( const Matrixd matrix  ) 

Set the tex gen planes from specified matrix.

Typical usage would be to pass in a projection matrix to set up projective texturing.


Member Data Documentation

Mode osg::TexGen::_mode [protected]

Plane osg::TexGen::_plane_s [protected]

Additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,.

Plane osg::TexGen::_plane_t [protected]

Plane osg::TexGen::_plane_r [protected]

Plane osg::TexGen::_plane_q [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:17 2007 for the OpenSceneGraph by doxygen 1.5.3.