ACG::SceneGraph::DrawModes Namespace Reference

Classes

class  DrawMode

Typedefs

typedef std::vector< DrawModeVecDrawModes

Enumerations

enum  DrawModeIDs {
  NONE = 0, DEFAULT = 1, POINTS = 1<<1, POINTS_COLORED = 1<<2,
  POINTS_SHADED = 1<<3, WIREFRAME = 1<<4, HIDDENLINE = 1<<5, SOLID_FLAT_SHADED = 1<<6,
  SOLID_SMOOTH_SHADED = 1<<7, SOLID_PHONG_SHADED = 1<<8, SOLID_FACES_COLORED = 1<<9, SOLID_POINTS_COLORED = 1<<10,
  SOLID_ENV_MAPPED = 1<<11, SOLID_TEXTURED = 1<<12, SOLID_TEXTURED_SHADED = 1<<13, SOLID_1DTEXTURED = 1<<14,
  SOLID_1DTEXTURED_SHADED = 1<<15, SOLID_3DTEXTURED = 1<<16, SOLID_3DTEXTURED_SHADED = 1<<17, SOLID_FACES_COLORED_FLAT_SHADED = 1<<18,
  SOLID_2DTEXTURED_FACE = 1<<19, SOLID_2DTEXTURED_FACE_SHADED = 1<<20, SOLID_SHADER = 1 <<21, UNUSED = 1 <<22
}

Functions

std::string description (unsigned int _drawMode)
std::vector< unsigned int > getDrawModeIDs (unsigned int _drawModes)
bool containsId (unsigned int _drawMode, unsigned int _id)
void initializeDefaultDrawModes (void)
bool addDrawMode (const std::string &_name, unsigned int &_newId)
bool getDrawModeId (const std::string &_name, unsigned int &_Id)

Variables

static VecDrawModes currentDrawModes_
static unsigned int firstFreeID_

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.


Enumeration Type Documentation

Lists all basic draw modes. The function BaseNode::availableDrawModes() returns OR'ed items of this enum

Enumerator:
NONE 

not a valid draw mode

DEFAULT 

use the default (global) draw mode and not the node's own.

POINTS 

draw unlighted points using the default base color

POINTS_COLORED 

draw colored, but not lighted points (requires point colors)

POINTS_SHADED 

draw shaded points (requires point normals)

WIREFRAME 

draw wireframe

HIDDENLINE 

draw hidden line (2 rendering passes needed)

SOLID_FLAT_SHADED 

draw flat shaded faces (requires face normals)

SOLID_SMOOTH_SHADED 

draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)

SOLID_PHONG_SHADED 

draw phong shaded faces

SOLID_FACES_COLORED 

draw colored, but not lighted faces using face colors

SOLID_POINTS_COLORED 

draw faces, but use Gouraud shading to interpolate vertex colors

SOLID_ENV_MAPPED 

draw environment mapped

SOLID_TEXTURED 

draw textured faces

SOLID_TEXTURED_SHADED 

draw smooth shaded textured faces

SOLID_1DTEXTURED 

draw textured faces

SOLID_1DTEXTURED_SHADED 

draw smooth shaded textured faces

SOLID_3DTEXTURED 

draw textured faces

SOLID_3DTEXTURED_SHADED 

draw smooth shaded textured faces

SOLID_FACES_COLORED_FLAT_SHADED 

draw flat shaded and colored faces (requires face normals and colors)

SOLID_2DTEXTURED_FACE 

draw per halfedge textured faces

SOLID_2DTEXTURED_FACE_SHADED 

draw per halfedge textured faces

SOLID_SHADER 

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

UNUSED 

marks the last used ID

Definition at line 91 of file DrawModes.hh.


Function Documentation

ACGDLLEXPORT bool ACG::SceneGraph::DrawModes::addDrawMode ( const std::string &  _name,
unsigned int &  _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.

ACGDLLEXPORT bool ACG::SceneGraph::DrawModes::containsId ( unsigned int  _drawMode,
unsigned int  _id 
)

Check whether an ID is encoded in _drawMode

Referenced by CoreWidget::slotUpdateGlobalDrawMenu(), and CoreWidget::slotUpdateViewerDrawMenu().

ACGDLLEXPORT std::string ACG::SceneGraph::DrawModes::description ( unsigned int  _drawMode  ) 

Get a description string for _drawMode. An empty string is returned if _drawMode is not a valid draw mode.

Referenced by CoreWidget::slotGlobalDrawMenu(), CoreWidget::slotUpdateGlobalDrawMenu(), CoreWidget::slotUpdateViewerDrawMenu(), and CoreWidget::slotViewerDrawMenu().

ACGDLLEXPORT bool ACG::SceneGraph::DrawModes::getDrawModeId ( const std::string &  _name,
unsigned int &  _Id 
)

Get the Id of a DrawMode. The Id of the DrawMode with name _name is returned in variable _Id. Returns false if the DrawMode could not been found.

ACGDLLEXPORT std::vector< unsigned int > ACG::SceneGraph::DrawModes::getDrawModeIDs ( unsigned int  _drawMode  ) 
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::BaseNode::BaseNode().


Variable Documentation

Vector of all currently defined DrawModes.

Definition at line 90 of file DrawModes.cc.

First free DrawMode ID for custom modes.

Definition at line 93 of file DrawModes.cc.


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