A node in the scene graph that can hold a Portal Polygon, which is a rectangle.
More...
Public Member Functions |
| | PortalNode (const string &name) |
| | Default constructor, just an empty node, no geo This is used to read portal from model.
|
| | PortalNode (const string &name, LPoint3f pos, float scale=10.0) |
| | Create a default rectangle as portal.
|
| void | add_vertex (const LPoint3f &vertex) |
| | Adds a new vertex to the portal polygon.
|
| void | clear_vertices () |
| | Resets the vertices of the portal to the empty list.
|
| virtual PandaNode * | combine_with (PandaNode *other) |
| | Collapses this node with the other node, if possible, and returns a pointer to the combined node, or NULL if the two nodes cannot safely be combined.
|
| virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
| | Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
|
| virtual bool | cull_callback (CullTraverser *trav, CullTraverserData &data) |
| | This function will be called during the cull traversal to perform reduced frustum culling.
|
| virtual void | enable_clipping_planes () |
| | initialize the clipping planes and renderstate
|
|
virtual TypeHandle | force_init_type () |
| NodePath | get_cell_in () const |
| | Sets the cell that this portal belongs to.
|
| NodePath | get_cell_out () const |
| | Sets the cell that this portal leads out to.
|
| PortalMask | get_from_portal_mask () const |
| | Returns the current "from" PortalMask.
|
| PortalMask | get_into_portal_mask () const |
| | Returns the current "into" PortalMask.
|
| int | get_max_depth () |
| | Returns the maximum depth this portal will be visible at.
|
| int | get_num_vertices () const |
| | Returns the number of vertices in the portal polygon.
|
| bool | get_portal_geom () const |
| | Returns the current state of the portal_geom flag.
|
|
virtual TypeHandle | get_type () const |
| const LPoint3f & | get_vertex (int n) const |
| | Returns the nth vertex of the portal polygon.
|
| bool | is_clip_plane () |
| | Is this portal clipping against its left-right planes.
|
| bool | is_open () |
| | Is this portal open from current camera zone.
|
| virtual bool | is_renderable () const |
| | Returns true if there is some value to visiting this particular node during the cull traversal for any camera, false otherwise.
|
| bool | is_visible () |
| | Is this portal facing the camera.
|
| virtual PandaNode * | make_copy () const |
| | Returns a newly-allocated Node that is a shallow copy of this one.
|
|
| MAKE_SEQ (get_vertices, get_num_vertices, get_vertex) |
| virtual void | output (ostream &out) const |
| | Writes a brief description of the node to the indicated output stream.
|
| virtual bool | preserve_name () const |
| | Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operation, false otherwise.
|
| void | set_cell_in (const NodePath &cell) |
| | Sets the cell that this portal belongs to.
|
| void | set_cell_out (const NodePath &cell) |
| | Sets the cell that this portal leads out to.
|
| void | set_clip_plane (bool value) |
| | this is set if the portal will clip against its left and right planes
|
| void | set_from_portal_mask (PortalMask mask) |
| | Sets the "from" PortalMask.
|
| void | set_into_portal_mask (PortalMask mask) |
| | Sets the "into" PortalMask.
|
| void | set_max_depth (int value) |
| | Set the maximum depth this portal will be visible at.
|
| void | set_open (bool value) |
| | Python sets this based on curent camera zone.
|
| void | set_portal_geom (bool flag) |
| | Sets the state of the "portal geom" flag for this PortalNode.
|
| void | set_portal_mask (PortalMask mask) |
| | Simultaneously sets both the "from" and "into" PortalMask values to the same thing.
|
| void | set_visible (bool value) |
| | this is set if the portal is facing camera
|
| 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 void | xform (const LMatrix4f &mat) |
| | Transforms the contents of this node by the indicated matrix, if it means anything to do so.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type PortalNode.
|
Protected Member Functions |
|
| PortalNode (const PortalNode ©) |
| virtual void | compute_internal_bounds (CPT(BoundingVolume)&internal_bounds, int &internal_vertices, int pipeline_stage, Thread *current_thread) const |
| | Called when needed to recompute the node's _internal_bound object.
|
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PortalNode.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type PortalNode is encountered in the Bam file.
|
A node in the scene graph that can hold a Portal Polygon, which is a rectangle.
Other types of polygons are not supported for now. It also holds a PT(PandaNode) Cell that this portal is connected to
Definition at line 34 of file portalNode.h.