Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RenderState Class Reference

#include <renderState.h>

Inheritance diagram for RenderState:

TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject List of all members.

Public Member Functions

virtual ~RenderState ()
bool operator< (const RenderState &other) const
INLINE int get_num_attribs () const
INLINE const RenderAttribget_attrib (int n) const
INLINE int get_override (int n) const
int find_attrib (TypeHandle type) const
 CPT (RenderState) compose(const RenderState *other) const
 CPT (RenderState) invert_compose(const RenderState *other) const
 CPT (RenderState) add_attrib(const RenderAttrib *attrib
 CPT (RenderState) remove_attrib(TypeHandle type) const
 CPT (RenderState) adjust_all_priorities(int adjustment) const
const RenderAttribget_attrib (TypeHandle type) const
void output (ostream &out) const
void write (ostream &out, int indent_level) const
INLINE int get_bin_index () const
INLINE int get_draw_order () const
INLINE const FogAttribget_fog () const
INLINE const CullBinAttribget_bin () const
INLINE const TransparencyAttribget_transparency () const
 CPT (RenderState) issue_delta_modify(const RenderState *other
 CPT (RenderState) issue_delta_set(const RenderState *other
virtual void write_datagram (BamWriter *manager, Datagram &dg)
virtual int complete_pointers (TypedWritable **plist, BamReader *manager)
virtual void finalize ()
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

 CPT (RenderState) make_empty()
 CPT (RenderState) make(const RenderAttrib *attrib
 CPT (RenderState) make(const RenderAttrib *attrib1
 CPT (RenderState) make(const RenderAttrib *attrib1
 CPT (RenderState) make(const RenderAttrib *attrib1
 CPT (RenderState) make(const RenderAttrib *const *attrib
int get_max_priority ()
int get_num_states ()
int get_num_unused_states ()
int clear_cache ()
void bin_removed (int bin_index)
void register_with_read_factory ()
TypedWritablechange_this (TypedWritable *old_ptr, BamReader *manager)
TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad0__: INLINE bool is_empty() const
int override = 0)
const RenderAttribattrib2
const RenderAttrib int override = 0)
const RenderAttribattrib2
const RenderAttrib const RenderAttribattrib3
const RenderAttrib const RenderAttrib
int 
override = 0)
const RenderAttribattrib2
const RenderAttrib const RenderAttribattrib3
const RenderAttrib const RenderAttrib
const RenderAttrib
attrib4
const RenderAttrib const RenderAttrib
const RenderAttrib int 
override = 0)
int num_attribs
int int override = 0)
GraphicsStateGuardianBase *gsg const
GraphicsStateGuardianBase *gsg const

Protected Member Functions

 RenderState ()
void fillin (DatagramIterator &scan, BamReader *manager)

Static Protected Member Functions

TypedWritablemake_from_bam (const FactoryParams &params)

Private Types

typedef pset< const RenderState *,
IndirectLess< RenderState > > 
States
typedef pmap< const RenderState *,
Composition
CompositionCache
typedef ov_set< AttributeAttributes
enum  Flags {
  F_checked_bin_index = 0x0001, F_checked_fog = 0x0002, F_checked_bin = 0x0004, F_checked_transparency = 0x0008,
  F_is_destructing = 0x8000
}

Private Member Functions

 RenderState (const RenderState &copy)
void operator= (const RenderState &copy)
 CPT (RenderState) do_compose(const RenderState *other) const
 CPT (RenderState) do_invert_compose(const RenderState *other) const
void determine_bin_index ()
void determine_fog ()
void determine_bin ()
void determine_transparency ()
INLINE void set_destructing ()
INLINE bool is_destructing () const

Static Private Member Functions

 CPT (RenderState) return_new(RenderState *state)
 CPT (RenderState) _empty_state

Private Attributes

States::iterator _saved_entry
CompositionCache _composition_cache
CompositionCache _invert_composition_cache
const RenderState * _self_compose
Attributes _attributes
int _bin_index
int _draw_order
const FogAttrib_fog
const CullBinAttrib_bin
const TransparencyAttrib_transparency
unsigned short _flags

Static Private Attributes

States_states = NULL
TypeHandle _type_handle

Member Typedef Documentation

typedef ov_set<Attribute> RenderState::Attributes [private]
 

Definition at line 180 of file renderState.h.

typedef pmap<const RenderState *, Composition> RenderState::CompositionCache [private]
 

Definition at line 151 of file renderState.h.

typedef pset<const RenderState *, IndirectLess<RenderState> > RenderState::States [private]
 

Definition at line 129 of file renderState.h.

Referenced by clear_cache(), get_num_states(), get_num_unused_states(), and RenderState().


Member Enumeration Documentation

enum RenderState::Flags [private]
 

Enumeration values:
F_checked_bin_index 
F_checked_fog 
F_checked_bin 
F_checked_transparency 
F_is_destructing 

Definition at line 194 of file renderState.h.


Constructor & Destructor Documentation

RenderState::RenderState  )  [protected]
 

Definition at line 45 of file renderState.cxx.

References _flags, _saved_entry, _self_compose, _states, NULL, and States.

RenderState::RenderState const RenderState &  copy  )  [private]
 

Definition at line 65 of file renderState.cxx.

RenderState::~RenderState  )  [virtual]
 

