Panda3D
cullFaceAttrib.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file cullFaceAttrib.I
10  * @author drose
11  * @date 2002-02-27
12  */
13 
14 /**
15  * Use CullFaceAttrib::make() to construct a new CullFaceAttrib object.
16  */
17 INLINE CullFaceAttrib::
18 CullFaceAttrib(CullFaceAttrib::Mode mode, bool reverse) :
19  _mode(mode),
20  _reverse(reverse)
21 {
22 }
23 
24 /**
25  * Returns the actual culling mode, without considering the effects of the
26  * reverse flag. See also get_effective_mode().
27  */
28 INLINE CullFaceAttrib::Mode CullFaceAttrib::
29 get_actual_mode() const {
30  return _mode;
31 }
32 
33 /**
34  * Returns the 'reverse' flag. If this is true, the actual cull direction
35  * (clockwise vs. counterclockwise) is the reverse of what is specified here.
36  * This allows support for make_reverse(), which defines a CullFaceAttrib that
37  * reverses whatever the sense of culling would have been.
38  */
39 INLINE bool CullFaceAttrib::
40 get_reverse() const {
41  return _reverse;
42 }