59 #ifndef ACG_DRAWMODES_HH
60 #define ACG_DRAWMODES_HH
79 #include "../Config/ACGDefines.hh"
83 #if defined (_MSC_VER)
84 # pragma warning (disable:4251)
130 PRIMITIVE_HIDDENLINE,
173 typedef std::bitset<128> ModeFlagSet;
192 bool _envMapping =
false);
244 return ( (envMapped_ != _other.envMapped_) ||
246 (lightStage_ != _other.lightStage_) ||
247 (colorSource_ != _other.colorSource_) ||
248 (texcoordSource_ != _other.texcoordSource_) ||
249 (normalSource_ != _other.normalSource_)
258 return ( (envMapped_ == _other.envMapped_) &&
260 (lightStage_ == _other.lightStage_) &&
261 (colorSource_ == _other.colorSource_) &&
262 (texcoordSource_ == _other.texcoordSource_) &&
263 (normalSource_ == _other.normalSource_)
325 static DrawMode getFromDescription(std::string _description);
334 bool operator==(
const DrawMode& _mode)
const;
344 bool operator!=(
const DrawMode& _mode2 )
const;
352 operator bool()
const;
381 size_t getNumLayers()
const;
393 bool removeLayer(
unsigned int _i);
416 size_t getIndex()
const;
433 std::string description()
const;
439 bool isAtomic()
const;
443 bool containsAtomicDrawMode(
DrawMode _atomicDrawMode )
const;
450 std::vector< DrawMode > getAtomicDrawModes()
const;
454 size_t maxModes()
const;
487 bool checkConsistency()
const;
499 ModeFlagSet modeFlags_;
679 #endif // ACG_DRAWMODES_HH defined
std::vector< DrawModeProperties > layers_
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode CELLS_COLORED
draw cells with colors (without shading)
bool operator!=(const DrawModeProperties &_other) const
compare two properties
DrawModeTexCoordSource
Source of Texture Coordinates.
void initializeDefaultDrawModes(void)
bool flatShaded() const
Is flat shading used (Normals per face)?
bool lighting() const
Is lighting enabled?
DrawMode WIREFRAME
draw wireframe
DrawMode SOLID_ENV_MAPPED
draw environment mapped
DrawMode UNUSED
marks the last used ID
DrawModeColorSource
Source of Primitive Colors.
DrawMode SOLID_TEXTURED
draw textured faces
Namespace providing different geometric functions concerning angles.
DrawModeProperties stores a set of properties that defines, how to render an object.
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
DrawMode SOLID_PHONG_SHADED
draw phong shaded faces
DrawModePrimitive primitive_
Specify which type of primitives will get uploaded to the graphics card.
DrawMode SOLID_1DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode EDGES_COLORED
draw edges with colors (without shading)
DrawMode POINTS
draw unlighted points using the default base color
DrawModeNormalSource
Source of Normals.
DrawMode SOLID_POINTS_COLORED_SHADED
draw faces, but use Gouraud shading to interpolate vertex colors
bool colored() const
Are colors used?
DrawMode SOLID_3DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_2DTEXTURED_FACE_SHADED
draw per halfedge textured faces
DrawMode HALFEDGES_COLORED
draw halfedges with colors (without shading)
DrawMode SOLID_FACES_COLORED_SMOOTH_SHADED
draw smooth shaded and colored faces (requires vertex normals and face colors)
DrawMode SOLID_SMOOTH_SHADED
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
bool operator==(const DrawModeProperties &_other) const
compare two properties
DrawMode SOLID_TEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
DrawMode SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED
draw per halfedge texture faces modulated with face colors with smooth shading
const DrawMode & addDrawMode(const std::string &_name, bool _propertyBased)
Add a custom DrawMode.
const DrawMode & getDrawMode(const std::string &_name)
Get a custom DrawMode.
DrawMode POINTS_COLORED
draw colored, but not lighted points (requires point colors)
DrawMode SOLID_2DTEXTURED_FACE
draw per halfedge textured faces
DrawModePrimitive
Primitive mode of a mesh.
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawModeLightStage
Lighting stage of a mesh: unlit, smooth, phong.
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
DrawMode NONE
not a valid draw mode
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
DrawMode SOLID_3DTEXTURED
draw textured faces
bool textured() const
Is texturing enabled?
DrawMode HALFEDGES
draw halfedges
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
DrawMode POINTS_SHADED
draw shaded points (requires point normals)
DrawMode SOLID_SMOOTH_SHADED_FEATURES
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode SOLID_1DTEXTURED
draw textured faces