version 3.3

VRS::Alternative Class Reference

#include <vrs/alternative.h>

Inheritance diagram for VRS::Alternative:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 Alternative (int id=1, double intensity=0.5)
void setId (int id)
 Use an ID between 1 and 8.
int getId () const
 Gets the ID of the alternative.
void setIntensity (double intensity)
 Must be in range [0.0, 1.0].
double getIntensity () const
 Returns the intensity a shape set is rendered with.
 VRS_TYPEINFO (Alternative, MonoAttribute)
 VRS_SERIALIZABLE (Alternative)


Detailed Description

Combined with an AlternativeTechnique the Alternative attribute controls the opacity of a scene part.

Constructor & Destructor Documentation

VRS::Alternative::Alternative ( int  id = 1,
double  intensity = 0.5 
)

The Alternative attribute specifies that shapes that are marked with it are rendered in a transparent way that absolutely prevents transparency artifacts. All shapes in the scene graph with Alternative attributes that hold the same ID (called a shape set in the following) are treated together. First, all shapes in the scene graph without Alternative attribute are rendered (opaque). Then, for each shape set, only the frontmost fragment is blended to the frame buffer (using the intensity of the corresponding Alternative attribute).


Member Function Documentation

void VRS::Alternative::setId ( int  id  ) 

Use an ID between 1 and 8.

int VRS::Alternative::getId (  )  const

Gets the ID of the alternative.

The ID is used to distinguish between different shape sets.

void VRS::Alternative::setIntensity ( double  intensity  ) 

Must be in range [0.0, 1.0].

double VRS::Alternative::getIntensity (  )  const

Returns the intensity a shape set is rendered with.

VRS::Alternative::VRS_TYPEINFO ( Alternative  ,
MonoAttribute   
)

VRS::Alternative::VRS_SERIALIZABLE ( Alternative   ) 


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

Generated on Fri May 18 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact