00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00036 struct PG_API pgMat
00037 {
00038 static const pgMat ZERO;
00039 static const pgMat UNIT;
00040
00041 pgVec x_axis;
00042 pgVec y_axis;
00043 pgVec z_axis;
00044 pgVec trans;
00045
00049 pgMat();
00050
00058 pgMat(const pgVec& x_axis_, const pgVec& y_axis_, const pgVec& z_axis_, const pgVec& trans_);
00059
00067 void set(const pgVec& x_axis_, const pgVec& y_axis_, const pgVec& z_axis_, const pgVec& trans_);
00068
00073 bool isUnit() const;
00074
00080 pgMat rotateX_r32(r32 deg) const;
00081
00087 pgMat rotateY_r32(r32 deg) const;
00088
00094 pgMat rotateZ_r32(r32 deg) const;
00095
00102 pgMat rotateX_s32(s32 deg) const;
00103
00110 pgMat rotateY_s32(s32 deg) const;
00111
00118 pgMat rotateZ_s32(s32 deg) const;
00119
00127 pgMat scale(r32 x_scale, r32 y_scale, r32 z_scale = 1.0f) const;
00128
00136 pgMat translate(r32 x, r32 y, r32 z = 0.0f) const;
00137
00144 pgMat slerp(const pgMat& to, r32 ratio) const;
00145
00153 pgMat slerp_noTrans(const pgMat& to, r32 ratio) const;
00154
00159 pgMat orthonormal() const;
00160
00166 pgMat toLocalOf(const pgMat& mat) const;
00167
00173 pgMat toGlobalFrom(const pgMat& mat) const;
00174
00181 pgMat toLocalOf_noTrans(const pgMat& mat) const;
00182
00189 pgMat toGlobalFrom_noTrans(const pgMat& mat) const;
00190
00198 static pgMat lookAt(const pgVec& from, const pgVec& to, const pgVec& up);
00199
00204 void toR32x16(r32* r32x16) const;
00205
00211 static pgMat fromR32x16(const r32* r32x16);
00212
00219 static void mulR32x16(r32* res_r32x16, const r32* lhs_r32x16, const r32* rhs_r32x16);
00220 };