Definition at line 86 of file renderState.cxx.

References _composition_cache, _invert_composition_cache, _saved_entry, _self_compose, _states, is_destructing(), NULL, set_destructing(), and unref_delete().


Member Function Documentation

void RenderState::bin_removed int  bin_index  )  [static]
 

Definition at line 943 of file renderState.cxx.

Referenced by CullBinManager::remove_bin().

TypedWritable * RenderState::change_this TypedWritable old_ptr,
BamReader manager
[static]
 

Definition at line 1281 of file renderState.cxx.

References CPT(), DCAST, pointer, and BamReader::register_finalize().

Referenced by make_from_bam().

int RenderState::clear_cache  )  [static]
 

Definition at line 751 of file renderState.cxx.

References _composition_cache, _invert_composition_cache, _self_compose, _states, NULL, States, and unref_delete().

int RenderState::complete_pointers TypedWritable **  plist,
BamReader manager
[virtual]
 

Reimplemented from TypedWritable.

Definition at line 1247 of file renderState.cxx.

References _attributes, RenderState::Attribute::_type, TypedWritable::complete_pointers(), DCAST, NULL, and ov_set< Attribute >::sort().

RenderState::CPT RenderState   )  [static, private]
 

RenderState::CPT RenderState   )  const [private]
 

RenderState::CPT RenderState   )  const [private]
 

RenderState::CPT RenderState   )  [static, private]
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const
 

RenderState::CPT RenderState   )  const [static]
 

RenderState::CPT RenderState   )  const [static]
 

RenderState::CPT RenderState   )  const [static]
 

RenderState::CPT RenderState   )  const [static]
 

RenderState::CPT RenderState   )  const [static]
 

RenderState::CPT RenderState   )  [static]
 

Referenced by change_this().

void RenderState::determine_bin  )  [private]
 

Definition at line 1178 of file renderState.cxx.

References _bin, _flags, DCAST, F_checked_bin, get_attrib(), CullBinAttrib::get_class_type(), and NULL.

void RenderState::determine_bin_index  )  [private]
 

Definition at line 1116 of file renderState.cxx.

References _bin_index, _draw_order, _flags, CullBinManager::add_bin(), CullBinManager::BT_unsorted, F_checked_bin_index, CullBinManager::find_bin(), get_bin(), CullBinAttrib::get_bin_name(), CullBinAttrib::get_draw_order(), CullBinManager::get_global_ptr(), TransparencyAttrib::get_mode(), get_transparency(), TransparencyAttrib::M_alpha, TransparencyAttrib::M_alpha_sorted, TransparencyAttrib::M_dual, and NULL.

void RenderState::determine_fog  )  [private]
 

Definition at line 1163 of file renderState.cxx.

References _flags, _fog, DCAST, F_checked_fog, get_attrib(), FogAttrib::get_class_type(), and NULL.

void RenderState::determine_transparency  )  [private]
 

Definition at line 1193 of file renderState.cxx.

References _flags, _transparency, DCAST, F_checked_transparency, get_attrib(), TransparencyAttrib::get_class_type(), and NULL.

void RenderState::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from TypedWritable.

Definition at line 1350 of file renderState.cxx.

