Panda3D

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
EggRenderState Class Reference

This class is used within this package only to record the render state that should be assigned to each primitive. More...

`#include "eggRenderState.h"`

Inheritance diagram for EggRenderState:

## Public Types
typedef EggLoader::BakeInUVs | BakeInUVs
typedef EggLoader::Materials | Materials
typedef EggLoader::TextureDef | TextureDef

## Public Member Functions
| EggRenderState (EggLoader &loader)
void | add_attrib (const RenderAttrib *attrib)
| A convenience function to add the indicated render attribute to the aggregate state.
int | compare_to (const EggRenderState &other) const
| Provides a unique ordering for different EggRenderState objects, so that primitives of similar state can be grouped together by the EggBinner.
| CPT (RenderState) _state
void | fill_state (EggPrimitive *egg_prim)
| Sets up the state as appropriate for the indicated primitive.
Public Member Functions inherited from EggUserData
| EggUserData (const EggUserData &copy)
virtual TypeHandle | force_init_type ()
virtual TypeHandle | get_type () const
EggUserData & | operator= (const EggUserData &copy)
Public Member Functions inherited from TypedReferenceCount
| TypedReferenceCount (const TypedReferenceCount &copy)
void | operator= (const TypedReferenceCount &copy)
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
TypedObject * | as_typed_object ()
| Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObject * | as_typed_object () const
| Returns the object, upcast (if necessary) to a TypedObject pointer.
int | get_best_parent_from_Set (const std::set< int > &) const
int | get_type_index () const
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool | is_exact_type (TypeHandle handle) const
| Returns true if the current object is the indicated type exactly.
bool | is_of_type (TypeHandle handle) const
| Returns true if the current object is or derives from the indicated type.
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)
Public Member Functions inherited from ReferenceCount
int | get_ref_count () const
WeakReferenceList * | get_weak_list () const
| Returns the WeakReferenceList associated with this ReferenceCount object.
bool | has_weak_list () const
| Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
void | local_object ()
| This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
void | ref () const
| Explicitly increments the reference count.
bool | ref_if_nonzero () const
| Atomically increases the reference count of this object if it is not zero.
bool | test_ref_count_integrity () const
| Does some easy checks to make sure that the reference count isn't completely bogus.
bool | test_ref_count_nonzero () const
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
virtual bool | unref () const
| Explicitly decrements the reference count.
bool | unref_if_one () const
| Atomically decreases the reference count of this object if it is one.
WeakReferenceList * | weak_ref ()
| Adds the indicated PointerToVoid as a weak reference to this object.
void | weak_unref ()
| Removes the indicated PointerToVoid as a weak reference to this object.

## Public Attributes
BakeInUVs | _bake_in_uvs
bool | _flat_shaded
bool | _hidden
Geom::PrimitiveType | _primitive_type
Public Attributes inherited from TypedObject
| get_type
Public Attributes inherited from ReferenceCount
| get_ref_count
| Returns the current reference count.

## Additional Inherited Members
Static Public Member Functions inherited from EggUserData
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
static TypeHandle | get_class_type ()
static void | init_type ()
| This function is declared non-inline to work around a compiler bug in g++ 2.96.
Static Public Member Functions inherited from ReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()

## Detailed Description

This class is used within this package only to record the render state that should be assigned to each primitive.

It is assigned to EggPrimitive objects via the EggBinner.

Definition at line 39 of file eggRenderState.h.

## Member Typedef Documentation

## ◆ BakeInUVs

typedef EggLoader::BakeInUVs EggRenderState::BakeInUVs

Definition at line 63 of file eggRenderState.h.

## ◆ Materials

typedef EggLoader::Materials EggRenderState::Materials

Definition at line 65 of file eggRenderState.h.

## ◆ TextureDef

typedef EggLoader::TextureDef EggRenderState::TextureDef

Definition at line 64 of file eggRenderState.h.

## Constructor & Destructor Documentation

## ◆ EggRenderState()

EggRenderState::EggRenderState | ( | EggLoader & | loader | ) |
| inline

Definition at line 17 of file eggRenderState.I.

## Member Function Documentation

## ◆ add_attrib()

void EggRenderState::add_attrib | ( | const RenderAttrib * | attrib | ) |
| inline

A convenience function to add the indicated render attribute to the aggregate state.

Definition at line 31 of file eggRenderState.I.

Referenced by fill_state().

## ◆ compare_to()

int EggRenderState::compare_to | ( | const EggRenderState & | other | ) | const

Provides a unique ordering for different EggRenderState objects, so that primitives of similar state can be grouped together by the EggBinner.

Definition at line 429 of file eggRenderState.cxx.

Referenced by EggBinner::sorts_less().

## ◆ fill_state()

void EggRenderState::fill_state | ( | EggPrimitive * | egg_prim | ) |

Sets up the state as appropriate for the indicated primitive.

Definition at line 44 of file eggRenderState.cxx.

References add_attrib(), EggPrimitive::determine_alpha_mode(), EggPrimitive::determine_bin(), EggPrimitive::determine_depth_offset(), EggPrimitive::determine_depth_test_mode(), EggPrimitive::determine_depth_write_mode(), EggPrimitive::determine_draw_order(), EggPrimitive::determine_visibility_mode(), EggRenderMode::get_alpha_mode(), EggPrimitive::get_bface_flag, EggRenderMode::get_bin(), EggAttributes::get_color(), EggPrimitive::get_connected_shading, EggRenderMode::get_depth_offset(), EggRenderMode::get_depth_test_mode(), EggRenderMode::get_depth_write_mode(), EggRenderMode::get_draw_order(), Texture::get_format, EggPrimitive::get_material, Texture::get_num_components, EggPrimitive::get_num_textures, EggPoint::get_perspective(), EggPrimitive::get_texture, TextureAttrib::get_texture(), EggLine::get_thick(), EggPoint::get_thick(), EggRenderMode::get_visibility_mode(), Texture::has_alpha(), Texture::has_binary_alpha(), EggPrimitive::has_material, TypedObject::is_of_type(), CullBinAttrib::make(), CullFaceAttrib::make(), DepthOffsetAttrib::make(), DepthTestAttrib::make(), DepthWriteAttrib::make(), RenderModeAttrib::make(), ShadeModelAttrib::make(), TexGenAttrib::make(), and TransparencyAttrib::make().

## Member Data Documentation

## ◆ _bake_in_uvs

BakeInUVs EggRenderState::_bake_in_uvs

Definition at line 67 of file eggRenderState.h.

## ◆ _flat_shaded

bool EggRenderState::_flat_shaded

Definition at line 60 of file eggRenderState.h.

## ◆ _hidden

bool EggRenderState::_hidden

Definition at line 59 of file eggRenderState.h.

## ◆ _primitive_type

Geom::PrimitiveType EggRenderState::_primitive_type

Definition at line 61 of file eggRenderState.h.

The documentation for this class was generated from the following files:

- panda/src/egg2pg/eggRenderState.h
- panda/src/egg2pg/eggRenderState.cxx
- panda/src/egg2pg/eggRenderState.I