00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _TRANSFORM_H_
00014 #define _TRANSFORM_H_
00015
00016 #include "Matrix.hh"
00017
00018 namespace Math {
00019
00030 class Transform : public Matrix {
00031 public:
00033 enum Direction { ROT_X, ROT_Y, ROT_Z };
00034
00036 Transform();
00037
00039 Transform(const Matrix &M);
00040
00043 Transform(Double x, Double y, Double z);
00044
00046 Transform(Direction D, Double Angle);
00047
00048 void RotateX(Double Angle);
00049 void RotateY(Double Angle);
00050 void RotateZ(Double Angle);
00053 void Translate(Double x, Double y, Double z);
00054
00056 void Resize(Double x, Double y, Double z);
00057
00058 };
00059
00061 class Rotate {
00062 public:
00064 inline static Transform X(Double Angle) {
00065 return Transform(Transform::ROT_X, Angle);
00066 }
00067
00069 inline static Transform Y(Double Angle) {
00070 return Transform(Transform::ROT_Y, Angle);
00071 }
00072
00074 inline static Transform Z(Double Angle) {
00075 return Transform(Transform::ROT_Z, Angle);
00076 }
00077 };
00078
00083 class Translate : public Transform {
00084 public:
00086 Translate(Double x, Double y, Double z) : Transform(x, y, z) {};
00087 };
00088
00093 class Scale : public Transform {
00094 public:
00096 Scale(Double x, Double y, Double z) : Transform()
00097 {
00098 Resize(x, y, z);
00099 };
00100 };
00101
00102 };
00103
00104 #endif