OGLplus (0.52.0) a C++ wrapper for OpenGL

face_mode.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_FACE_MODE_1107121519_HPP
14 #define OGLPLUS_FACE_MODE_1107121519_HPP
15 
16 #ifdef Opposite
17 #undef Opposite
18 #endif
19 
20 #include <oglplus/enumerations.hpp>
21 
22 namespace oglplus {
23 
25 
34 OGLPLUS_ENUM_CLASS_BEGIN(Face, GLenum)
35 #include <oglplus/enums/face.ipp>
36 OGLPLUS_ENUM_CLASS_END(Face)
37 
38 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
39 #include <oglplus/enums/face_names.ipp>
40 #endif
41 
42 #if !OGLPLUS_ENUM_VALUE_RANGES
43 #include <oglplus/enums/face_range.ipp>
44 #endif
45 
46 inline Face Opposite(Face facing)
47 {
48  if(facing == Face::Front)
49  return Face::Back;
50  else if(facing == Face::Back)
51  return Face::Front;
52  else return facing;
53 }
54 
56 
62 OGLPLUS_ENUM_CLASS_BEGIN(FaceOrientation, GLenum)
63 #include <oglplus/enums/face_orientation.ipp>
64 OGLPLUS_ENUM_CLASS_END(FaceOrientation)
65 
66 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
67 #include <oglplus/enums/face_orientation_names.ipp>
68 #endif
69 
70 #if !OGLPLUS_ENUM_VALUE_RANGES
71 #include <oglplus/enums/face_orientation_range.ipp>
72 #endif
73 
75 
82 {
83  if(winding == FaceOrientation::CW)
84  return FaceOrientation::CCW;
85  else return FaceOrientation::CW;
86 }
87 
88 } // namespace oglplus
89 
90 #endif // include guard
FaceOrientation Inverted(FaceOrientation winding)
Inverts the face orientation (CW to CCW and CCW to CW)
Definition: face_mode.hpp:81
Enumeration-related declarations.
Face
Polygon facing enumeration.
Definition: face_mode.hpp:34
FaceOrientation
Face orientation enumeration.
Definition: face_mode.hpp:62
CCW: Counter-clockwise.

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).