References _attributes, TypedWritable::fillin(), DatagramIterator::get_int32(), DatagramIterator::get_uint16(), and BamReader::read_pointer().

Referenced by make_from_bam().

void RenderState::finalize  )  [virtual]
 

Reimplemented from TypedWritable.

Definition at line 1309 of file renderState.cxx.

References ReferenceCount::unref().

int RenderState::find_attrib TypeHandle  type  )  const
 

Definition at line 219 of file renderState.cxx.

References _attributes, and type.

virtual TypeHandle RenderState::force_init_type void   )  [inline, virtual]
 

Reimplemented from TypedWritableReferenceCount.

Definition at line 226 of file renderState.h.

References ReferenceCount::get_class_type(), and TypedWritableReferenceCount::init_type().

const RenderAttrib * RenderState::get_attrib TypeHandle  type  )  const
 

Definition at line 562 of file renderState.cxx.

References _attributes, NULL, and type.

INLINE const RenderAttrib* RenderState::get_attrib int  n  )  const
 

Referenced by SceneGraphAnalyzer::collect_statistics(), determine_bin(), determine_fog(), and determine_transparency().

INLINE const CullBinAttrib* RenderState::get_bin  )  const
 

Referenced by CullResult::add_object(), and determine_bin_index().

INLINE int RenderState::get_bin_index  )  const
 

TypeHandle RenderState::get_class_type void   )  [inline, static]
 

Reimplemented from ReferenceCount.

Definition at line 215 of file renderState.h.

Referenced by register_with_read_factory().

INLINE int RenderState::get_draw_order  )  const
 

INLINE const FogAttrib* RenderState::get_fog  )  const
 

Referenced by CullTraverser::traverse().

int RenderState::get_max_priority  )  [static]
 

Definition at line 620 of file renderState.cxx.

Referenced by CPT().

INLINE int RenderState::get_num_attribs  )  const
 

int RenderState::get_num_states  )  [static]
 

Definition at line 632 of file renderState.cxx.

References _states, NULL, and States.

int RenderState::get_num_unused_states  )  [static]
 

Definition at line 647 of file renderState.cxx.

References _composition_cache, _invert_composition_cache, _self_compose, _states, count, NULL, and States.

INLINE int RenderState::get_override int  n  )  const
 

INLINE const TransparencyAttrib* RenderState::get_transparency  )  const
 

Referenced by CullResult::add_object(), and determine_bin_index().

virtual TypeHandle RenderState::get_type void   )  const [inline, virtual]
 

Reimplemented from TypedWritableReferenceCount.

Definition at line 223 of file renderState.h.

References ReferenceCount::get_class_type().

void RenderState::init_type void   )  [inline, static]
 

Reimplemented from TypedWritableReferenceCount.

Definition at line 218 of file renderState.h.

References ReferenceCount::get_class_type(), TypedWritableReferenceCount::init_type(), and register_type().

Referenced by init_libpgraph().

INLINE bool RenderState::is_destructing  )  const [private]
 

Referenced by ~RenderState().

TypedWritable * RenderState::make_from_bam const FactoryParams params  )  [static, protected]
 

Definition at line 1330 of file renderState.cxx.

References change_this(), fillin(), params, parse_params(), and BamReader::register_change_this().

Referenced by register_with_read_factory().

bool RenderState::operator< const RenderState &  other  )  const
 

Definition at line 202 of file renderState.cxx.

References _attributes.

void RenderState::operator= const RenderState &  copy  )  [private]
 

Definition at line 75 of file renderState.cxx.

void RenderState::output ostream &  out  )  const
 

Definition at line 577 of file renderState.cxx.

References _attributes.

Referenced by operator<<().

void RenderState::register_with_read_factory  )  [static]
 

Definition at line 1210 of file renderState.cxx.

References get_class_type(), BamReader::get_factory(), make_from_bam(), and Factory< TypedWritable >::register_factory().

Referenced by init_libpgraph().

INLINE void RenderState::set_destructing  )  [private]
 

Referenced by ~RenderState().

void RenderState::write ostream &  out,
int  indent_level
const
 

Definition at line 600 of file renderState.cxx.

References _attributes, and indent().

Referenced by SceneGraphReducer::r_apply_attribs().

