LensNode
from panda3d.core import LensNode
- class LensNode
Bases:
Bases:
PandaNode
A node that contains a Lens. The most important example of this kind of node is a Camera, but other kinds of nodes also contain a lens (for instance, a Spotlight).
Inheritance diagram
- copyLens(lens: Lens)
Sets up the
LensNode
using a copy of the indicated Lens. If the original Lens is changed or destroyed, thisLensNode
is not affected.
- static getClassType() TypeHandle
- getLens(index: int) Lens
Returns a pointer to the particular Lens associated with this
LensNode
, or NULL if there is not yet a Lens associated. If an index number is specified, returns the nth lens.
- hideFrustum()
Disables the drawing of the lens’s frustum to aid in visualization.
- isInView(pos: LPoint3) bool
Returns true if the given point is within the bounds of the lens of the
LensNode
(i.e. if the camera can see the point).
- isInView(index: int, pos: LPoint3) bool
Returns true if the given point is within the bounds of the lens of the
LensNode
(i.e. if the camera can see the point). The point is assumed to be relative to theLensNode
itself.
- setLens(lens: Lens)
Sets up the
LensNode
using this particular Lens pointer. If the lens is subsequently modified, theLensNode
properties immediately reflect the change.
- setLens(index: int, lens: Lens)
Sets the indicated lens. Although a
LensNode
normally holds only one lens, it may optionally include multiple lenses, each with a different index number. The different lenses may be referenced by index number on theDisplayRegion
. Adding a new lens automatically makes it active.
- setLensActive(index: int, active: bool) bool
Sets the active flag for the nth lens. When a lens is inactive, it is not used for rendering, and any
DisplayRegions
associated with it are implicitly inactive as well. Returns true if the flag is changed, false if it already had this value.