Panda3D

- Main Page
- Packages
- Classes

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

Public Types | Public Member Functions | Static Public Member Functions

# EggRenderMode Class Reference

This class stores miscellaneous rendering properties that is associated with geometry, and which may be set on the geometry primitive level, on the group above it, or indirectly via a texture. More...

Inheritance diagram for EggRenderMode:

List of all members.

## Public Types
enum | AlphaMode { AMUnspecified = 0, AMOff = 1, AMOn = 2, AMBlend = 3, AMBlendNoOcclude = 4, AMMs = 5, AMMsMask = 6, AMBinary = 7, AMDual = 8 }
enum | DepthTestMode { DTMUnspecified = 0, DTMOff = 1, DTMOn = 2 }
enum | DepthWriteMode { DWMUnspecified = 0, DWMOff = 1, DWMOn = 2 }
enum | VisibilityMode { VMUnspecified = 0, VMHidden = 1, VMNormal = 2 }
## Public Member Functions
| EggRenderMode ()
| EggRenderMode (EggRenderMode const copy)
| clearBin ()
| Removes the bin name that was set for this particular object.
| clearDepthOffset ()
| Removes the depth-offset flag from this particular object.
| clearDrawOrder ()
| Removes the draw-order flag from this particular object.
AlphaMode | getAlphaMode ()
| Returns the alpha mode that was set, or AM_unspecified if nothing was set.
string | getBin ()
| Returns the bin name that has been set for this particular object, if any.
int | getDepthOffset ()
| Returns the "depth-offset" flag as set for this particular object.
DepthTestMode | getDepthTestMode ()
| Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.
DepthWriteMode | getDepthWriteMode ()
| Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.
int | getDrawOrder ()
| Returns the "draw-order" flag as set for this particular object.
VisibilityMode | getVisibilityMode ()
| Returns the visibility mode that was set, or VM_unspecified if nothing was set.
bool | hasBin ()
| Returns true if a bin name has been set for this particular object.
bool | hasDepthOffset ()
| Returns true if the depth-offset flag has been set for this particular object.
bool | hasDrawOrder ()
| Returns true if the draw-order flag has been set for this particular object.
bool | operator!= (EggRenderMode const other)
bool | operator< (EggRenderMode const other)
EggRenderMode | operator= (EggRenderMode const copy)
bool | operator== (EggRenderMode const other)
| setAlphaMode (AlphaMode mode)
| Specifies precisely how the transparency for this geometry should be achieved, or if it should be used.
| setBin (string bin)
| Sets the "bin" string for this particular object.
| setDepthOffset (int bias)
| Sets the "depth-offset" flag associated with this object.
| setDepthTestMode (DepthTestMode mode)
| Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer).
| setDepthWriteMode (DepthWriteMode mode)
| Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
| setDrawOrder (int order)
| Sets the "draw-order" flag associated with this object.
| setVisibilityMode (VisibilityMode mode)
| Specifies whether this geometry is to be considered normally visible, or hidden.
| write (ostream out, int indent_level)
| Writes the attributes to the indicated output stream in Egg format.
## Static Public Member Functions
static TypeHandle | getClassType ()
static AlphaMode | stringAlphaMode (string string)
| Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.
static DepthTestMode | stringDepthTestMode (string string)
| Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.
static DepthWriteMode | stringDepthWriteMode (string string)
| Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.
static VisibilityMode | stringVisibilityMode (string string)
| Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.

## Detailed Description

This class stores miscellaneous rendering properties that is associated with geometry, and which may be set on the geometry primitive level, on the group above it, or indirectly via a texture.

It's intended to be a base class for egg objects that can have these properties set.

This class cannot inherit from EggObject, because it causes problems at the EggPolygon level with multiple appearances of the EggObject base class. And making EggObject a virtual base class is just no fun.

## Member Enumeration Documentation

enum AlphaMode

Enumerator:

  AMUnspecified |
  AMOff |
  AMOn |
  AMBlend |
  AMBlendNoOcclude |
  AMMs |
  AMMsMask |
  AMBinary |
  AMDual |

enum DepthTestMode

Enumerator:

  DTMUnspecified |
  DTMOff |
  DTMOn |

enum DepthWriteMode

Enumerator:

  DWMUnspecified |
  DWMOff |
  DWMOn |

enum VisibilityMode

Enumerator:

  VMUnspecified |
  VMHidden |
  VMNormal |

## Constructor & Destructor Documentation

EggRenderMode | ( |  | ) |

