15 #ifndef RENDEREFFECTS_H
16 #define RENDEREFFECTS_H
18 #include "pandabase.h"
20 #include "transformState.h"
21 #include "renderState.h"
23 #include "renderEffect.h"
24 #include "typedWritableReferenceCount.h"
25 #include "pointerTo.h"
26 #include "ordered_vector.h"
27 #include "lightReMutex.h"
28 #include "lightMutex.h"
57 bool safe_to_transform()
const;
58 virtual CPT(TransformState) prepare_flatten_transform(
const TransformState *net_transform)
const;
59 bool safe_to_combine()
const;
65 INLINE
bool is_empty()
const;
66 INLINE
int get_num_effects()
const;
88 virtual bool unref()
const;
90 void output(ostream &out)
const;
91 void write(ostream &out,
int indent_level)
const;
93 static int get_num_states();
94 static void list_states(ostream &out);
95 static bool validate_states();
98 INLINE
bool has_decal()
const;
99 INLINE
bool has_show_bounds()
const;
100 INLINE
bool has_show_tight_bounds()
const;
102 INLINE
bool has_cull_callback()
const;
104 CPT(TransformState) &node_transform,
107 INLINE
bool has_adjust_transform()
const;
108 void adjust_transform(CPT(TransformState) &net_transform,
109 CPT(TransformState) &node_transform,
112 static void init_states();
118 void determine_decal();
119 void determine_show_bounds();
120 void determine_cull_callback();
121 void determine_adjust_transform();
135 States::iterator _saved_entry;
145 INLINE Effect(
const Effect ©);
146 INLINE
void operator = (
const Effect ©);
147 INLINE
bool operator < (
const Effect &other)
const;
148 INLINE
int compare_to(
const Effect &other)
const;
157 F_checked_decal = 0x0001,
158 F_has_decal = 0x0002,
159 F_checked_show_bounds = 0x0004,
160 F_has_show_bounds = 0x0008,
161 F_has_show_tight_bounds = 0x0010,
162 F_checked_cull_callback = 0x0020,
163 F_has_cull_callback = 0x0040,
164 F_checked_adjust_transform = 0x0080,
165 F_has_adjust_transform = 0x0100,
174 static void register_with_read_factory();
189 static void init_type() {
190 TypedWritableReferenceCount::init_type();
191 register_type(_type_handle,
"RenderEffects",
192 TypedWritableReferenceCount::get_class_type());
195 return get_class_type();
197 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
203 INLINE ostream &operator << (ostream &out,
const RenderEffects &state) {
208 #include "renderEffects.I"
A basic node of the scene graph or data graph.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
A lightweight reentrant mutex.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is the base class for a number of special render effects that may be set on scene graph nodes to...
This is our own Panda specialization on the default STL list.
virtual bool require_fully_complete() const
Some objects require all of their nested pointers to have been completed before the objects themselve...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin()...
virtual bool unref() const
Explicitly decrements the reference count.
This is a 4-by-4 transform matrix.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
This is our own Panda specialization on the default STL set.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
This is a standard, non-reentrant mutex, similar to the Mutex class.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This represents a unique collection of RenderEffect objects that correspond to a particular renderabl...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...