|
|
|
A node that contains a Lens.
More...
#include "lensNode.h"
List of all members.
Classes |
| class | LensSlot |
Public Member Functions |
|
| LensNode (const string &name, Lens *lens=NULL) |
| bool | activate_lens (int index) |
| | An alternate way to call set_lens_active(index, true).
|
| virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
| | Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
|
| void | copy_lens (const Lens &lens) |
| | Sets up the LensNode using a copy of the indicated Lens.
|
| void | copy_lens (int index, const Lens &lens) |
| | Copies the indicated lens into the specified slot.
|
| bool | deactivate_lens (int index) |
| | An alternate way to call set_lens_active(index, false).
|
|
virtual TypeHandle | force_init_type () |
| Lens * | get_lens (int index=0) const |
| | Returns a pointer to the particular Lens associated with this LensNode, or NULL if there is not yet a Lens associated.
|
| bool | get_lens_active (int index) const |
| | Returns the active flag for the nth lens.
|
|
virtual TypeHandle | get_type () const |
| void | hide_frustum () |
| | Disables the drawing of the lens's frustum to aid in visualization.
|
| bool | is_in_view (int index, const LPoint3f &pos) |
| | Returns true if the given point is within the bounds of the lens of the LensNode (i.e.
|
| bool | is_in_view (const LPoint3f &pos) |
| | Returns true if the given point is within the bounds of the lens of the LensNode (i.e.
|
| virtual PandaNode * | make_copy () const |
| | Returns a newly-allocated Node that is a shallow copy of this one.
|
| virtual void | output (ostream &out) const |
| | Outputs the Namable.
|
| void | set_lens (Lens *lens) |
| | Sets up the LensNode using this particular Lens pointer.
|
| void | set_lens (int index, Lens *lens) |
| | Sets the indicated lens.
|
| bool | set_lens_active (int index, bool active) |
| | Sets the active flag for the nth lens.
|
| void | show_frustum () |
| | Enables the drawing of the lens's frustum to aid in visualization.
|
|
virtual void | write (ostream &out, int indent_level=0) const |
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
| virtual void | xform (const LMatrix4f &mat) |
| | Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type LensNode.
|
Protected Types |
|
typedef pvector< LensSlot > | Lenses |
Protected Member Functions |
|
| LensNode (const LensNode ©) |
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new LensNode.
|
|
| PT (PandaNode) _shown_frustum |
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type LensNode is encountered in the Bam file.
|
Protected Attributes |
|
Lenses | _lenses |
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).
Definition at line 32 of file lensNode.h.
Member Function Documentation
| bool LensNode::activate_lens |
( |
int |
index | ) |
[inline] |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 271 of file lensNode.cxx.
References set_lens().
| void LensNode::copy_lens |
( |
const Lens & |
lens | ) |
[inline] |
| void LensNode::copy_lens |
( |
int |
index, |
|
|
const Lens & |
lens |
|
) |
| [inline] |
Copies the indicated lens into the specified slot.
Definition at line 35 of file lensNode.I.
References set_lens().
| bool LensNode::deactivate_lens |
( |
int |
index | ) |
[inline] |
| Lens * LensNode::get_lens |
( |
int |
index = 0 | ) |
const [inline] |
| bool LensNode::get_lens_active |
( |
int |
index | ) |
const [inline] |
Returns the active flag for the nth lens.
Definition at line 75 of file lensNode.I.
| void LensNode::hide_frustum |
( |
| ) |
|
| bool LensNode::is_in_view |
( |
const LPoint3f & |
pos | ) |
[inline] |
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).
Definition at line 114 of file lensNode.I.
| bool LensNode::is_in_view |
( |
int |
index, |
|
|
const LPoint3f & |
pos |
|
) |
| |
| PandaNode * LensNode::make_copy |
( |
| ) |
const [virtual] |
| void LensNode::output |
( |
ostream & |
out | ) |
const [virtual] |
Outputs the Namable.
This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.
Reimplemented from PandaNode.
Definition at line 203 of file lensNode.cxx.
| void LensNode::register_with_read_factory |
( |
| ) |
[static] |
| void LensNode::set_lens |
( |
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.
Definition at line 90 of file lensNode.cxx.
References show_frustum().
| void LensNode::set_lens |
( |
Lens * |
lens | ) |
[inline] |
| bool LensNode::set_lens_active |
( |
int |
index, |
|
|
bool |
flag |
|
) |
| |
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.
Definition at line 117 of file lensNode.cxx.
References show_frustum().
Referenced by activate_lens(), and deactivate_lens().
| void LensNode::show_frustum |
( |
| ) |
|
| void LensNode::xform |
( |
const LMatrix4f & |
mat | ) |
[virtual] |
The documentation for this class was generated from the following files:
| | |