00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef VRS_AXONOMETRICLOOKAT_H
00019 #define VRS_AXONOMETRICLOOKAT_H
00020
00021
00022
00023
00024 #include <vrs/bounds.h>
00025 #include <vrs/transform.h>
00026
00027
00028 namespace VRS
00029 {
00030 class VRS_CORE_API AxonometricLookAt : public VRS::Transform
00031 {
00032 public:
00033
00034 enum AxonometricType
00035 {
00036 Custom = 0,
00037 Isometric30 = 1,
00038 Isometric12 = 2,
00039 Military = 3,
00040 Dimetric427 = 4,
00041 ChinesePerspective = 5
00042 };
00043 VRS_SERIALIZABLE_CLASS_ENUM(AxonometricType);
00044
00045 public:
00046
00047 AxonometricLookAt(
00048 AxonometricType type = Isometric30,
00049 const VRS::Vector& position = VRS::Vector::origin,
00050 double zoom = 1.0,
00051 const VRS::Matrix& rotation = VRS::Matrix::identity
00052 );
00053
00054 AxonometricLookAt(
00055 double verticalAngle,
00056 double horizontalAngle,
00057 const VRS::Vector& position = VRS::Vector::origin,
00058 double zoom = 1.0,
00059 const VRS::Matrix& rotation = VRS::Matrix::identity
00060 );
00061
00062 void setAxonometricType(AxonometricType type);
00063 inline AxonometricType getAxonometricType(void) const
00064 {
00065 return this->type_;
00066 }
00067
00068 void setVerticalAngle(double angle);
00069 inline double getVerticalAngle(void) const
00070 {
00071 return this->verticalAngle_;
00072 }
00073
00074 void setHorizontalAngle(double angle);
00075 inline double getHorizontalAngle(void) const
00076 {
00077 return this->horizontalAngle_;
00078 }
00079
00080 void setPosition(const VRS::Vector& position);
00081 inline const VRS::Vector& getPosition(void) const
00082 {
00083 return this->position_;
00084 }
00085
00086 void setZoom(double zoom);
00087 inline double getZoom(void) const
00088 {
00089 return this->zoom_;
00090 }
00091
00092 void setRotation(const VRS::Matrix& rotation);
00093 inline const VRS::Matrix& getRotation(void) const
00094 {
00095 return this->rotation_;
00096 }
00097
00098 virtual const Matrix& matrix(Engine* engine = 0) const;
00099
00100 VRS_TYPEINFO(AxonometricLookAt, Transform);
00101 VRS_SERIALIZABLE(AxonometricLookAt);
00102
00103 private:
00104
00105
00106 double verticalAngle_;
00107 double horizontalAngle_;
00108 VRS::Matrix rotation_;
00109 VRS::Vector position_;
00110 double zoom_;
00111
00112 AxonometricType type_;
00113
00114 mutable bool rebuild_;
00115 mutable Matrix axonometric_;
00116
00117 };
00118
00119 };
00120
00121 #endif //VRS_AXONOMETRICLOOKAT_H