Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FisheyeLens Class Reference

A fisheye lens. More...

#include <fisheyeLens.h>

Inheritance diagram for FisheyeLens:

Lens TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Types

enum  FromCorners {
  FC_roll = 0x0001, FC_camera_plane = 0x0002, FC_off_axis = 0x0004, FC_aspect_ratio = 0x0008,
  FC_shear = 0x0010
}

Public Member Functions

 FisheyeLens ()
 FisheyeLens (const FisheyeLens &copy)
void operator= (const FisheyeLens &copy)
virtual PT (Lens) make_copy() const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
virtual PointerTo< Lensmake_copy () const=0
bool extrude (const LPoint2f &point2d, LPoint3f &near_point, LPoint3f &far_point) const
 Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

bool extrude (const LPoint3f &point2d, LPoint3f &near_point, LPoint3f &far_point) const
 Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

bool project (const LPoint3f &point3d, LPoint3f &point2d) const
 Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

bool project (const LPoint3f &point3d, LPoint2f &point2d) const
 Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

void set_change_event (const string &event)
 Sets the name of the event that will be generated whenever any properties of the Lens have changed.

const string & get_change_event () const
 Returns the name of the event that will be generated whenever any properties of this particular Lens have changed.

void set_coordinate_system (CoordinateSystem cs)
 Specifies the coordinate system that all 3-d computations are performed within for this Lens.

CoordinateSystem get_coordinate_system () const
 Returns the coordinate system that all 3-d computations are performed within for this Lens.

void clear ()
 Resets all lens parameters to their initial default settings.

void set_film_size (float width)
 Sets the horizontal size of the film without changing its shape.

void set_film_size (float width, float height)
 Sets the size and shape of the "film" within the lens.

void set_film_size (const LVecBase2f &film_size)
 Sets the size and shape of the "film" within the lens.

const LVecBase2f & get_film_size () const
 Returns the horizontal and vertical film size of the virtual film.

void set_film_offset (float x, float y)
 Sets the horizontal and vertical offset amounts of this Lens.

void set_film_offset (const LVecBase2f &film_offset)
 Sets the horizontal and vertical offset amounts of this Lens.

const LVector2f & get_film_offset () const
 Returns the horizontal and vertical offset amounts of this Lens.

void set_focal_length (float focal_length)
 Sets the focal length of the lens.

float get_focal_length () const
 Returns the focal length of the lens.

void set_fov (float fov)
 Sets the horizontal field of view of the lens without changing the aspect ratio.

void set_fov (float hfov, float vfov)
 Sets the field of view of the lens in both dimensions.

void set_fov (const LVecBase2f &fov)
 Sets the field of view of the lens in both dimensions.

const LVecBase2f & get_fov () const
 Returns the horizontal and vertical film size of the virtual film.

float get_hfov () const
 Returns the horizontal component of fov only.

float get_vfov () const
 Returns the vertical component of fov only.

void set_aspect_ratio (float aspect_ratio)
 Sets the aspect ratio of the lens.

float get_aspect_ratio () const
 Returns the aspect ratio of the Lens.

void set_near (float near_distance)
 Defines the position of the near plane (or cylinder, sphere, whatever).

float get_near () const
 Returns the position of the near plane (or cylinder, sphere, whatever).

void set_far (float far_distance)
 Defines the position of the far plane (or cylinder, sphere, whatever).

float get_far () const
 Returns the position of the far plane (or cylinder, sphere, whatever).

void set_near_far (float near_distance, float far_distance)
 Simultaneously changes the near and far planes.

void set_view_hpr (float h, float p, float r)
 Sets the direction in which the lens is facing.

void set_view_hpr (const LVecBase3f &view_hpr)
 Sets the direction in which the lens is facing.

const LVecBase3f & get_view_hpr () const
 Returns the direction in which the lens is facing.

void set_view_vector (float x, float y, float z, float i, float j, float k)
 Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.

void set_view_vector (const LVector3f &view_vector, const LVector3f &up_vector)
 Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.

const LVector3f & get_view_vector () const
 Returns the axis along which the lens is facing.

const LVector3f & get_up_vector () const
 Returns the axis perpendicular to the camera's view vector that indicates the "up" direction.

LPoint3f get_nodal_point () const
 Returns the center point of the lens: the point from which the lens is viewing.

void set_iod_offset (float offset)
 Sets the amount by which the lens is shifted to the right, perpendicular to its view vector and up vector.

float get_iod_offset () const
 Returns the aspect ratio of the Lens.

void set_view_mat (const LMatrix4f &view_mat)
 Sets an arbitrary transformation on the lens.

const LMatrix4f & get_view_mat () const
 Returns the direction in which the lens is facing.

void set_frustum_from_corners (const LVecBase3f &ul, const LVecBase3f &ur, const LVecBase3f &ll, const LVecBase3f &lr, int flags)
 Sets up the lens to use the frustum defined by the four indicated points.

void recompute_all ()
 Forces all internal parameters of the Lens to be recomputed.

