33 explicit PortalNode(
const std::string &name, LPoint3 pos, PN_stdfloat scale=10.0);
42 virtual void xform(
const LMatrix4 &mat);
45 virtual void enable_clipping_planes();
50 virtual void output(std::ostream &out)
const;
54 INLINE
void set_from_portal_mask(
PortalMask mask);
55 INLINE
void set_into_portal_mask(
PortalMask mask);
56 INLINE
PortalMask get_from_portal_mask()
const;
57 INLINE
PortalMask get_into_portal_mask()
const;
59 INLINE
void set_portal_geom(
bool flag);
60 INLINE
bool get_portal_geom()
const;
62 INLINE
void clear_vertices();
63 INLINE
void add_vertex(
const LPoint3 &vertex);
65 INLINE
int get_num_vertices()
const;
66 INLINE
const LPoint3 &get_vertex(
int n)
const;
67 MAKE_SEQ(get_vertices, get_num_vertices, get_vertex);
69 INLINE
void set_cell_in(
const NodePath &cell);
72 INLINE
void set_cell_out(
const NodePath &cell);
73 INLINE
NodePath get_cell_out()
const;
75 INLINE
void set_clip_plane(
bool value);
76 INLINE
bool is_clip_plane();
78 INLINE
void set_visible(
bool value);
79 INLINE
bool is_visible();
81 INLINE
void set_max_depth(
int value);
82 INLINE
int get_max_depth();
84 INLINE
void set_open(
bool value);
85 INLINE
bool is_open();
89 MAKE_PROPERTY(into_portal_mask, get_into_portal_mask, set_into_portal_mask);
90 MAKE_PROPERTY(from_portal_mask, get_from_portal_mask, set_from_portal_mask);
91 MAKE_PROPERTY(portal_geom, get_portal_geom, set_portal_geom);
92 MAKE_SEQ_PROPERTY(vertices, get_num_vertices, get_vertex);
93 MAKE_PROPERTY(cell_in, get_cell_in, set_cell_in);
94 MAKE_PROPERTY(cell_out, get_cell_out, set_cell_out);
95 MAKE_PROPERTY(clip_plane, is_clip_plane, set_clip_plane);
96 MAKE_PROPERTY(visible, is_visible, set_visible);
97 MAKE_PROPERTY(max_depth, get_max_depth, set_max_depth);
98 MAKE_PROPERTY(open, is_open, set_open);
101 virtual void compute_internal_bounds(CPT(
BoundingVolume) &internal_bounds,
102 int &internal_vertices,
104 Thread *current_thread)
const;
115 F_portal_geom = 0x0001,
151 static void init_type() {
152 PandaNode::init_type();
154 PandaNode::get_class_type());
157 return get_class_type();
159 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
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...
virtual PandaNode * combine_with(PandaNode *other)
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
A node in the scene graph that can hold a Portal Polygon, which is a rectangle.
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().
An instance of this class is passed to the Factory when requesting it to do its business and construc...
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...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
A node that contains a plane.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.