Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
LensNode Class Reference

A node that contains a Lens. More...

Inheritance diagram for LensNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject Camera LightLensNode DirectionalLight PointLight Spotlight

List of all members.

Public Member Functions

 LensNode (string name, Lens lens)
 LensNode (string name)
bool activateLens (int index)
 An alternate way to call set_lens_active(index, true).
 copyLens (Lens const lens)
 Sets up the LensNode using a copy of the indicated Lens.
 copyLens (int index, Lens const lens)
 Copies the indicated lens into the specified slot.
bool deactivateLens (int index)
 An alternate way to call set_lens_active(index, false).
Lens getLens (int index)
 Returns a pointer to the particular Lens associated with this LensNode, or NULL if there is not yet a Lens associated.
Lens getLens ()
 Returns a pointer to the particular Lens associated with this LensNode, or NULL if there is not yet a Lens associated.
bool getLensActive (int index)
 Returns the active flag for the nth lens.
 hideFrustum ()
 Disables the drawing of the lens's frustum to aid in visualization.
bool isInView (Point3 const pos)
 Returns true if the given point is within the bounds of the lens of the LensNode (i.e.
bool isInView (int index, Point3 const pos)
 Returns true if the given point is within the bounds of the lens of the LensNode (i.e.
 setLens (Lens lens)
 Sets up the LensNode using this particular Lens pointer.
 setLens (int index, Lens lens)
 Sets the indicated lens.
bool setLensActive (int index, bool active)
 Sets the active flag for the nth lens.
 showFrustum ()
 Enables the drawing of the lens's frustum to aid in visualization.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

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


Constructor & Destructor Documentation

LensNode ( string  name,
Lens  lens 
)
LensNode ( string  name)

Member Function Documentation

bool activateLens ( int  index)

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

copyLens ( Lens const  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.

copyLens ( int  index,
Lens const  lens 
)

Copies the indicated lens into the specified slot.

bool deactivateLens ( int  index)

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

static TypeHandle getClassType ( ) [static]

Reimplemented from PandaNode.

Reimplemented in Spotlight, PointLight, DirectionalLight, Camera, and LightLensNode.

Lens getLens ( int  index)

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.

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.

bool getLensActive ( int  index)

Returns the active flag for the nth lens.

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

bool isInView ( Point3 const  pos)

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

bool isInView ( int  index,
Point3 const  pos 
)

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)

Sets up the LensNode using this particular Lens pointer.

If the lens is subsequently modified, the LensNode properties immediately reflect the change.

setLens ( int  index,
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 the DisplayRegion. Adding a new lens automatically makes it active.

bool setLensActive ( int  index,
bool  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.

Enables the drawing of the lens's frustum to aid in visualization.

This actually creates a GeomNode which is parented to the LensNode.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties