53 #ifndef ACG_DRAWMODES_HH 54 #define ACG_DRAWMODES_HH 73 #include "../Config/ACGDefines.hh" 77 #if defined (_MSC_VER) 78 # pragma warning (disable:4251) 124 PRIMITIVE_HIDDENLINE,
167 typedef std::bitset<128> ModeFlagSet;
186 bool _envMapping =
false);
238 return ( (envMapped_ != _other.envMapped_) ||
240 (lightStage_ != _other.lightStage_) ||
241 (colorSource_ != _other.colorSource_) ||
242 (texcoordSource_ != _other.texcoordSource_) ||
243 (normalSource_ != _other.normalSource_)
252 return ( (envMapped_ == _other.envMapped_) &&
254 (lightStage_ == _other.lightStage_) &&
255 (colorSource_ == _other.colorSource_) &&
256 (texcoordSource_ == _other.texcoordSource_) &&
257 (normalSource_ == _other.normalSource_)
313 explicit DrawMode(
const ModeFlagSet& _flags );
319 static DrawMode getFromDescription(std::string _description);
328 bool operator==(
const DrawMode& _mode)
const;
338 bool operator!=(
const DrawMode& _mode2 )
const;
346 operator bool()
const;
375 size_t getNumLayers()
const;
387 bool removeLayer(
unsigned int _i);
410 size_t getIndex()
const;
427 std::string description()
const;
433 bool isAtomic()
const;
437 bool containsAtomicDrawMode(
const DrawMode& _atomicDrawMode )
const;
444 std::vector< DrawMode > getAtomicDrawModes()
const;
448 size_t maxModes()
const;
481 bool checkConsistency()
const;
493 ModeFlagSet modeFlags_;
673 #endif // ACG_DRAWMODES_HH defined DrawMode SOLID_2DTEXTURED_FACE
draw per halfedge textured faces
std::vector< DrawModeProperties > layers_
bool operator==(const DrawModeProperties &_other) const
compare two properties
DrawModePrimitive
Primitive mode of a mesh.
DrawMode SOLID_3DTEXTURED_SHADED
draw smooth shaded textured faces
bool flatShaded() const
Is flat shading used (Normals per face)?
DrawMode SOLID_ENV_MAPPED
draw environment mapped
bool lighting() const
Is lighting enabled?
Namespace providing different geometric functions concerning angles.
DrawModeNormalSource
Source of Normals.
DrawModeLightStage
Lighting stage of a mesh: unlit, smooth, phong.
DrawMode SOLID_SMOOTH_SHADED_FEATURES
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
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_2DTEXTURED_FACE_SHADED
draw per halfedge textured faces
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode UNUSED
marks the last used ID
DrawMode SOLID_SMOOTH_SHADED
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
bool colored() const
Are colors used?
DrawModePrimitive primitive_
Specify which type of primitives will get uploaded to the graphics card.
DrawMode SOLID_3DTEXTURED
draw textured faces
bool drawModeExists(const std::string &_name)
Check if the given draw mode exists.
DrawMode SOLID_POINTS_COLORED_SHADED
draw faces, but use Gouraud shading to interpolate vertex colors
DrawMode HALFEDGES
draw halfedges
DrawMode SOLID_PHONG_SHADED
draw phong shaded faces
DrawMode HALFEDGES_COLORED
draw halfedges with colors (without shading)
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
bool textured() const
Is texturing enabled?
DrawMode SOLID_1DTEXTURED
draw textured faces
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
const DrawMode & getDrawMode(const std::string &_name)
Get a custom DrawMode.
DrawModeTexCoordSource
Source of Texture Coordinates.
DrawMode SOLID_TEXTURED
draw textured faces
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
DrawModeColorSource
Source of Primitive Colors.
DrawMode CELLS_COLORED
draw cells with colors (without shading)
const DrawMode & addDrawMode(const std::string &_name, bool _propertyBased)
Add a custom DrawMode.
DrawMode NONE
not a valid draw mode
DrawMode POINTS
draw unlighted points using the default base color
DrawModeProperties stores a set of properties that defines, how to render an object.
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawMode SOLID_1DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode getDrawModeFromIndex(unsigned int _index)
given an index of an atomic draw mode, return the drawmode
DrawMode WIREFRAME
draw wireframe
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
DrawMode POINTS_COLORED
draw colored, but not lighted points (requires point colors)
DrawMode EDGES_COLORED
draw edges with colors (without shading)
DrawMode SOLID_TEXTURED_SHADED
draw smooth shaded textured faces
void initializeDefaultDrawModes(void)
DrawMode SOLID_FACES_COLORED_SMOOTH_SHADED
draw smooth shaded and colored faces (requires vertex normals and face colors)
DrawMode POINTS_SHADED
draw shaded points (requires point normals)