virtual bool is_linear () const
 Returns true if the lens represents a linear projection (e.g.

virtual PointerTo< Geommake_geometry ()
 Allocates and returns a new Geom that can be rendered to show a visible representation of the frustum used for this kind of lens, if it makes sense to do so.

virtual PointerTo< BoundingVolumemake_bounds () const
 Allocates and returns a new BoundingVolume that encloses the frustum used for this kind of lens, if possible.

const LMatrix4f & get_projection_mat () const
 Returns the complete transformation matrix from a 3-d point in space to a point on the film, if such a matrix exists, or the identity matrix if the lens is nonlinear.

const LMatrix4f & get_projection_mat_inv () const
 Returns the matrix that transforms from a 2-d point on the film to a 3-d vector in space, if such a matrix exists.

virtual void output (ostream &out) const
virtual void write (ostream &out, int indent_level=0) const
const UpdateSeqget_last_change () const
 Returns the UpdateSeq that is incremented whenever the lens properties are changed.

int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.

bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.

int get_ref_count () const
 Returns the current reference count.

int ref () const
 Explicitly increments the reference count.

int unref () const
 Explicitly decrements the reference count.

void test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.


Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()
float get_default_near ()
 Returns the default near plane distance that will be assigned to each newly-created lens.

float get_default_far ()
 Returns the default far plane distance that will be assigned to each newly-created lens.


Protected Types

enum  UserFlags {
  UF_film_width = 0x0001, UF_film_height = 0x0002, UF_focal_length = 0x0004, UF_hfov = 0x0008,
  UF_vfov = 0x0010, UF_aspect_ratio = 0x0020, UF_view_hpr = 0x0040, UF_view_vector = 0x0080,
  UF_iod_offset = 0x0100, UF_view_mat = 0x0200
}
enum  CompFlags {
  CF_film_mat = 0x0001, CF_film_mat_inv = 0x0002, CF_lens_mat = 0x0004, CF_lens_mat_inv = 0x0008,
  CF_projection_mat = 0x0010, CF_projection_mat_inv = 0x0020, CF_mat = 0x003f, CF_focal_length = 0x0040,
  CF_fov = 0x0080, CF_film_size = 0x0100, CF_aspect_ratio = 0x0200, CF_view_hpr = 0x0400,
  CF_view_vector = 0x0800, CF_iod_offset = 0x1000
}

Protected Member Functions

virtual bool extrude_impl (const LPoint3f &point2d, LPoint3f &near_point, LPoint3f &far_point) const
 Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

virtual bool project_impl (const LPoint3f &point3d, LPoint3f &point2d) const
 Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

virtual float fov_to_film (float fov, float focal_length, bool horiz) const
 Given a field of view in degrees and a focal length, compute the correspdonding width (or height) on the film.

virtual float fov_to_focal_length (float fov, float film_size, bool horiz) const
 Given a field of view in degrees and a width (or height) on the film, compute the focal length of the lens.

virtual float film_to_fov (float film_size, float focal_length, bool horiz) const
 Given a width (or height) on the film and a focal length, compute the field of view in degrees.

void adjust_user_flags (int clear_flags, int set_flags)
 Clears from _user_flags the bits in the first parameter, and sets the bits in the second parameter.

void adjust_comp_flags (int clear_flags, int set_flags)
 Clears from _comp_flags the bits in the first parameter, and sets the bits in the second parameter.

void throw_change_event ()
 Throws the event associated with changing properties on this Lens, if any.

const LMatrix4f & get_film_mat () const
 Returns the matrix that transforms from a point behind the lens to a point on the film.

const LMatrix4f & get_film_mat_inv () const
 Returns the matrix that transforms from a point on the film to a point behind the lens.

const LMatrix4f & get_lens_mat () const
 Returns the matrix that transforms from a point in front of the lens to a point in space.

const LMatrix4f & get_lens_mat_inv () const
 Returns the matrix that transforms from a point in space to a point in front of the lens.

virtual void compute_film_size ()
 Computes the size and shape of the film behind the camera, based on the aspect ratio and fov.

virtual void compute_focal_length ()
 Computes the focal length of the lens, based on the fov and film size.

virtual void compute_fov ()
 Computes the field of view of the lens, based on the film size and focal length.

virtual void compute_aspect_ratio ()
 Computes the aspect ratio of the film rectangle, as a ratio of width to height.

virtual void compute_view_hpr ()
 Computes the Euler angles representing the lens' rotation.

virtual void compute_view_vector ()
 Computes the view vector and up vector for the lens.

virtual void compute_iod_offset ()
 Computes the IOD offset: the translation along the "right" axis.

virtual void compute_projection_mat ()
 Computes the complete transformation matrix from 3-d point to 2-d point, if the lens is linear.

virtual void compute_film_mat ()
 Computes the matrix that transforms from a point behind the lens to a point on the film.

virtual void compute_lens_mat ()
 Computes the matrix that transforms from a point in front of the lens to a point in space.


Protected Attributes

string _change_event
UpdateSeq _last_change
CoordinateSystem _cs
LVecBase2f _film_size
LVector2f _film_offset
float _focal_length
LVecBase2f _fov
float _aspect_ratio
float _near_distance
float _far_distance
LVecBase3f _view_hpr
LVector3f _view_vector
LVector3f _up_vector
float _iod_offset
LMatrix4f _film_mat
LMatrix4f _film_mat_inv
LMatrix4f _lens_mat
LMatrix4f _lens_mat_inv
LMatrix4f _projection_mat
LMatrix4f _projection_mat_inv
short _user_flags
short _comp_flags
char _focal_length_seq
char _fov_seq
char _film_size_seq
PTA_Vertexf _geom_coords

Static Protected Attributes

const float _default_fov = 40.0f

Static Private Attributes

TypeHandle _type_handle

Detailed Description

A fisheye lens.

This nonlinear lens introduces a spherical distortion to the image, which is minimal at small angles from the lens, and increases at larger angles from the lens. The field of view may extend to 360 degrees.

Definition at line 44 of file fisheyeLens.h.


Member Enumeration Documentation

enum Lens::CompFlags [protected, inherited]
 

Enumeration values:
CF_film_mat 
CF_film_mat_inv 
CF_lens_mat 
CF_lens_mat_inv 
CF_projection_mat 
CF_projection_mat_inv 
CF_mat 
CF_focal_length 
CF_fov 
CF_film_size 
CF_aspect_ratio 
CF_view_hpr 
CF_view_vector 
CF_iod_offset 

Definition at line 230 of file lens.h.

enum Lens::FromCorners [inherited]
 

Enumeration values:
FC_roll 
FC_camera_plane 
FC_off_axis 
FC_aspect_ratio 
FC_shear 

Definition at line 129 of file lens.h.

enum Lens::UserFlags [protected, inherited]
 

Enumeration values:
UF_film_width 
UF_film_height 
UF_focal_length 
UF_hfov 
UF_vfov 
UF_aspect_ratio 
UF_view_hpr 
UF_view_vector 
UF_iod_offset 
UF_view_mat 

Definition at line 216 of file lens.h.


Constructor & Destructor Documentation

FisheyeLens::FisheyeLens  )  [inline]
 

