osgPPU::ColorAttribute Class Reference

Stateattribute to work with blending. Can be used for animated blending operations (fadein, fadeout). More...


Public Member Functions

 META_StateAttribute (osgPPU, ColorAttribute, MATERIAL)
 ColorAttribute (const ColorAttribute &bm, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
int compare (const osg::StateAttribute &sa) const
void apply (osg::State &state) const
bool getModeUsage (osg::StateAttribute::ModeUsage &usage) const
void setStartTime (double time)
double getStartTime () const
void setEndTime (double time)
double getEndTime () const
void setStartColor (const osg::Vec4 &color)
const osg::Vec4 & getStartColor () const
void setEndColor (const osg::Vec4 &color)
const osg::Vec4 & getEndColor () const

Data Structures

class  UpdateCallback


Detailed Description

Stateattribute to work with blending. Can be used for animated blending operations (fadein, fadeout).

This is a class derived from StateAttirbute. It allows to specify blending colors based on the reference time provided with the corresponding node visitor. This class is also used to setup any unit's geometry to default color (1,1,1,1) which is required for proper rendering.


Member Function Documentation

int osgPPU::ColorAttribute::compare ( const osg::StateAttribute &  sa  )  const

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

void osgPPU::ColorAttribute::apply ( osg::State &  state  )  const

Apply attribute to the state. This will just call the glColor() function with appropriate values. The corresponding time is updated during the update traversion.

bool osgPPU::ColorAttribute::getModeUsage ( osg::StateAttribute::ModeUsage &  usage  )  const

Set to use GL_BLEND mode, because it is required for this attribute

void osgPPU::ColorAttribute::setStartTime ( double  time  ) 

Set start time for the interpolationm operation

double osgPPU::ColorAttribute::getStartTime (  )  const

Get start interpolation time

void osgPPU::ColorAttribute::setEndTime ( double  time  ) 

Set end time for the interpolationm operation

double osgPPU::ColorAttribute::getEndTime (  )  const

Get end interpolation time

void osgPPU::ColorAttribute::setStartColor ( const osg::Vec4 &  color  ) 

Set start value of the interpolationm operation

const osg::Vec4& osgPPU::ColorAttribute::getStartColor (  )  const

Get start interpolation time

void osgPPU::ColorAttribute::setEndColor ( const osg::Vec4 &  color  ) 

Set end value of the interpolationm operation

const osg::Vec4& osgPPU::ColorAttribute::getEndColor (  )  const

Get end interpolation time


The documentation for this class was generated from the following file:

Back to Homepage of osgPPU

Copyright (C) 2008 by Art Tevs (LGPL)