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