Definition at line 30 of file fisheyeLens.I.

References INLINE.

FisheyeLens::FisheyeLens const FisheyeLens &  copy  )  [inline]
 

Definition at line 41 of file fisheyeLens.I.

References INLINE, and Lens::operator=().


Member Function Documentation

void Lens::adjust_comp_flags int  clear_flags,
int  set_flags
[inline, protected, inherited]
 

Clears from _comp_flags the bits in the first parameter, and sets the bits in the second parameter.

Definition at line 561 of file lens.I.

Referenced by Lens::get_default_far(), Lens::get_view_hpr(), Lens::is_linear(), MatrixLens::operator=(), Lens::output(), Lens::set_aspect_ratio(), Lens::set_change_event(), Lens::set_film_offset(), and Lens::set_film_size().

void Lens::adjust_user_flags int  clear_flags,
int  set_flags
[inline, protected, inherited]
 

Clears from _user_flags the bits in the first parameter, and sets the bits in the second parameter.

Definition at line 546 of file lens.I.

Referenced by Lens::get_default_far(), Lens::get_view_hpr(), Lens::set_aspect_ratio(), and Lens::set_film_size().

void Lens::clear  )  [inherited]
 

Resets all lens parameters to their initial default settings.

Definition at line 117 of file lens.cxx.

void Lens::compute_aspect_ratio  )  [protected, virtual, inherited]
 

Computes the aspect ratio of the film rectangle, as a ratio of width to height.

Definition at line 1586 of file lens.cxx.

References length.

Referenced by Lens::set_film_size().

void Lens::compute_film_mat  )  [protected, virtual, inherited]
 

Computes the matrix that transforms from a point behind the lens to a point on the film.

Definition at line 1685 of file lens.cxx.

void Lens::compute_film_size  )  [protected, virtual, inherited]
 

Computes the size and shape of the film behind the camera, based on the aspect ratio and fov.

Definition at line 1481 of file lens.cxx.

void Lens::compute_focal_length  )  [protected, virtual, inherited]
 

Computes the focal length of the lens, based on the fov and film size.

This is based on the horizontal dimension.

Definition at line 1529 of file lens.cxx.

void Lens::compute_fov  )  [protected, virtual, inherited]
 

Computes the field of view of the lens, based on the film size and focal length.

Definition at line 1550 of file lens.cxx.

References Lens::_geom_coords.

void Lens::compute_iod_offset  )  [protected, virtual, inherited]
 

Computes the IOD offset: the translation along the "right" axis.

Definition at line 1647 of file lens.cxx.

void Lens::compute_lens_mat  )  [protected, virtual, inherited]
 

Computes the matrix that transforms from a point in front of the lens to a point in space.

Definition at line 1723 of file lens.cxx.

void Lens::compute_projection_mat  )  [protected, virtual, inherited]
 

Computes the complete transformation matrix from 3-d point to 2-d point, if the lens is linear.

Reimplemented in MatrixLens, OrthographicLens, and PerspectiveLens.

Definition at line 1668 of file lens.cxx.

References t.

void Lens::compute_view_hpr  )  [protected, virtual, inherited]
 

Computes the Euler angles representing the lens' rotation.

Definition at line 1609 of file lens.cxx.

References csqrt().

void Lens::compute_view_vector  )  [protected, virtual, inherited]
 

Computes the view vector and up vector for the lens.

Definition at line 1627 of file lens.cxx.

bool Lens::extrude const LPoint3f &  point2d,
LPoint3f &  near_point,
LPoint3f &  far_point
const [inline, inherited]
 

Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

The vector is returned by indicating the points on the near plane and far plane that both map to the indicated 2-d point.

The z coordinate of the 2-d point is ignored.

Returns true if the vector is defined, or false otherwise.

Definition at line 90 of file lens.I.

References INLINE, and Lens::project_impl().

bool Lens::extrude const LPoint2f &  point2d,
LPoint3f &  near_point,
LPoint3f &  far_point
const [inline, inherited]
 

Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

The vector is returned by indicating the points on the near plane and far plane that both map to the indicated 2-d point.

Returns true if the vector is defined, or false otherwise.

Definition at line 52 of file lens.I.

References Lens::extrude_impl(), and INLINE.

Referenced by ProjectionScreen::set_projector().

bool FisheyeLens::extrude_impl const LPoint3f &  point2d,
LPoint3f &  near_point,
LPoint3f &  far_point
const [protected, virtual]
 

Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.

The vector is returned by indicating the points on the near plane and far plane that both map to the indicated 2-d point.

The z coordinate of the 2-d point is ignored.

Returns true if the vector is defined, or false otherwise.

Reimplemented from Lens.

Definition at line 92 of file fisheyeLens.cxx.

References fisheye_k.

float FisheyeLens::film_to_fov float  film_size,
float  focal_length,
bool  horiz
const [protected, virtual]
 

Given a width (or height) on the film and a focal length, compute the field of view in degrees.

If horiz is true, this is in the horizontal direction; otherwise, it is in the vertical direction (some lenses behave differently in each direction).

Reimplemented from Lens.

Definition at line 282 of file fisheyeLens.cxx.

virtual TypeHandle FisheyeLens::force_init_type void   )  [inline, virtual]
 

Reimplemented from Lens.

Definition at line 68 of file fisheyeLens.h.

float FisheyeLens::fov_to_film float  fov,
float  focal_length,
bool  horiz
const [protected, virtual]
 

Given a field of view in degrees and a focal length, compute the correspdonding width (or height) on the film.

If horiz is true, this is in the horizontal direction; otherwise, it is in the vertical direction (some lenses behave differently in each direction).

Reimplemented from Lens.

Definition at line 240 of file fisheyeLens.cxx.

float FisheyeLens::fov_to_focal_length float  fov,
float  film_size,
bool  horiz
const [protected, virtual]
 

Given a field of view in degrees and a width (or height) on the film, compute the focal length of the lens.

