Developer Documentation
ACG::SceneGraph::DrawModes::DrawModeProperties Class Reference

DrawModeProperties stores a set of properties that defines, how to render an object. More...

#include <OpenFlipper/libs_required/ACG/Scenegraph/DrawModes.hh>

Public Member Functions

 DrawModeProperties (DrawModePrimitive _primitive=PRIMITIVE_POLYGON, DrawModeLightStage _lightStage=LIGHTSTAGE_UNLIT, DrawModeNormalSource _normalSource=NORMAL_NONE, DrawModeColorSource _colorSource=COLOR_NONE, DrawModeTexCoordSource _texcoordSource=TEXCOORD_NONE, bool _envMapping=false)
 
Getter/Setter of all properties
DrawModePrimitive primitive () const
 
void primitive (DrawModePrimitive _val)
 
DrawModeLightStage lightStage () const
 
void lightStage (DrawModeLightStage _val)
 
DrawModeColorSource colorSource () const
 
void colorSource (DrawModeColorSource _val)
 
DrawModeNormalSource normalSource () const
 
void normalSource (DrawModeNormalSource _val)
 
DrawModeTexCoordSource texcoordSource () const
 
void texcoordSource (DrawModeTexCoordSource _val)
 
Helper functions for more convenient use in renderer
bool lighting () const
 Is lighting enabled? More...
 
bool textured () const
 Is texturing enabled? More...
 
bool colored () const
 Are colors used? More...
 
bool flatShaded () const
 Is flat shading used (Normals per face)? More...
 
Comparison functions
bool operator!= (const DrawModeProperties &_other) const
 compare two properties More...
 
bool operator== (const DrawModeProperties &_other) const
 compare two properties More...
 

Private Attributes

bool envMapped_
 
DrawModePrimitive primitive_
 Specify which type of primitives will get uploaded to the graphics card. More...
 
DrawModeLightStage lightStage_
 
DrawModeColorSource colorSource_
 
DrawModeTexCoordSource texcoordSource_
 
DrawModeNormalSource normalSource_
 

Detailed Description

DrawModeProperties stores a set of properties that defines, how to render an object.

A property may be the primitive type, normal source, color source ... Each property is atomic, i.e. it can not be combined with other properties of the same type. Example: primitive may be PRIMITIVE_POLYGON or PRIMITIVE_POINTS, but not both at the same time. This restriction makes a property set well defined; it is always a valid set of properties. To have combined DrawModes i.e. flat + wireframe you have to use the layer approach of DrawMode.

Definition at line 177 of file DrawModes.hh.

Constructor & Destructor Documentation

◆ DrawModeProperties()

ACG::SceneGraph::DrawModes::DrawModeProperties::DrawModeProperties ( DrawModePrimitive  _primitive = PRIMITIVE_POLYGON,
DrawModeLightStage  _lightStage = LIGHTSTAGE_UNLIT,
DrawModeNormalSource  _normalSource = NORMAL_NONE,
DrawModeColorSource  _colorSource = COLOR_NONE,
DrawModeTexCoordSource  _texcoordSource = TEXCOORD_NONE,
bool  _envMapping = false 
)

Definition at line 172 of file DrawModes.cc.

Member Function Documentation

◆ colored()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::colored ( ) const
inline

Are colors used?

Definition at line 222 of file DrawModes.hh.

◆ colorSource() [1/2]

DrawModeColorSource ACG::SceneGraph::DrawModes::DrawModeProperties::colorSource ( ) const
inline

Definition at line 199 of file DrawModes.hh.

◆ colorSource() [2/2]

void ACG::SceneGraph::DrawModes::DrawModeProperties::colorSource ( DrawModeColorSource  _val)
inline

Definition at line 200 of file DrawModes.hh.

◆ flatShaded()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::flatShaded ( ) const
inline

Is flat shading used (Normals per face)?

Definition at line 225 of file DrawModes.hh.

◆ lighting()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::lighting ( ) const
inline

Is lighting enabled?

Definition at line 216 of file DrawModes.hh.

◆ lightStage() [1/2]

DrawModeLightStage ACG::SceneGraph::DrawModes::DrawModeProperties::lightStage ( ) const
inline

Definition at line 196 of file DrawModes.hh.

◆ lightStage() [2/2]

void ACG::SceneGraph::DrawModes::DrawModeProperties::lightStage ( DrawModeLightStage  _val)
inline

Definition at line 197 of file DrawModes.hh.

◆ normalSource() [1/2]

DrawModeNormalSource ACG::SceneGraph::DrawModes::DrawModeProperties::normalSource ( ) const
inline

Definition at line 202 of file DrawModes.hh.

◆ normalSource() [2/2]

void ACG::SceneGraph::DrawModes::DrawModeProperties::normalSource ( DrawModeNormalSource  _val)
inline

Definition at line 203 of file DrawModes.hh.

◆ operator!=()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::operator!= ( const DrawModeProperties _other) const
inline

compare two properties

Parameters
_otherRight hand side

Definition at line 237 of file DrawModes.hh.

◆ operator==()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::operator== ( const DrawModeProperties _other) const
inline

compare two properties

Parameters
_otherRight hand side

Definition at line 251 of file DrawModes.hh.

◆ primitive() [1/2]

DrawModePrimitive ACG::SceneGraph::DrawModes::DrawModeProperties::primitive ( ) const
inline

Definition at line 193 of file DrawModes.hh.

◆ primitive() [2/2]

void ACG::SceneGraph::DrawModes::DrawModeProperties::primitive ( DrawModePrimitive  _val)
inline

Definition at line 194 of file DrawModes.hh.

◆ texcoordSource() [1/2]

DrawModeTexCoordSource ACG::SceneGraph::DrawModes::DrawModeProperties::texcoordSource ( ) const
inline

Definition at line 205 of file DrawModes.hh.

◆ texcoordSource() [2/2]

void ACG::SceneGraph::DrawModes::DrawModeProperties::texcoordSource ( DrawModeTexCoordSource  _val)
inline

Definition at line 206 of file DrawModes.hh.

◆ textured()

bool ACG::SceneGraph::DrawModes::DrawModeProperties::textured ( ) const
inline

Is texturing enabled?

Definition at line 219 of file DrawModes.hh.

Member Data Documentation

◆ colorSource_

DrawModeColorSource ACG::SceneGraph::DrawModes::DrawModeProperties::colorSource_
private

Definition at line 272 of file DrawModes.hh.

◆ envMapped_

bool ACG::SceneGraph::DrawModes::DrawModeProperties::envMapped_
private

Definition at line 265 of file DrawModes.hh.

◆ lightStage_

DrawModeLightStage ACG::SceneGraph::DrawModes::DrawModeProperties::lightStage_
private

Definition at line 270 of file DrawModes.hh.

◆ normalSource_

DrawModeNormalSource ACG::SceneGraph::DrawModes::DrawModeProperties::normalSource_
private

Definition at line 276 of file DrawModes.hh.

◆ primitive_

DrawModePrimitive ACG::SceneGraph::DrawModes::DrawModeProperties::primitive_
private

Specify which type of primitives will get uploaded to the graphics card.

Definition at line 268 of file DrawModes.hh.

◆ texcoordSource_

DrawModeTexCoordSource ACG::SceneGraph::DrawModes::DrawModeProperties::texcoordSource_
private

Definition at line 274 of file DrawModes.hh.


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