# LensNode¶

from panda3d.core import LensNode

class LensNode

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

__init__(name: str, lens: Lens)
activateLens(index: int)bool

An alternate way to call set_lens_active(index, true).

copyLens(lens: Lens)None

Sets up the LensNode using a copy of the indicated Lens. If the original Lens is changed or destroyed, this LensNode is not affected.

copyLens(index: int, lens: Lens)None

Copies the indicated lens into the specified slot.

deactivateLens(index: int)bool

An alternate way to call set_lens_active(index, false).

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.

getLensActive(index: int)bool

Returns the active flag for the nth lens.

hideFrustum()None

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).

setLens(lens: Lens)None

Sets up the LensNode using this particular Lens pointer. If the lens is subsequently modified, the LensNode properties immediately reflect the change.

setLens(index: int, lens: Lens)None

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 the DisplayRegion. 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.

showFrustum()None

Enables the drawing of the lens’s frustum to aid in visualization. This actually creates a GeomNode which is parented to the LensNode.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2335054874420166, "perplexity": 3702.93957152101}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141715252.96/warc/CC-MAIN-20201202175113-20201202205113-00647.warc.gz"}