If horiz is true, this is in the horizontal direction; otherwise, it is in the vertical direction (some lenses behave differently in each direction).

Reimplemented from Lens.

Definition at line 261 of file fisheyeLens.cxx.

float Lens::get_aspect_ratio  )  const [inherited]
 

Returns the aspect ratio of the Lens.

This is determined based on the indicated film size; see set_film_size().

Definition at line 478 of file lens.cxx.

const string & Lens::get_change_event  )  const [inline, inherited]
 

Returns the name of the event that will be generated whenever any properties of this particular Lens have changed.

Definition at line 207 of file lens.I.

References Lens::_film_offset, and INLINE.

TypeHandle FisheyeLens::get_class_type void   )  [inline, static]
 

Reimplemented from Lens.

Definition at line 69 of file fisheyeLens.h.

CoordinateSystem Lens::get_coordinate_system  )  const [inline, inherited]
 

Returns the coordinate system that all 3-d computations are performed within for this Lens.

Normally, this is CS_default.

Definition at line 224 of file lens.I.

References INLINE, and Lens::set_fov().

float Lens::get_default_far  )  [static, inherited]
 

Returns the default far plane distance that will be assigned to each newly-created lens.

This is read from the Configrc file.

Definition at line 515 of file lens.cxx.

References Lens::_iod_offset, Lens::adjust_comp_flags(), Lens::adjust_user_flags(), Lens::CF_iod_offset, Lens::CF_mat, Lens::CF_view_hpr, Lens::CF_view_vector, Lens::throw_change_event(), Lens::UF_iod_offset, and Lens::UF_view_mat.

float Lens::get_default_near  )  [static, inherited]
 

Returns the default near plane distance that will be assigned to each newly-created lens.

This is read from the Configrc file.

Definition at line 498 of file lens.cxx.

References Lens::get_view_mat().

float Lens::get_far  )  const [inline, inherited]
 

Returns the position of the far plane (or cylinder, sphere, whatever).

Definition at line 453 of file lens.I.

Referenced by ProjectionScreen::cull_callback(), and PSphereLens::extrude_impl().

const LMatrix4f & Lens::get_film_mat  )  const [protected, inherited]
 

Returns the matrix that transforms from a point behind the lens to a point on the film.

Definition at line 1295 of file lens.cxx.

Referenced by PSphereLens::extrude_impl(), and Lens::is_linear().

const LMatrix4f & Lens::get_film_mat_inv  )  const [protected, inherited]
 

Returns the matrix that transforms from a point on the film to a point behind the lens.

Definition at line 1313 of file lens.cxx.

const LVector2f & Lens::get_film_offset  )  const [inline, inherited]
 

Returns the horizontal and vertical offset amounts of this Lens.

See set_film_offset().

Definition at line 328 of file lens.I.

References INLINE, and Lens::set_view_hpr().

Referenced by Lens::get_lens_mat().

const LVecBase2f & Lens::get_film_size  )  const [inherited]
 

Returns the horizontal and vertical film size of the virtual film.

See set_film_size().

Definition at line 257 of file lens.cxx.

References Lens::_comp_flags, Lens::_focal_length, and Lens::CF_focal_length.

Referenced by Lens::get_lens_mat(), Lens::get_projection_mat_inv(), and Lens::write().

float Lens::get_focal_length  )  const [inherited]
 

Returns the focal length of the lens.

This may have been set explicitly by a previous call to set_focal_length(), or it may be computed based on the lens' fov and film_size. For certain kinds of lenses, the focal length has no meaning.

Definition at line 326 of file lens.cxx.

Referenced by PSphereLens::extrude_impl().

const LVecBase2f & Lens::get_fov  )  const [inherited]
 

Returns the horizontal and vertical film size of the virtual film.

See set_fov().

Definition at line 433 of file lens.cxx.

References Lens::_comp_flags, Lens::_view_hpr, and Lens::CF_view_hpr.

float Lens::get_hfov  )  const [inline, inherited]
 

Returns the horizontal component of fov only.

See get_fov().

Definition at line 370 of file lens.I.

References Lens::_comp_flags, and INLINE.

Referenced by GLGraphicsStateGuardian::issue_cull_face().

float Lens::get_iod_offset  )  const [inherited]
 

Returns the aspect ratio of the Lens.

This is determined based on the indicated film size; see set_film_size().

Definition at line 682 of file lens.cxx.

References Lens::FC_shear.

const UpdateSeq & Lens::get_last_change  )  const [inline, inherited]
 

Returns the UpdateSeq that is incremented whenever the lens properties are changed.

As long as this number remains the same, you may assume the lens properties are unchanged.

Definition at line 531 of file lens.I.

const LMatrix4f & Lens::get_lens_mat  )  const [protected, inherited]
 

Returns the matrix that transforms from a point in front of the lens to a point in space.

Definition at line 1334 of file lens.cxx.

References Lens::get_film_offset(), and Lens::get_film_size().

const LMatrix4f & Lens::get_lens_mat_inv  )  const [protected, inherited]
 

Returns the matrix that transforms from a point in space to a point in front of the lens.

Definition at line 1352 of file lens.cxx.

References Lens::_film_mat.

Referenced by PSphereLens::extrude_impl(), and Lens::get_nodal_point().

float Lens::get_near  )  const [inline, inherited]
 

Returns the position of the near plane (or cylinder, sphere, whatever).

Definition at line 419 of file lens.I.

Referenced by ProjectionScreen::cull_callback(), and PSphereLens::extrude_impl().

LPoint3f Lens::get_nodal_point  )  const [inherited]
 

Returns the center point of the lens: the point from which the lens is viewing.

Definition at line 635 of file lens.cxx.

References Lens::FC_camera_plane, and Lens::get_lens_mat_inv().

Referenced by GLGraphicsStateGuardian::issue_cull_face(), and DXGraphicsStateGuardian8::issue_depth_write().

const LMatrix4f & Lens::get_projection_mat  )  const [inherited]
 

Returns the complete transformation matrix from a 3-d point in space to a point on the film, if such a matrix exists, or the identity matrix if the lens is nonlinear.