EggRenderMode | ( | EggRenderMode const | copy | ) |

## Member Function Documentation

clearBin | ( |  | ) |

Removes the bin name that was set for this particular object.

See set_bin().

clearDepthOffset | ( |  | ) |

Removes the depth-offset flag from this particular object.

See set_depth_offset().

clearDrawOrder | ( |  | ) |

Removes the draw-order flag from this particular object.

See set_draw_order().

AlphaMode getAlphaMode | ( |  | ) |

Returns the alpha mode that was set, or AM_unspecified if nothing was set.

See set_alpha_mode().

string getBin | ( |  | ) |

Returns the bin name that has been set for this particular object, if any.

See set_bin().

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

Reimplemented in EggGroup, EggBin, EggTexture, EggPrimitive, EggCompositePrimitive, EggCurve, EggLine, EggPolygon, EggNurbsCurve, EggSurface, EggNurbsSurface, EggPoint, EggTriangleFan, and EggTriangleStrip.

int getDepthOffset | ( |  | ) |

Returns the "depth-offset" flag as set for this particular object.

See set_depth_offset().

DepthTestMode getDepthTestMode | ( |  | ) |

Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.

See set_depth_test_mode().

DepthWriteMode getDepthWriteMode | ( |  | ) |

Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.

See set_depth_write_mode().

int getDrawOrder | ( |  | ) |

Returns the "draw-order" flag as set for this particular object.

See set_draw_order().

VisibilityMode getVisibilityMode | ( |  | ) |

Returns the visibility mode that was set, or VM_unspecified if nothing was set.

See set_visibility_mode().

bool hasBin | ( |  | ) |

Returns true if a bin name has been set for this particular object.

See set_bin().

bool hasDepthOffset | ( |  | ) |

Returns true if the depth-offset flag has been set for this particular object.

See set_depth_offset().

bool hasDrawOrder | ( |  | ) |

Returns true if the draw-order flag has been set for this particular object.

See set_draw_order().

bool operator!= | ( | EggRenderMode const | other | ) |

bool operator< | ( | EggRenderMode const | other | ) |

EggRenderMode operator= | ( | EggRenderMode const | copy | ) |

bool operator== | ( | EggRenderMode const | other | ) |

setAlphaMode | ( | AlphaMode | mode | ) |

Specifies precisely how the transparency for this geometry should be achieved, or if it should be used.

The default, AM_unspecified, is to use transparency if the geometry has a color whose alpha value is non-1, or if it has a four-channel texture applied; otherwise, AM_on forces transparency on, and AM_off forces it off. The other flavors of transparency are specific ways to turn on transparency, which may or may not be supported by a particular rendering backend.

setBin | ( | string | bin | ) |

Sets the "bin" string for this particular object.

This names a particular bin in which the object should be rendered. The exact meaning of a bin is implementation defined, but generally a GeomBin matching each bin name must also be specifically added to the rendering engine (e.g. the CullTraverser) in use for this to work. See also set_draw_order().

setDepthOffset | ( | int | bias | ) |

Sets the "depth-offset" flag associated with this object.

This adds or subtracts an offset bias into the depth buffer. See also DepthOffsetAttrib and NodePath.set_depth_offset().

setDepthTestMode | ( | DepthTestMode | mode | ) |

Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer).

Note that this is different, and independent from, the depth_write mode.

setDepthWriteMode | ( | DepthWriteMode | mode | ) |

Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.

setDrawOrder | ( | int | order | ) |

Sets the "draw-order" flag associated with this object.

This specifies a particular order in which objects of this type should be drawn, within the specified bin. If a bin is not explicitly specified, "fixed" is used. See also set_bin().

setVisibilityMode | ( | VisibilityMode | mode | ) |

Specifies whether this geometry is to be considered normally visible, or hidden.

If it is hidden, it is either not loaded into the scene graph at all, or loaded as a "stashed" node, according to the setting of egg-suppress-hidden.

static AlphaMode stringAlphaMode | ( | string | string | ) | `[static]`

Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.

static DepthTestMode stringDepthTestMode | ( | string | string | ) | `[static]`

Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.

static DepthWriteMode stringDepthWriteMode | ( | string | string | ) | `[static]`

Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.

static VisibilityMode stringVisibilityMode | ( | string | string | ) | `[static]`

Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.

write | ( | ostream | out,
|  | int | indent_level
| ) |  |

Writes the attributes to the indicated output stream in Egg format.

Reimplemented in EggGroup, EggTexture, and EggPrimitive.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties