00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CYLINDRICALLENS_H
00016 #define CYLINDRICALLENS_H
00017
00018 #include "pandabase.h"
00019
00020 #include "lens.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 class EXPCL_PANDAFX CylindricalLens : public Lens {
00041 PUBLISHED:
00042 INLINE CylindricalLens();
00043
00044 public:
00045 INLINE CylindricalLens(const CylindricalLens ©);
00046 INLINE void operator = (const CylindricalLens ©);
00047
00048 public:
00049 virtual PT(Lens) make_copy() const;
00050
00051 protected:
00052 virtual bool do_extrude(const Lens::CData *lens_cdata, const LPoint3 &point2d,
00053 LPoint3 &near_point, LPoint3 &far_point) const;
00054 virtual bool do_extrude_vec(const Lens::CData *lens_cdata, const LPoint3 &point2d,
00055 LVector3 &vec) const;
00056 virtual bool do_project(const Lens::CData *lens_cdata,
00057 const LPoint3 &point3d, LPoint3 &point2d) const;
00058
00059 virtual PN_stdfloat fov_to_film(PN_stdfloat fov, PN_stdfloat focal_length, bool horiz) const;
00060 virtual PN_stdfloat fov_to_focal_length(PN_stdfloat fov, PN_stdfloat film_size, bool horiz) const;
00061 virtual PN_stdfloat film_to_fov(PN_stdfloat film_size, PN_stdfloat focal_length, bool horiz) const;
00062
00063 public:
00064 virtual TypeHandle get_type() const {
00065 return get_class_type();
00066 }
00067 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00068 static TypeHandle get_class_type() {
00069 return _type_handle;
00070 }
00071 static void init_type() {
00072 Lens::init_type();
00073 register_type(_type_handle, "CylindricalLens",
00074 Lens::get_class_type());
00075 }
00076
00077 private:
00078 static TypeHandle _type_handle;
00079 };
00080
00081 #include "cylindricalLens.I"
00082
00083 #endif