Definition at line 1196 of file lens.cxx.

const LMatrix4f & Lens::get_projection_mat_inv  )  const [inherited]
 

Returns the matrix that transforms from a 2-d point on the film to a 3-d vector in space, if such a matrix exists.

Definition at line 1216 of file lens.cxx.

References Lens::_default_fov, Lens::_focal_length, Lens::_fov, Lens::_user_flags, Lens::film_to_fov(), Lens::get_film_size(), Lens::UF_focal_length, and Lens::UF_hfov.

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

Returns the current reference count.

Definition at line 183 of file referenceCount.I.

Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture().

virtual TypeHandle FisheyeLens::get_type void   )  const [inline, virtual]
 

Reimplemented from Lens.

Definition at line 65 of file fisheyeLens.h.

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

const LVector3f & Lens::get_up_vector  )  const [inherited]
 

Returns the axis perpendicular to the camera's view vector that indicates the "up" direction.

Definition at line 617 of file lens.cxx.

float Lens::get_vfov  )  const [inline, inherited]
 

Returns the vertical component of fov only.

See get_fov().

Definition at line 385 of file lens.I.

const LVecBase3f & Lens::get_view_hpr  )  const [inherited]
 

Returns the direction in which the lens is facing.

Definition at line 556 of file lens.cxx.

References Lens::_lens_mat, Lens::adjust_comp_flags(), Lens::adjust_user_flags(), Lens::CF_iod_offset, Lens::CF_lens_mat, Lens::CF_lens_mat_inv, Lens::CF_view_hpr, Lens::CF_view_vector, Lens::throw_change_event(), Lens::UF_iod_offset, Lens::UF_view_hpr, Lens::UF_view_mat, and Lens::UF_view_vector.

const LMatrix4f & Lens::get_view_mat  )  const [inherited]
 

Returns the direction in which the lens is facing.

Definition at line 736 of file lens.cxx.

Referenced by Lens::get_default_near().

const LVector3f & Lens::get_view_vector  )  const [inherited]
 

Returns the axis along which the lens is facing.

Definition at line 599 of file lens.cxx.

Referenced by GLGraphicsStateGuardian::issue_cull_face().

void FisheyeLens::init_type void   )  [inline, static]
 

Reimplemented from Lens.

Definition at line 72 of file fisheyeLens.h.

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is the indicated type exactly.

Definition at line 101 of file typedObject.I.

Referenced by PT(), and CollisionNode::xform().

bool Lens::is_linear  )  const [virtual, inherited]
 

Returns true if the lens represents a linear projection (e.g.

PerspectiveLens, OrthographicLens), and therefore there is a valid matrix returned by get_projection_mat(), or false otherwise.

Reimplemented in MatrixLens, OrthographicLens, and PerspectiveLens.

Definition at line 1034 of file lens.cxx.

References Lens::_comp_flags, Lens::_film_mat_inv, Lens::adjust_comp_flags(), Lens::CF_film_mat_inv, and Lens::get_film_mat().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

PointerTo< BoundingVolume > Lens::make_bounds  )  const [virtual, inherited]
 

Allocates and returns a new BoundingVolume that encloses the frustum used for this kind of lens, if possible.

If a suitable bounding volume cannot be created, returns NULL.

Definition at line 1143 of file lens.cxx.

virtual PointerTo< Lens > Lens::make_copy  )  const [pure virtual, inherited]
 

Implemented in MatrixLens, OrthographicLens, and PerspectiveLens.

PointerTo< Geom > Lens::make_geometry  )  [virtual, inherited]
 

Allocates and returns a new Geom that can be rendered to show a visible representation of the frustum used for this kind of lens, if it makes sense to do so.

If a visible representation cannot be created, returns NULL.

Definition at line 1055 of file lens.cxx.

References Lens::_comp_flags, Lens::_lens_mat, and Lens::CF_lens_mat.

void FisheyeLens::operator= const FisheyeLens &  copy  )  [inline]
 

Definition at line 52 of file fisheyeLens.I.

void Lens::output ostream &  out  )  const [virtual, inherited]
 

Definition at line 1235 of file lens.cxx.

References Lens::_comp_flags, Lens::_focal_length, Lens::_fov, Lens::_user_flags, Lens::adjust_comp_flags(), Lens::CF_focal_length, Lens::film_to_fov(), Lens::fov_to_focal_length(), Lens::UF_focal_length, and Lens::UF_vfov.

bool Lens::project const LPoint3f &  point3d,
LPoint2f &  point2d
const [inline, inherited]
 

Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

Returns true if the 3-d point is in front of the lens and within the viewing frustum (in which case point2d is filled in), or false otherwise (in which case point2d will be filled in with something, which may or may not be meaningful).

Definition at line 121 of file lens.I.

References Lens::_change_event.

bool Lens::project const LPoint3f &  point3d,
LPoint3f &  point2d
const [inline, inherited]
 

Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

The z coordinate will also be set to a value in the range (-1, 1), where 1 represents a point on the near plane, and -1 represents a point on the far plane.

Returns true if the 3-d point is in front of the lens and within the viewing frustum (in which case point2d is filled in), or false otherwise (in which case point2d will be filled in with something, which may or may not be meaningful).

Definition at line 163 of file lens.I.

References height, INLINE, Lens::set_film_size(), and width.

bool FisheyeLens::project_impl const LPoint3f &  point3d,
LPoint3f &  point2d
const [protected, virtual]
 

Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.

Some lens types also set the z coordinate of the 2-d point to a value in the range (-1, 1), where 1 represents a point on the near plane, and -1 represents a point on the far plane.

Returns true if the 3-d point is in front of the lens and within the viewing frustum (in which case point2d is filled in), or false otherwise.

Reimplemented from Lens.

Definition at line 167 of file fisheyeLens.cxx.

References fisheye_k, and y.

virtual FisheyeLens::PT Lens   )  const [virtual]
 

void Lens::recompute_all  )  [inherited]
 

Forces all internal parameters of the Lens to be recomputed.

