14#ifndef PORTALCLIPPER_H
15#define PORTALCLIPPER_H
49class EXPCL_PANDA_PGRAPH PortalClipper :
public TypedObject {
54 INLINE
bool is_partial_portal_in_view();
64 INLINE
void move_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
65 void move_to(
const LVecBase3 &v);
67 INLINE
void draw_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
68 void draw_to(
const LVecBase3 &v);
86 TypedObject::get_class_type());
89 return get_class_type();
100 INLINE Point(
const LVecBase3 &point,
const LColor &color);
101 INLINE Point(
const Point ©);
102 INLINE
void operator = (
const Point ©);
105 UnalignedLVecBase4 _color;
108 typedef pvector<Point> SegmentList;
109 typedef pvector<SegmentList> LineList;
118 LPoint2 _reduced_viewport_min;
119 LPoint2 _reduced_viewport_max;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines a bounding convex hexahedron.
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
The smallest atom of cull.
A node that holds Geom objects, renderable pieces of geometry.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A basic node of the scene graph or data graph.
void move_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Moves the pen to the given point without drawing a line.
bool is_whole_portal_in_view(const LMatrix4 &cmat)
checks if portal_node is within the view frustum.
void draw_current_portal()
_portal_node is the current portal, draw it.
bool is_facing_view(const LPlane &portal_plane)
checks if the portal plane (in camera space) is facing the camera's near plane
const RenderState * get_clip_state() const
Returns the stored clip state.
void draw_hexahedron(BoundingHexahedron *frustum)
Given the BoundingHexahedron draw it using lines.
void get_reduced_viewport(LPoint2 &min, LPoint2 &max) const
Return the reduced viewport.
BoundingHexahedron * get_reduced_frustum() const
Return the reduced frustum.
void draw_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Draws a line segment from the pen's last position (the last call to move_to or draw_to) to the indica...
void set_reduced_viewport(const LPoint2 &min, const LPoint2 &max)
Set the current viewport that is being used by the portal clipper.
void set_reduced_frustum(BoundingHexahedron *bh)
Set the current view frustum that is being calculated by the portal clipper.
void draw_lines()
Draw all the lines in the buffer Cyan portal is the original geometry of the portal Yellow portal is ...
bool prepare_portal(const NodePath &node_path)
Given the portal draw the frustum with line segs for now.
void set_clip_state(const RenderState *clip_state)
Set the clip state of the current portal node This is done to remember the state for the child portal...
void draw_camera_frustum()
Draw the current camera frustum in white color.
A node in the scene graph that can hold a Portal Polygon, which is a rectangle.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
This object holds the camera position, etc., and other general setup information for rendering a part...
TypeHandle is the identifier used to differentiate C++ class types.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
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.
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.