void RenderState::write_datagram BamWriter manager,
Datagram dg
[virtual]
 

Implements TypedWritableReferenceCount.

Definition at line 1221 of file renderState.cxx.

References _attributes, RenderState::Attribute::_override, Datagram::add_int32(), Datagram::add_uint16(), PN_uint16, TypedWritable::write_datagram(), and BamWriter::write_pointer().


Member Data Documentation

PUBLISHED RenderState::__pad0__
 

Reimplemented from TypedWritableReferenceCount.

Definition at line 62 of file renderState.h.

Attributes RenderState::_attributes [private]
 

Definition at line 181 of file renderState.h.

Referenced by complete_pointers(), fillin(), find_attrib(), get_attrib(), operator<(), output(), write(), and write_datagram().

const CullBinAttrib* RenderState::_bin [private]
 

Definition at line 191 of file renderState.h.

Referenced by determine_bin().

int RenderState::_bin_index [private]
 

Definition at line 185 of file renderState.h.

Referenced by determine_bin_index().

CompositionCache RenderState::_composition_cache [private]
 

Definition at line 152 of file renderState.h.

Referenced by clear_cache(), get_num_unused_states(), and ~RenderState().

int RenderState::_draw_order [private]
 

Definition at line 186 of file renderState.h.

Referenced by determine_bin_index().

unsigned short RenderState::_flags [private]
 

Definition at line 201 of file renderState.h.

Referenced by determine_bin(), determine_bin_index(), determine_fog(), determine_transparency(), and RenderState().

const FogAttrib* RenderState::_fog [private]
 

Definition at line 190 of file renderState.h.

Referenced by determine_fog().

CompositionCache RenderState::_invert_composition_cache [private]
 

Definition at line 153 of file renderState.h.

Referenced by clear_cache(), get_num_unused_states(), and ~RenderState().

States::iterator RenderState::_saved_entry [private]
 

Definition at line 136 of file renderState.h.

Referenced by RenderState(), and ~RenderState().

const RenderState* RenderState::_self_compose [private]
 

Definition at line 161 of file renderState.h.

Referenced by clear_cache(), get_num_unused_states(), RenderState(), and ~RenderState().

RenderState::States * RenderState::_states = NULL [static, private]
 

Definition at line 32 of file renderState.cxx.

Referenced by clear_cache(), get_num_states(), get_num_unused_states(), RenderState(), and ~RenderState().

const TransparencyAttrib* RenderState::_transparency [private]
 

Definition at line 192 of file renderState.h.

Referenced by determine_transparency().

TypeHandle RenderState::_type_handle [static, private]
 

Reimplemented from TypedWritableReferenceCount.

Definition at line 229 of file renderState.h.

const RenderAttrib* RenderState::attrib2
 

Definition at line 77 of file renderState.h.

const RenderAttrib* RenderState::attrib2
 

Definition at line 74 of file renderState.h.

const RenderAttrib* RenderState::attrib2
 

Definition at line 72 of file renderState.h.

const RenderAttrib const RenderAttrib* RenderState::attrib3
 

Definition at line 77 of file renderState.h.

const RenderAttrib const RenderAttrib* RenderState::attrib3
 

Definition at line 74 of file renderState.h.

const RenderAttrib const RenderAttrib const RenderAttrib* RenderState::attrib4
 

Definition at line 77 of file renderState.h.

GraphicsStateGuardianBase* gsg RenderState::const
 

Definition at line 112 of file renderState.h.

GraphicsStateGuardianBase* gsg RenderState::const
 

Definition at line 110 of file renderState.h.

int RenderState::num_attribs
 

Definition at line 81 of file renderState.h.

int int RenderState::override = 0)
 

Definition at line 81 of file renderState.h.

const RenderAttrib const RenderAttrib const RenderAttrib int RenderState::override = 0)
 

Definition at line 79 of file renderState.h.

const RenderAttrib const RenderAttrib int RenderState::override = 0)
 

Definition at line 75 of file renderState.h.

const RenderAttrib int RenderState::override = 0)
 

Definition at line 72 of file renderState.h.

int RenderState::override = 0)
 

Definition at line 86 of file renderState.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:29 2003 for Panda by doxygen1.3