Normally, this should never need to be called; it is provided only to assist in debugging.

Definition at line 1015 of file lens.cxx.

int ReferenceCount::ref  )  const [inline, inherited]
 

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 225 of file referenceCount.I.

Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering().

void Lens::set_aspect_ratio float  aspect_ratio  )  [inherited]
 

Sets the aspect ratio of the lens.

This is the ratio of the height to the width of the generated image. Setting this overrides the two-parameter fov or film size setting.

Definition at line 456 of file lens.cxx.

References Lens::_up_vector, Lens::_view_vector, Lens::adjust_comp_flags(), Lens::adjust_user_flags(), Lens::CF_iod_offset, Lens::CF_mat, Lens::CF_view_hpr, Lens::CF_view_vector, Lens::throw_change_event(), Lens::UF_view_hpr, Lens::UF_view_mat, and Lens::UF_view_vector.

void Lens::set_change_event const string &  event  )  [inline, inherited]
 

Sets the name of the event that will be generated whenever any properties of the Lens have changed.

If this is not set for a particular lens, no event will be generated.

The event is thrown with one parameter, the lens itself. This can be used to automatically track changes to camera fov, etc. in the application.

Definition at line 190 of file lens.I.

References Lens::_film_offset, Lens::adjust_comp_flags(), Lens::CF_mat, INLINE, and Lens::throw_change_event().

void Lens::set_coordinate_system CoordinateSystem  cs  )  [inherited]
 

Specifies the coordinate system that all 3-d computations are performed within for this Lens.

Normally, this is CS_default.

Definition at line 101 of file lens.cxx.

References Lens::_aspect_ratio, Lens::_comp_flags, Lens::_far_distance, Lens::_film_size_seq, Lens::_focal_length, Lens::_focal_length_seq, Lens::_fov, Lens::_fov_seq, Lens::_iod_offset, Lens::_near_distance, Lens::_up_vector, Lens::_user_flags, Lens::_view_hpr, Lens::_view_vector, Lens::CF_fov, default_far, and default_near.

void Lens::set_far float  far_distance  )  [inline, inherited]
 

Defines the position of the far plane (or cylinder, sphere, whatever).

Points farther from the lens than this may not be rendered.

Definition at line 436 of file lens.I.

void Lens::set_film_offset const LVecBase2f &  film_offset  )  [inline, inherited]
 

Sets the horizontal and vertical offset amounts of this Lens.

These are both in the same units specified in set_film_size().

This can be used to establish an off-axis lens.

Definition at line 311 of file lens.I.

References Lens::_far_distance, Lens::_near_distance, Lens::adjust_comp_flags(), Lens::CF_projection_mat, Lens::CF_projection_mat_inv, and Lens::throw_change_event().

void Lens::set_film_offset float  x,
float  y
[inline, inherited]
 

Sets the horizontal and vertical offset amounts of this Lens.

These are both in the same units specified in set_film_size().

This can be used to establish an off-axis lens.

Definition at line 290 of file lens.I.

void Lens::set_film_size const LVecBase2f &  film_size  )  [inherited]
 

Sets the size and shape of the "film" within the lens.

This both establishes the units used by calls like set_focal_length(), and establishes the aspect ratio of the frame.

In a physical camera, the field of view of a lens is determined by the lens' focal length and by the size of the film area exposed by the lens. For instance, a 35mm camera exposes a rectangle on the film about 24mm x 36mm, which means a 50mm lens gives about a 40-degree horizontal field of view.

In the virtual camera, you may set the film size to any units here, and specify a focal length in the same units to simulate the same effect. Or, you may ignore this parameter, and specify the field of view and aspect ratio of the lens directly.

Definition at line 218 of file lens.cxx.

References Lens::_film_size_seq, Lens::_focal_length, Lens::_focal_length_seq, Lens::_fov_seq, Lens::adjust_comp_flags(), Lens::adjust_user_flags(), Lens::CF_film_size, Lens::CF_focal_length, Lens::CF_fov, Lens::CF_mat, nassertv, Lens::resequence_fov_triad(), Lens::throw_change_event(), Lens::UF_film_height, Lens::UF_film_width, Lens::UF_focal_length, Lens::UF_hfov, and Lens::UF_vfov.

void Lens::set_film_size float  width,
float  height
[inline, inherited]
 

Sets the size and shape of the "film" within the lens.

This both establishes the units used by calls like set_focal_length(), and establishes the aspect ratio of the frame.

In a physical camera, the field of view of a lens is determined by the lens' focal length and by the size of the film area exposed by the lens. For instance, a 35mm camera exposes a rectangle on the film about 24mm x 36mm, which means a 50mm lens gives about a 40-degree horizontal field of view.

In the virtual camera, you may set the film size to any units here, and specify a focal length in the same units to simulate the same effect. Or, you may ignore this parameter, and specify the field of view and aspect ratio of the lens directly.

Definition at line 269 of file lens.I.

References Lens::_near_distance, and INLINE.

void Lens::set_film_size float  width  )  [inherited]
 

Sets the horizontal size of the film without changing its shape.

The aspect ratio remains unchanged; this computes the vertical size of the film to automatically maintain the aspect ratio.

Definition at line 155 of file lens.cxx.

References Lens::_film_size, Lens::_film_size_seq, Lens::_focal_length_seq, Lens::_fov_seq, Lens::adjust_comp_flags(), Lens::adjust_user_flags(), Lens::CF_aspect_ratio, Lens::CF_film_size, Lens::CF_focal_length, Lens::CF_fov, Lens::CF_mat, Lens::compute_aspect_ratio(), nassertv, Lens::resequence_fov_triad(), Lens::throw_change_event(), Lens::UF_aspect_ratio, Lens::UF_film_height, Lens::UF_film_width, Lens::UF_focal_length, Lens::UF_hfov, and Lens::UF_vfov.

Referenced by Lens::project(), and WindowFramework::set_one_sided_reverse().

void Lens::set_focal_length float  focal_length  )  [inherited]
 

Sets the focal length of the lens.

