Skip to content

Commit 9598888

Browse files
committed
- added Matrix setTranslationTransposed
1 parent bd89004 commit 9598888

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

math/Matrix.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ struct TMat4 // Matrix4x4
175175

176176
void setRotation(const TVec3D<T> &v);
177177
void setTranslation(const TVec3D<T> &v);
178+
void setTranslationTransposed(const TVec3D<T>& v);
179+
178180
void translate(const TVec3D<T> &v);
179181

180182
const TVec3D<T>& getTranslationComponent() const;

math/Matrix.inl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ inline void TMat4<T>::setTranslation(const TVec3D<T> &v)
172172
rows[3][2] = v.z;
173173
}
174174

175+
template <typename T>
176+
inline void TMat4<T>::setTranslationTransposed(const TVec3D<T>& v)
177+
{
178+
rows[0][3] = v.x;
179+
rows[1][3] = v.y;
180+
rows[2][3] = v.z;
181+
}
182+
175183
template <typename T>
176184
inline void TMat4<T>::setRotation(const TVec3D<T> &v)
177185
{

0 commit comments

Comments
 (0)