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)
91 namespace SceneGraph {
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
DrawMode SOLID_FACES_COLORED_SMOOTH_SHADED
draw smooth shaded and colored faces (requires vertex normals and face colors)
DrawMode EDGES_COLORED
draw edges with colors (without shading)
Namespace providing different geometric functions concerning angles.
DrawMode SOLID_1DTEXTURED_SHADED
draw smooth shaded textured faces
bool operator!=(const DrawModeProperties &_other) const
compare two properties
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
DrawMode HALFEDGES
draw halfedges
DrawMode SOLID_2DTEXTURED_FACE_SHADED
draw per halfedge textured faces
DrawMode SOLID_2DTEXTURED_FACE
draw per halfedge textured faces
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawModeTexCoordSource
Source of Texture Coordinates.
const DrawMode & getDrawMode(const std::string &_name)
Get a custom DrawMode.
void initializeDefaultDrawModes(void)
DrawMode SOLID_SMOOTH_SHADED
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawModeLightStage
Lighting stage of a mesh: unlit, smooth, phong.
DrawModePrimitive
Primitive mode of a mesh.
bool colored() const
Are colors used?
DrawMode SOLID_ENV_MAPPED
draw environment mapped
bool drawModeExists(const std::string &_name)
Check if the given draw mode exists.
DrawMode POINTS_COLORED
draw colored, but not lighted points (requires point colors)
DrawModeColorSource
Source of Primitive Colors.
DrawModeProperties stores a set of properties that defines, how to render an object.
DrawModePrimitive primitive_
Specify which type of primitives will get uploaded to the graphics card.
DrawMode UNUSED
marks the last used ID
DrawMode POINTS
draw unlighted points using the default base color
bool flatShaded() const
Is flat shading used (Normals per face)?
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
DrawModeNormalSource
Source of Normals.
DrawMode SOLID_TEXTURED
draw textured faces
DrawMode POINTS_SHADED
draw shaded points (requires point normals)
DrawMode CELLS_COLORED
draw cells with colors (without shading)
DrawMode SOLID_3DTEXTURED
draw textured faces
DrawMode SOLID_PHONG_SHADED
draw phong shaded faces
DrawMode WIREFRAME
draw wireframe
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
DrawMode SOLID_1DTEXTURED
draw textured faces
bool textured() const
Is texturing enabled?
DrawMode SOLID_TEXTURED_SHADED
draw smooth shaded textured faces
bool lighting() const
Is lighting enabled?
const DrawMode & addDrawMode(const std::string &_name, bool _propertyBased)
Add a custom DrawMode.
DrawMode SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED
draw per halfedge texture faces modulated with face colors with smooth shading
bool operator==(const DrawModeProperties &_other) const
compare two properties
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
DrawMode SOLID_POINTS_COLORED_SHADED
draw faces, but use Gouraud shading to interpolate vertex colors
DrawMode SOLID_SMOOTH_SHADED_FEATURES
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode HALFEDGES_COLORED
draw halfedges with colors (without shading)
DrawMode getDrawModeFromIndex(unsigned int _index)
given an index of an atomic draw mode, return the drawmode
DrawMode NONE
not a valid draw mode
DrawMode SOLID_3DTEXTURED_SHADED
draw smooth shaded textured faces
std::vector< DrawModeProperties > layers_