LensNode

from acron.core import LensNode
class LensNode

Bases:

Bases: AcronNode

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

digraph inheritance957d79294c { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AcronNode" [URL="acron.core.AcronNode.html#acron.core.AcronNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "AcronNode" [arrowsize=0.75,style=""]; "Namable" -> "AcronNode" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "LensNode" [URL="acron.core.LensNode.html#acron.core.LensNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AcronNode" -> "LensNode" [arrowsize=0.75,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
__init__()
activate_lens()

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

copy_lens()

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

Copies the indicated lens into the specified slot.

deactivate_lens()

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

static get_class_type()
get_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.

get_lens_active()

Returns the active flag for the nth lens.

hide_frustum()

Disables the drawing of the lens’s frustum to aid in visualization.

is_in_view()

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

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 the LensNode itself.

set_lens()

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

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.

set_lens_active()

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.

show_frustum()

Enables the drawing of the lens’s frustum to aid in visualization. This actually creates a GeomNode which is parented to the LensNode.