ACG::SceneGraph::DrawModes Namespace Reference

Classes

class  DrawModeInternal
class  DrawMode

Typedefs

typedef std::vector
< DrawModeInternal
VecDrawModes
typedef std::bitset< 64 > ModeFlagSet

Functions

void initializeDefaultDrawModes (void)
bool addDrawMode (const std::string &_name, DrawMode &_newId)
bool getDrawMode (const std::string &_name, DrawMode &_Id)
 Get a DrawMode from its name The Id of the DrawMode with name _name is returned in variable _Id. Returns false if the DrawMode could not been found.
bool drawModeExists (const std::string &_name)
 Check if the given draw mode exists.
DrawMode getDrawModeFromIndex (unsigned int _index)
 given an index of an atomic draw mode, return the drawmode

Variables

static VecDrawModes currentDrawModes_
static DrawMode firstFreeID_
DrawMode const NONE = ModeFlagSet(0)
 not a valid draw mode
DrawMode const DEFAULT = ModeFlagSet(1)
 use the default (global) draw mode and not the node's own.
DrawMode const POINTS = ModeFlagSet(1) << 1
 draw unlighted points using the default base color
DrawMode const POINTS_COLORED = ModeFlagSet(1) << 2
 draw colored, but not lighted points (requires point colors)
DrawMode const POINTS_SHADED = ModeFlagSet(1) << 3
 draw shaded points (requires point normals)
DrawMode const EDGES = ModeFlagSet(1) << 4
 draw wireframe
DrawMode const WIREFRAME = ModeFlagSet(1) << 5
 draw wireframe
DrawMode const FACES = ModeFlagSet(1) << 6
DrawMode const HIDDENLINE = ModeFlagSet(1) << 7
 draw hidden line (2 rendering passes needed)
DrawMode const SOLID_FLAT_SHADED = ModeFlagSet(1) << 8
 draw flat shaded faces (requires face normals)
DrawMode const SOLID_SMOOTH_SHADED = ModeFlagSet(1) << 9
 draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode const SOLID_PHONG_SHADED = ModeFlagSet(1) << 10
 draw phong shaded faces
DrawMode const SOLID_FACES_COLORED = ModeFlagSet(1) << 11
 draw colored, but not lighted faces using face colors
DrawMode const SOLID_POINTS_COLORED = ModeFlagSet(1) << 12
 draw faces, but use Gouraud shading to interpolate vertex colors
DrawMode const SOLID_ENV_MAPPED = ModeFlagSet(1) << 13
 draw environment mapped
DrawMode const SOLID_TEXTURED = ModeFlagSet(1) << 14
 draw textured faces
DrawMode const SOLID_TEXTURED_SHADED = ModeFlagSet(1) << 15
 draw smooth shaded textured faces
DrawMode const SOLID_1DTEXTURED = ModeFlagSet(1) << 16
 draw textured faces
DrawMode const SOLID_1DTEXTURED_SHADED = ModeFlagSet(1) << 17
 draw smooth shaded textured faces
DrawMode const SOLID_3DTEXTURED = ModeFlagSet(1) << 18
 draw textured faces
DrawMode const SOLID_3DTEXTURED_SHADED = ModeFlagSet(1) << 19
 draw smooth shaded textured faces
DrawMode const SOLID_FACES_COLORED_FLAT_SHADED = ModeFlagSet(1) << 20
 draw flat shaded and colored faces (requires face normals and colors)
DrawMode const SOLID_2DTEXTURED_FACE = ModeFlagSet(1) << 21
 draw per halfedge textured faces
DrawMode const SOLID_2DTEXTURED_FACE_SHADED = ModeFlagSet(1) << 22
 draw per halfedge textured faces
DrawMode const SOLID_SHADER = ModeFlagSet(1) << 23
DrawMode const UNUSED = ModeFlagSet(1) << 24
 marks the last used ID

Detailed Description

This namespace consists of the definition of all available draw modes, function to get their name (description()) and to include them in a QPopupMenu.


Function Documentation

ACGDLLEXPORT bool ACG::SceneGraph::DrawModes::addDrawMode ( const std::string &  _name,
DrawMode &  _newId 
)

Add a custom DrawMode. The new ID is returned in the variable _newId. A false return value indicates that the addition failed because all available IDs are occupied.

Todo:
Create a new DrawMode correctly

ACGDLLEXPORT bool ACG::SceneGraph::DrawModes::drawModeExists ( const std::string &  _name  ) 

Check if the given draw mode exists.

ACGDLLEXPORT void ACG::SceneGraph::DrawModes::initializeDefaultDrawModes ( void   ) 

Initialize the default modes. This function has to be called at least once at application startup.

Referenced by ACG::SceneGraph::ACG::SceneGraph::BaseNode::BaseNode().


Variable Documentation

First free DrawMode ID for custom modes.

Definition at line 94 of file DrawModes.cc.

DrawMode const ACG::SceneGraph::DrawModes::SOLID_SHADER = ModeFlagSet(1) << 23

drawing is controlled by shaders ( Use shadernodes to set them before the actual object to render)

Definition at line 243 of file DrawModes.hh.

Referenced by ACG::SceneGraph::ShaderNode::availableDrawModes(), ACG::SceneGraph::TextureNode::enter(), MeshObject< MeshT >::init(), and ACG::SceneGraph::TextureNode::leave().


acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .