48 nassertr(index >= 0 && index < max_lenses,
nullptr);
50 if (index < (
int)_lenses.size()) {
51 return _lenses[index]._lens;
61 nassertr(index >= 0 && index < max_lenses,
false);
63 if (index < (
int)_lenses.size()) {
64 return _lenses[index]._is_active;
bool is_in_view(const LPoint3 &pos)
Returns true if the given point is within the bounds of the lens of the LensNode (i....
A base class for any number of different kinds of lenses, linear and otherwise.
void set_lens(Lens *lens)
Sets up the LensNode using this particular Lens pointer.
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...
bool activate_lens(int index)
An alternate way to call set_lens_active(index, true).
bool get_lens_active(int index) const
Returns the active flag for the nth lens.
bool set_lens_active(int index, bool active)
Sets the active flag for the nth lens.
void copy_lens(const Lens &lens)
Sets up the LensNode using a copy of the indicated Lens.
bool deactivate_lens(int index)
An alternate way to call set_lens_active(index, false).