Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions

# CullFaceAttrib Class Reference

Indicates which faces should be culled based on their vertex ordering. More...

Inheritance diagram for CullFaceAttrib:

List of all members.

## Public Types
enum | Mode { MCullNone = 0, MCullClockwise = 1, MCullCounterClockwise = 2, MCullUnchanged = 3 }
## Public Member Functions
Mode | getActualMode ()
| Returns the actual culling mode, without considering the effects of the reverse flag.
Mode | getEffectiveMode ()
| Returns the effective culling mode.
bool | getReverse ()
| Returns the 'reverse' flag.
## Static Public Member Functions
static int | getClassSlot ()
static TypeHandle | getClassType ()
static RenderAttrib const | make ()
| Constructs a new CullFaceAttrib object that specifies how to cull geometry.
static RenderAttrib const | make (Mode mode)
| Constructs a new CullFaceAttrib object that specifies how to cull geometry.
static RenderAttrib const | makeDefault ()
| Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
static RenderAttrib const | makeReverse ()
| Constructs a new CullFaceAttrib object that reverses the effects of any other CullFaceAttrib objects in the scene graph.

## Detailed Description

Indicates which faces should be culled based on their vertex ordering.

## Member Enumeration Documentation

enum Mode

Enumerator:

  MCullNone |
  MCullClockwise |
  MCullCounterClockwise |
  MCullUnchanged |

## Member Function Documentation

Mode getActualMode | ( |  | ) |

Returns the actual culling mode, without considering the effects of the reverse flag.

See also get_effective_mode().

static int getClassSlot | ( |  | ) | `[static]`

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from RenderAttrib.

Mode getEffectiveMode | ( |  | ) |

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 getReverse | ( |  | ) |

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 CullFaceAttrib that reverses whatever the sense of culling would have been.

static RenderAttrib const make | ( |  | ) | `[static]`

Constructs a new CullFaceAttrib object 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 RenderAttrib const make | ( | Mode | mode | ) | `[static]`

Constructs a new CullFaceAttrib object 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 RenderAttrib const makeDefault | ( |  | ) | `[static]`

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static RenderAttrib const makeReverse | ( |  | ) | `[static]`

Constructs a new CullFaceAttrib object that reverses the effects of any other CullFaceAttrib objects in the scene graph.

M_cull_clockwise will be treated as M_cull_counter_clockwise, and vice-versa. M_cull_none is unchanged.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties