Indicates which faces should be culled based on their vertex ordering.
enumerator M_cull_none = 0
Cull no polygons
enumerator M_cull_clockwise = 1
Cull clockwise-oriented polygons
enumerator M_cull_counter_clockwise = 2
Cull counter-clockwise-oriented polygons
enumerator M_cull_unchanged = 3
Do not change existing cull behavior
- enumerator M_cull_none = 0
Mode get_actual_mode(void) const
Returns the actual culling mode, without considering the effects of the reverse flag. See also
static int get_class_slot(void)
Mode get_effective_mode(void) const
Returns the effective culling mode. This is the same as the actual culling mode, unless the reverse flag is set, which swaps CW for CCW and vice- versa. Also, M_cull_unchanged is mapped to M_cull_none.
bool get_reverse(void) const
Returns the ‘reverse’ flag. If this is true, the actual cull direction (clockwise vs. counterclockwise) is the reverse of what is specified here. This allows support for
make_reverse(), which defines a
CullFaceAttribthat reverses whatever the sense of culling would have been.
static ConstPointerTo<RenderAttrib> make(CullFaceAttrib::Mode mode = M_cull_clockwise)
Constructs a new
CullFaceAttribobject that specifies how to cull geometry. By Panda convention, vertices are ordered counterclockwise when seen from the front, so the M_cull_clockwise will cull backfacing polygons.
M_cull_unchanged is an identity attrib; if this is applied to vertices without any other intervening attrib, it is the same as applying the default attrib.
static ConstPointerTo<RenderAttrib> make_default(void)
RenderAttribthat corresponds to whatever the standard default properties for render attributes of this type ought to be.
- enum Mode