PortalNode

from panda3d.core import PortalNode
class PortalNode

Bases: PandaNode

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

Inheritance diagram

Inheritance diagram of PortalNode

__init__(*args, **kwargs)
addVertex()

C++ Interface: add_vertex(const PortalNode self, const LPoint3f vertex)

/**
  • Adds a new vertex to the portal polygon. The vertices should be defined in

  • a counterclockwise orientation when viewing through the portal.

*/

add_vertex()

C++ Interface: add_vertex(const PortalNode self, const LPoint3f vertex)

/**
  • Adds a new vertex to the portal polygon. The vertices should be defined in

  • a counterclockwise orientation when viewing through the portal.

*/

cell_in
cell_out
clearVertices()

C++ Interface: clear_vertices(const PortalNode self)

/**
  • Resets the vertices of the portal to the empty list.

*/

clear_vertices()

C++ Interface: clear_vertices(const PortalNode self)

/**
  • Resets the vertices of the portal to the empty list.

*/

clip_plane
from_portal_mask
getCellIn()

C++ Interface: get_cell_in(PortalNode self)

/**
  • Sets the cell that this portal belongs to

*/

getCellOut()

C++ Interface: get_cell_out(PortalNode self)

/**
  • Sets the cell that this portal leads out to

*/

getClassType()

C++ Interface: get_class_type()

getFromPortalMask()

C++ Interface: get_from_portal_mask(PortalNode self)

/**
  • Returns the current “from” PortalMask. In order for a portal to be

  • detected from this object into another object, the intersection of this

  • object’s “from” mask and the other object’s “into” mask must be nonzero.

*/

getIntoPortalMask()

C++ Interface: get_into_portal_mask(PortalNode self)

/**
  • Returns the current “into” PortalMask. In order for a portal to be

  • detected from another object into this object, the intersection of the

  • other object’s “from” mask and this object’s “into” mask must be nonzero.

*/

getMaxDepth()

C++ Interface: get_max_depth(const PortalNode self)

/**
  • Returns the maximum depth this portal will be visible at

*/

getNumVertices()

C++ Interface: get_num_vertices(PortalNode self)

/**
  • Returns the number of vertices in the portal polygon.

*/

getPortalGeom()

C++ Interface: get_portal_geom(PortalNode self)

/**
  • Returns the current state of the portal_geom flag. See set_portal_geom().

*/

getVertex()

C++ Interface: get_vertex(PortalNode self, int n)

/**
  • Returns the nth vertex of the portal polygon.

*/

getVertices()
get_cell_in()

C++ Interface: get_cell_in(PortalNode self)

/**
  • Sets the cell that this portal belongs to

*/

get_cell_out()

C++ Interface: get_cell_out(PortalNode self)

/**
  • Sets the cell that this portal leads out to

*/

get_class_type()

C++ Interface: get_class_type()

get_from_portal_mask()

C++ Interface: get_from_portal_mask(PortalNode self)

/**
  • Returns the current “from” PortalMask. In order for a portal to be

  • detected from this object into another object, the intersection of this

  • object’s “from” mask and the other object’s “into” mask must be nonzero.

*/

get_into_portal_mask()

C++ Interface: get_into_portal_mask(PortalNode self)

/**
  • Returns the current “into” PortalMask. In order for a portal to be

  • detected from another object into this object, the intersection of the

  • other object’s “from” mask and this object’s “into” mask must be nonzero.

*/

get_max_depth()

C++ Interface: get_max_depth(const PortalNode self)

/**
  • Returns the maximum depth this portal will be visible at

*/

get_num_vertices()

C++ Interface: get_num_vertices(PortalNode self)

/**
  • Returns the number of vertices in the portal polygon.

*/

get_portal_geom()

C++ Interface: get_portal_geom(PortalNode self)

/**
  • Returns the current state of the portal_geom flag. See set_portal_geom().

*/

get_vertex()

C++ Interface: get_vertex(PortalNode self, int n)

/**
  • Returns the nth vertex of the portal polygon.

*/

get_vertices()
into_portal_mask
isClipPlane()

C++ Interface: is_clip_plane(const PortalNode self)

/**
  • Is this portal clipping against its left-right planes

*/

isOpen()

C++ Interface: is_open(const PortalNode self)

/**
  • Is this portal open from current camera zone

*/

isVisible()

C++ Interface: is_visible(const PortalNode self)

/**
  • Is this portal facing the camera

*/

is_clip_plane()

C++ Interface: is_clip_plane(const PortalNode self)

/**
  • Is this portal clipping against its left-right planes

*/

is_open()

C++ Interface: is_open(const PortalNode self)

/**
  • Is this portal open from current camera zone

*/

