33 explicit PortalNode(
const std::string &name, LPoint3 pos, PN_stdfloat scale=10.0);
42 virtual void xform(
const LMatrix4 &mat);
50 virtual void output(std::ostream &out)
const;
101 virtual void compute_internal_bounds(CPT(
BoundingVolume) &internal_bounds,
102 int &internal_vertices,
104 Thread *current_thread)
const;
111 PortalMask _from_portal_mask;
112 PortalMask _into_portal_mask;
115 F_portal_geom = 0x0001,
120 typedef pvector<LPoint3> Vertices;
151 static void init_type() {
152 PandaNode::init_type();
154 PandaNode::get_class_type());
156 virtual TypeHandle get_type()
const {
157 return get_class_type();
159 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
162 static TypeHandle _type_handle;
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 object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
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...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
virtual bool preserve_name() const
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operatio...
virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data)
This function will be called during the cull traversal to perform any additional operations that shou...
virtual PandaNode * combine_with(PandaNode *other)
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined...
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
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 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.
A node that contains a plane.
get_vertex
Returns the nth vertex of the portal polygon.
get_into_portal_mask
Returns the current "into" PortalMask.
set_from_portal_mask
Sets the "from" PortalMask.
set_open
Python sets this based on curent camera zone.
get_portal_geom
Returns the current state of the portal_geom flag.
is_visible
Is this portal facing the camera.
void add_vertex(const LPoint3 &vertex)
Adds a new vertex to the portal polygon.
set_cell_in
Sets the cell that this portal belongs to.
is_clip_plane
Is this portal clipping against its left-right planes.
get_num_vertices
Returns the number of vertices in the portal polygon.
virtual void enable_clipping_planes()
initialize the clipping planes and renderstate
set_into_portal_mask
Sets the "into" PortalMask.
set_visible
this is set if the portal is facing camera
set_portal_geom
Sets the state of the "portal geom" flag for this PortalNode.
set_cell_out
Sets the cell that this portal leads out to.
get_from_portal_mask
Returns the current "from" PortalMask.
set_max_depth
Set the maximum depth this portal will be visible at.
PortalNode(const std::string &name)
Default constructor, just an empty node, no geo This is used to read portal from model.
get_cell_out
Sets the cell that this portal leads out to.
get_cell_in
Sets the cell that this portal belongs to.
void clear_vertices()
Resets the vertices of the portal to the empty list.
get_max_depth
Returns the maximum depth this portal will be visible at.
is_open
Is this portal open from current camera zone.
virtual void output(std::ostream &out) const
Writes a brief description of the node to the indicated output stream.
set_clip_plane
this is set if the portal will clip against its left and right planes
void set_portal_mask(PortalMask mask)
Simultaneously sets both the "from" and "into" PortalMask values to the same thing.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
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 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.
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(),...