15 #ifndef PERSPECTIVELENS_H
16 #define PERSPECTIVELENS_H
18 #include "pandabase.h"
30 INLINE PerspectiveLens(PN_stdfloat hfov, PN_stdfloat vfov);
33 INLINE PerspectiveLens(
const PerspectiveLens ©);
34 INLINE
void operator = (
const PerspectiveLens ©);
37 virtual PT(
Lens) make_copy()
const;
42 virtual bool do_extrude_depth(
const CData *cdata,
const LPoint3 &point2d,
44 virtual void do_compute_projection_mat(Lens::CData *lens_cdata);
46 virtual PN_stdfloat fov_to_film(PN_stdfloat fov, PN_stdfloat focal_length,
bool horiz)
const;
47 virtual PN_stdfloat fov_to_focal_length(PN_stdfloat fov, PN_stdfloat film_size,
bool horiz)
const;
48 virtual PN_stdfloat film_to_fov(PN_stdfloat film_size, PN_stdfloat focal_length,
bool horiz)
const;
51 static void register_with_read_factory();
58 return get_class_type();
60 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
64 static void init_type() {
66 register_type(_type_handle,
"PerspectiveLens",
67 Lens::get_class_type());
74 #include "perspectiveLens.I"
A base class for any number of different kinds of lenses, linear and otherwise.
Base class for objects that can be written to and read from Bam files.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
virtual bool is_perspective() const
Returns true if the lens represents a perspective projection (i.e.
virtual bool is_linear() const
Returns true if the lens represents a linear projection (e.g.
A perspective-type lens: a normal camera.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
TypeHandle is the identifier used to differentiate C++ class types.