This may adjust the field-of-view correspondingly, and is an alternate way to specify field of view.

For certain kinds of lenses (e.g. OrthographicLens), the focal length has no meaning.

Definition at line 286 of file lens.cxx.

void Lens::set_fov const LVecBase2f &  fov  )  [inherited]
 

Sets the field of view of the lens in both dimensions.

This establishes both the field of view and the aspect ratio of the lens. This is one way to specify the field of view of a lens; set_focal_length() is another way.

For certain kinds of lenses (like OrthographicLens), the field of view has no meaning.

Definition at line 394 of file lens.cxx.

References default_near.

void Lens::set_fov float  hfov,
float  vfov
[inline, inherited]
 

Sets the field of view of the lens in both dimensions.

This establishes both the field of view and the aspect ratio of the lens. This is one way to specify the field of view of a lens; set_focal_length() is another way.

For certain kinds of lenses (like OrthoLens), the field of view has no meaning.

Definition at line 355 of file lens.I.

References Lens::_last_change.

void Lens::set_fov float  fov  )  [inherited]
 

Sets the horizontal field of view of the lens without changing the aspect ratio.

The vertical field of view is adjusted to maintain the same aspect ratio.

Definition at line 346 of file lens.cxx.

References Lens::_comp_flags, Lens::_fov, and Lens::CF_fov.

Referenced by Lens::get_coordinate_system().

void Lens::set_frustum_from_corners const LVecBase3f &  ul,
const LVecBase3f &  ur,
const LVecBase3f &  ll,
const LVecBase3f &  lr,
int  flags
[inherited]
 

Sets up the lens to use the frustum defined by the four indicated points.

This is most useful for a PerspectiveLens, but it may be called for other kinds of lenses as well.

The frustum will be rooted at the origin (or offset by iod_offset, or by whatever translation might have been specified in a previous call to set_view_mat).

It is legal for the four points not to be arranged in a rectangle; if this is the case, the frustum will be fitted as tightly as possible to cover all four points.

The flags parameter contains the union of one or more of the following bits to control the behavior of this function:

FC_roll - If this is included, the camera may be rotated so that its up vector is perpendicular to the top line. Otherwise, the standard up vector is used.

FC_camera_plane - This allows the camera plane to be adjusted to be as nearly perpendicular to the center of the frustum as possible. Without this bit, the orientation camera plane is defined by position of the four points (which should all be coplanar). With this bit, the camera plane is arbitarary, and may be chosen so that the four points do not themselves lie in the camera plane (but the points will still be within the frustum).

FC_off_axis - This allows the resulting frustum to be off-axis to get the tightest possible fit. Without this bit, the viewing axis will be centered within the frustum, but there may be more wasted space along the edges.

FC_aspect_ratio - This allows the frustum to be scaled non-proportionately in the vertical and horizontal dimensions, if necessary, to get a tighter fit. Without this bit, the current aspect ratio will be preserved.

FC_shear - This allows the frustum to be sheared, if necessary, to get the tightest possible fit. This may result in a parallelogram-based frustum, which will give a slanted appearance to the rendered image. Without this bit, the frustum will be rectangle-based.

In general, if 0 is passed in as the value for flags, the generated frustum will be a loose fit but sane; if -1 is passed in, it will be a tighter fit and possibly screwy.

Definition at line 860 of file lens.cxx.

void Lens::set_iod_offset float  offset  )  [inherited]
 

Sets the amount by which the lens is shifted to the right, perpendicular to its view vector and up vector.

This is normally used to shift one or both lens of a stereo camera to generate parallax. You can also simply set a complete transformation matrix (via set_view_mat()) that includes an arbitrary translation.

Definition at line 660 of file lens.cxx.

void Lens::set_near float  near_distance  )  [inline, inherited]
 

Defines the position of the near plane (or cylinder, sphere, whatever).

Points closer to the lens than this may not be rendered.

Definition at line 402 of file lens.I.

void Lens::set_near_far float  near_distance,
float  far_distance
[inline, inherited]
 

Simultaneously changes the near and far planes.

Definition at line 466 of file lens.I.

void Lens::set_view_hpr const LVecBase3f &  view_hpr  )  [inherited]
 

Sets the direction in which the lens is facing.

Normally, this is down the forward axis (usually the Y axis), but it may be rotated. This is only one way of specifying the rotation; you may also specify an explicit vector in which to look, or you may give a complete transformation matrix.

Definition at line 538 of file lens.cxx.

References Lens::_iod_offset.

void Lens::set_view_hpr float  h,
float  p,
float  r
[inline, inherited]
 

Sets the direction in which the lens is facing.

Normally, this is down the forward axis (usually the Y axis), but it may be rotated. This is only one way of specifying the rotation; you may also specify an explicit vector in which to look, or you may give a complete transformation matrix.

Definition at line 492 of file lens.I.

Referenced by Lens::get_film_offset().

void Lens::set_view_mat const LMatrix4f &  view_mat  )  [inherited]
 

Sets an arbitrary transformation on the lens.

This replaces the individual transformation components like set_view_hpr() or set_iod_offset().

Setting a transformation here will have a slightly different effect than putting one on the LensNode that contains this lens. In particular, lighting and other effects computations will still be performed on the lens in its untransformed (facing forward) position, but the actual projection matrix will be transformed by this matrix.

Definition at line 718 of file lens.cxx.

References Lens::FC_off_axis.

void Lens::set_view_vector const LVector3f &  view_vector,
const LVector3f &  up_vector
[inherited]
 

Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.

See also set_view_hpr().

Definition at line 580 of file lens.cxx.

void Lens::set_view_vector float  x,
float  y,
float  z,
float  i,
float  j,
float  k
[inline, inherited]
 

Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.

See also set_view_hpr().

Definition at line 512 of file lens.I.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

Does some easy checks to make sure that the reference count isn't completely bogus.

Definition at line 328 of file referenceCount.I.

References INLINE.

Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount().

void Lens::throw_change_event  )  [protected, inherited]
 

Throws the event associated with changing properties on this Lens, if any.

