36 explicit GeomNode(
const std::string &name);
46 virtual void xform(
const LMatrix4 &mat);
49 calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point,
52 Thread *current_thread)
const;
66 INLINE
void set_preserved(
bool value);
67 INLINE
bool get_preserved()
const;
69 INLINE
int get_num_geoms()
const;
70 INLINE CPT(
Geom) get_geom(
int n)
const;
71 MAKE_SEQ(get_geoms, get_num_geoms, get_geom);
72 INLINE PT(
Geom) modify_geom(
int n);
73 MAKE_SEQ(modify_geoms, get_num_geoms, modify_geom);
74 INLINE
const RenderState *get_geom_state(
int n)
const;
75 MAKE_SEQ(get_geom_states, get_num_geoms, get_geom_state);
76 INLINE
void set_geom_state(
int n,
const RenderState *state);
78 void add_geom(
Geom *geom,
const RenderState *state = RenderState::make_empty());
79 void add_geoms_from(
const GeomNode *other);
80 void set_geom(
int n,
Geom *geom);
81 INLINE
void remove_geom(
int n);
82 INLINE
void remove_all_geoms();
83 bool check_valid()
const;
86 void unify(
int max_indices,
bool preserve_order);
88 void write_geoms(std::ostream &out,
int indent_level)
const;
89 void write_verbose(std::ostream &out,
int indent_level)
const;
91 INLINE
static CollideMask get_default_collide_mask();
92 MAKE_PROPERTY(default_collide_mask, get_default_collide_mask);
95 virtual void output(std::ostream &out)
const;
104 virtual void r_mark_geom_bounds_stale(
Thread *current_thread);
105 virtual void compute_internal_bounds(CPT(
BoundingVolume) &internal_bounds,
106 int &internal_vertices,
108 Thread *current_thread)
const;
131 class EXPCL_PANDA_PGRAPH CData :
public CycleData {
134 CData(
const CData ©);
140 return GeomNode::get_class_type();
143 INLINE CPT(GeomList) get_geoms()
const;
144 INLINE PT(GeomList) modify_geoms();
145 INLINE
void set_geoms(GeomList *geoms);
148 COWPT(GeomList) _geoms;
165 INLINE
Geoms(
const CData *cdata);
169 INLINE
void operator = (
const Geoms ©);
170 INLINE
void operator = (
Geoms &&from)
noexcept;
172 INLINE
int get_num_geoms()
const;
173 INLINE CPT(
Geom) get_geom(
int n)
const;
174 INLINE
const RenderState *get_geom_state(
int n)
const;
204 static void init_type() {
205 GeomList::init_type();
206 PandaNode::init_type();
208 PandaNode::get_class_type());
211 return get_class_type();
213 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
This is similar to RefCountObj, but it implements a CopyOnWriteObject inheritance instead of a Refere...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
This class is similar to CycleDataLockedReader, except it allows reading from a particular stage of t...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This class is similar to CycleDataReader, except it allows reading from a particular stage of the pip...
This class is similar to CycleDataWriter, except it allows writing to a particular stage of the pipel...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
A single page of data maintained by a PipelineCycler.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A node that holds Geom objects, renderable pieces of geometry.
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data)
Adds the node's contents to the CullResult we are building up during the cull traversal,...
A container for geometry primitives.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
Encodes a string name in a hash table, mapping it to a pointer.
A basic node of the scene graph or data graph.
virtual bool is_geom_node() const
A simple downcast check.
virtual PandaNode * combine_with(PandaNode *other)
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined...
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
get_legal_collide_mask
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.
virtual void r_prepare_scene(GraphicsStateGuardianBase *gsg, const RenderState *node_state, GeomTransformer &transformer, Thread *current_thread)
The recursive implementation of prepare_scene().
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
virtual void apply_attribs_to_vertices(const AccumulatedAttribs &attribs, int attrib_types, GeomTransformer &transformer)
Applies whatever attributes are specified in the AccumulatedAttribs object (and by the attrib_types b...
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
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 bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
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().
This is our own Panda specialization on the default STL list.
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This class maintains different copies of a page of data between stages of the graphics pipeline (or a...