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