is_visible()

C++ Interface: is_visible(const PortalNode self)

/**
  • Is this portal facing the camera

*/

max_depth
open
portal_geom
setCellIn()

C++ Interface: set_cell_in(const PortalNode self, const NodePath cell)

/**
  • Sets the cell that this portal belongs to

*/

setCellOut()

C++ Interface: set_cell_out(const PortalNode self, const NodePath cell)

/**
  • Sets the cell that this portal leads out to

*/

setClipPlane()

C++ Interface: set_clip_plane(const PortalNode self, bool value)

/**
  • this is set if the portal will clip against its left and right planes

*/

setFromPortalMask()

C++ Interface: set_from_portal_mask(const PortalNode self, BitMask mask)

/**
  • Sets the “from” PortalMask. In order for a portal to be detected from this

  • object into another object, the intersection of this object’s “from” mask

  • and the other object’s “into” mask must be nonzero.

*/

setIntoPortalMask()

C++ Interface: set_into_portal_mask(const PortalNode self, BitMask mask)

/**
  • Sets the “into” PortalMask. In order for a portal to be detected from

  • another object into this object, the intersection of the other object’s

  • “from” mask and this object’s “into” mask must be nonzero.

*/

setMaxDepth()

C++ Interface: set_max_depth(const PortalNode self, int value)

/**
  • Set the maximum depth this portal will be visible at

*/

setOpen()

C++ Interface: set_open(const PortalNode self, bool value)

/**
  • Python sets this based on curent camera zone

*/

setPortalGeom()

C++ Interface: set_portal_geom(const PortalNode self, bool flag)

/**
  • Sets the state of the “portal geom” flag for this PortalNode. Normally,

  • this is false; when this is set true, the PortalSolids in this node will

  • test for portals with actual renderable geometry, in addition to whatever

  • PortalSolids may be indicated by the from_portal_mask.

  • Setting this to true causes this to test all GeomNodes for portals. It

  • is an all-or-none thing; there is no way to portal with only some

  • GeomNodes, as GeomNodes have no into_portal_mask.

*/

setPortalMask()

C++ Interface: set_portal_mask(const PortalNode self, BitMask mask)

/**
  • Simultaneously sets both the “from” and “into” PortalMask values to the

  • same thing.

*/

setVisible()

C++ Interface: set_visible(const PortalNode self, bool value)

/**
  • this is set if the portal is facing camera

*/

set_cell_in()

C++ Interface: set_cell_in(const PortalNode self, const NodePath cell)

/**
  • Sets the cell that this portal belongs to

*/

set_cell_out()

C++ Interface: set_cell_out(const PortalNode self, const NodePath cell)

/**
  • Sets the cell that this portal leads out to

*/

set_clip_plane()

C++ Interface: set_clip_plane(const PortalNode self, bool value)

/**
  • this is set if the portal will clip against its left and right planes

*/

set_from_portal_mask()

C++ Interface: set_from_portal_mask(const PortalNode self, BitMask mask)

/**
  • Sets the “from” PortalMask. In order for a portal to be detected from this

  • object into another object, the intersection of this object’s “from” mask

  • and the other object’s “into” mask must be nonzero.

*/

set_into_portal_mask()

C++ Interface: set_into_portal_mask(const PortalNode self, BitMask mask)

/**
  • Sets the “into” PortalMask. In order for a portal to be detected from

  • another object into this object, the intersection of the other object’s

  • “from” mask and this object’s “into” mask must be nonzero.

*/

set_max_depth()

C++ Interface: set_max_depth(const PortalNode self, int value)

/**
  • Set the maximum depth this portal will be visible at

*/

set_open()

C++ Interface: set_open(const PortalNode self, bool value)

/**
  • Python sets this based on curent camera zone

*/

set_portal_geom()

C++ Interface: set_portal_geom(const PortalNode self, bool flag)

/**
  • Sets the state of the “portal geom” flag for this PortalNode. Normally,

  • this is false; when this is set true, the PortalSolids in this node will

  • test for portals with actual renderable geometry, in addition to whatever

  • PortalSolids may be indicated by the from_portal_mask.

  • Setting this to true causes this to test all GeomNodes for portals. It

  • is an all-or-none thing; there is no way to portal with only some

  • GeomNodes, as GeomNodes have no into_portal_mask.

*/

set_portal_mask()

C++ Interface: set_portal_mask(const PortalNode self, BitMask mask)

/**
  • Simultaneously sets both the “from” and “into” PortalMask values to the

  • same thing.

*/

set_visible()

C++ Interface: set_visible(const PortalNode self, bool value)

/**
  • this is set if the portal is facing camera

*/

vertices
visible