added GetColumn3,GetColumn4,SetColumn

This commit is contained in:
granzuglia 2009-01-15 13:42:30 +00:00
parent ab8fe0462d
commit 72eb2f753e
1 changed files with 20 additions and 0 deletions

View File

@ -253,6 +253,8 @@ public:
void SetDiagonal(const T k);
Matrix44 &SetScale(const T sx, const T sy, const T sz);
Matrix44 &SetScale(const Point3<T> &t);
Matrix44<T>& SetColumn(const unsigned int ii,const Point4<T> &t);
Matrix44<T>& SetColumn(const unsigned int ii,const Point3<T> &t);
Matrix44 &SetTranslate(const Point3<T> &t);
Matrix44 &SetTranslate(const T sx, const T sy, const T sz);
Matrix44 &SetShearXY(const T sz);
@ -567,6 +569,24 @@ template <class T> Matrix44<T> &Matrix44<T>::SetTranslate(const T tx, const T ty
return *this;
}
template <class T> Matrix44<T> &Matrix44<T>::SetColumn(const unsigned int ii,const Point3<T> &t) {
assert((ii >= 0) && (ii < 4));
ElementAt(0, ii) = t.X();
ElementAt(1, ii) = t.Y();
ElementAt(2, ii) = t.Z();
return *this;
}
template <class T> Matrix44<T> &Matrix44<T>::SetColumn(const unsigned int ii,const Point4<T> &t) {
assert((ii >= 0) && (ii < 4));
ElementAt(0, ii) = t.X();
ElementAt(1, ii) = t.Y();
ElementAt(2, ii) = t.Z();
ElementAt(3, ii) = t.W();
return *this;
}
template <class T> Matrix44<T> &Matrix44<T>::SetRotateDeg(T AngleDeg, const Point3<T> & axis) {
return SetRotateRad(math::ToRad(AngleDeg),axis);
}