Definition at line 1263 of file lens.cxx.

Referenced by Lens::get_default_far(), Lens::get_view_hpr(), Lens::set_aspect_ratio(), Lens::set_change_event(), Lens::set_film_offset(), and Lens::set_film_size().

int ReferenceCount::unref  )  const [inline, inherited]
 

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 293 of file referenceCount.I.

References INLINE.

Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds().

void Lens::write ostream &  out,
int  indent_level = 0
const [virtual, inherited]
 

Reimplemented in MatrixLens, and OrthographicLens.

Definition at line 1248 of file lens.cxx.

References Lens::_aspect_ratio, Lens::_user_flags, Lens::get_film_size(), and Lens::UF_aspect_ratio.


Member Data Documentation

float Lens::_aspect_ratio [protected, inherited]
 

Definition at line 205 of file lens.h.

Referenced by Lens::Lens(), Lens::set_coordinate_system(), and Lens::write().

string Lens::_change_event [protected, inherited]
 

Definition at line 197 of file lens.h.

Referenced by Lens::Lens(), and Lens::project().

short Lens::_comp_flags [protected, inherited]
 

Definition at line 249 of file lens.h.

Referenced by Lens::get_film_size(), Lens::get_fov(), Lens::get_hfov(), Lens::is_linear(), Lens::Lens(), Lens::make_geometry(), Lens::output(), Lens::set_coordinate_system(), and Lens::set_fov().

CoordinateSystem Lens::_cs [protected, inherited]
 

Definition at line 199 of file lens.h.

Referenced by PerspectiveLens::is_linear(), and Lens::Lens().

const float Lens::_default_fov = 40.0f [static, protected, inherited]
 

Definition at line 34 of file lens.cxx.

Referenced by Lens::get_projection_mat_inv().

float Lens::_far_distance [protected, inherited]
 

Definition at line 206 of file lens.h.

Referenced by Lens::Lens(), Lens::set_coordinate_system(), and Lens::set_film_offset().

LMatrix4f Lens::_film_mat [protected, inherited]
 

Definition at line 212 of file lens.h.

Referenced by Lens::get_lens_mat_inv().

LMatrix4f Lens::_film_mat_inv [protected, inherited]
 

Definition at line 212 of file lens.h.

Referenced by Lens::is_linear().

LVector2f Lens::_film_offset [protected, inherited]
 

Definition at line 202 of file lens.h.

Referenced by Lens::get_change_event(), Lens::Lens(), and Lens::set_change_event().

LVecBase2f Lens::_film_size [protected, inherited]
 

Definition at line 201 of file lens.h.

Referenced by Lens::Lens(), and Lens::set_film_size().

char Lens::_film_size_seq [protected, inherited]
 

Definition at line 255 of file lens.h.

Referenced by Lens::set_coordinate_system(), and Lens::set_film_size().

float Lens::_focal_length [protected, inherited]
 

Definition at line 203 of file lens.h.

Referenced by Lens::get_film_size(), Lens::get_projection_mat_inv(), Lens::Lens(), Lens::output(), Lens::set_coordinate_system(), and Lens::set_film_size().

char Lens::_focal_length_seq [protected, inherited]
 

Definition at line 255 of file lens.h.

Referenced by Lens::set_coordinate_system(), and Lens::set_film_size().

LVecBase2f Lens::_fov [protected, inherited]
 

Definition at line 204 of file lens.h.

Referenced by Lens::get_projection_mat_inv(), Lens::Lens(), Lens::output(), Lens::set_coordinate_system(), and Lens::set_fov().

char Lens::_fov_seq [protected, inherited]
 

Definition at line 255 of file lens.h.

Referenced by Lens::set_coordinate_system(), and Lens::set_film_size().

PTA_Vertexf Lens::_geom_coords [protected, inherited]
 

Definition at line 257 of file lens.h.

Referenced by Lens::compute_fov().

float Lens::_iod_offset [protected, inherited]
 

Definition at line 210 of file lens.h.

Referenced by Lens::get_default_far(), Lens::set_coordinate_system(), and Lens::set_view_hpr().

UpdateSeq Lens::_last_change [protected, inherited]
 

Definition at line 198 of file lens.h.

Referenced by Lens::set_fov().

LMatrix4f Lens::_lens_mat [protected, inherited]
 

Definition at line 213 of file lens.h.

Referenced by Lens::get_view_hpr(), and Lens::make_geometry().

LMatrix4f Lens::_lens_mat_inv [protected, inherited]
 

Definition at line 213 of file lens.h.

float Lens::_near_distance [protected, inherited]
 

Definition at line 206 of file lens.h.

Referenced by Lens::Lens(), Lens::set_coordinate_system(), Lens::set_film_offset(), and Lens::set_film_size().

LMatrix4f Lens::_projection_mat [protected, inherited]
 

Definition at line 214 of file lens.h.

Referenced by MatrixLens::is_linear().

LMatrix4f Lens::_projection_mat_inv [protected, inherited]
 

Definition at line 214 of file lens.h.

TypeHandle FisheyeLens::_type_handle [static, private]
 

Reimplemented from Lens.

Definition at line 25 of file fisheyeLens.cxx.

LVector3f Lens::_up_vector [protected, inherited]
 

Definition at line 209 of file lens.h.

Referenced by Lens::set_aspect_ratio(), and Lens::set_coordinate_system().

short Lens::_user_flags [protected, inherited]
 

Definition at line 248 of file lens.h.

Referenced by Lens::get_projection_mat_inv(), Lens::Lens(), Lens::output(), Lens::set_coordinate_system(), and Lens::write().

LVecBase3f Lens::_view_hpr [protected, inherited]
 

Definition at line 208 of file lens.h.

Referenced by Lens::get_fov(), and Lens::set_coordinate_system().

LVector3f Lens::_view_vector [protected, inherited]
 

Definition at line 209 of file lens.h.

Referenced by Lens::set_aspect_ratio(), and Lens::set_coordinate_system().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:50:40 2003 for Panda by doxygen1.3