14 #ifndef OCCLUDERNODE_H 15 #define OCCLUDERNODE_H 42 virtual void xform(
const LMatrix4 &mat);
47 virtual void output(std::ostream &out)
const;
50 INLINE
void set_double_sided(
bool value);
51 INLINE
bool is_double_sided();
52 INLINE
void set_min_coverage(PN_stdfloat value);
53 INLINE PN_stdfloat get_min_coverage();
54 INLINE
void set_vertices(
const LPoint3 &v0,
const LPoint3 &v1,
55 const LPoint3 &v2,
const LPoint3 &v3);
56 INLINE
size_t get_num_vertices()
const;
57 INLINE
const LPoint3 &get_vertex(
size_t n)
const;
58 INLINE
void set_vertex(
size_t n,
const LPoint3 &v);
59 MAKE_SEQ(get_vertices, get_num_vertices, get_vertex);
61 MAKE_PROPERTY(double_sided, is_double_sided, set_double_sided);
62 MAKE_PROPERTY(min_coverage, get_min_coverage, set_min_coverage);
63 MAKE_SEQ_PROPERTY(vertices, get_num_vertices, get_vertex, set_vertex);
66 virtual void compute_internal_bounds(CPT(
BoundingVolume) &internal_bounds,
67 int &internal_vertices,
69 Thread *current_thread)
const;
76 PN_stdfloat _min_coverage;
80 PT(
Geom) _occluder_viz, _frame_viz;
96 static void init_type() {
97 PandaNode::init_type();
99 PandaNode::get_class_type());
102 return get_class_type();
104 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool preserve_name() const
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operatio...
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Base class for objects that can be written to and read from Bam files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
A node in the scene graph that can hold an occluder polygon, which must be a rectangle.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
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().
A container for geometry primitives.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...