Jim
This commit is contained in:
@@ -77,4 +77,41 @@ namespace LinearAlgebra {
|
||||
Matrix4x4::Matrix4x4(const Quaternion &orientation) {
|
||||
|
||||
}
|
||||
|
||||
void Matrix4x4::SetTranslatePart(float translateX, float translateY, float translateZ) {
|
||||
elems[0][3] = translateX;
|
||||
elems[1][3] = translateY;
|
||||
elems[2][3] = translateZ;
|
||||
}
|
||||
|
||||
void Matrix4x4::SetTranslatePart(const Vector3 &offset) {
|
||||
elems[0][3] = offset.x;
|
||||
elems[1][3] = offset.y;
|
||||
elems[2][3] = offset.z;
|
||||
}
|
||||
|
||||
void Matrix4x4::SetRotatePart(const Quaternion &q) {
|
||||
SetMatrixRotatePart(*this, q);
|
||||
}
|
||||
|
||||
void Matrix4x4::SetRow(int row, const Vector3 &rowVector, float m_r3) {
|
||||
SetRow(row, rowVector.x, rowVector.y, rowVector.z, m_r3);
|
||||
}
|
||||
|
||||
void Matrix4x4::SetRow(int row, const Vector4 &rowVector) {
|
||||
SetRow(row, rowVector.x, rowVector.y, rowVector.z, rowVector.w);
|
||||
}
|
||||
|
||||
void Matrix4x4::SetRow(int row, float m_r0, float m_r1, float m_r2, float m_r3) {
|
||||
elems[row][0] = m_r0;
|
||||
elems[row][1] = m_r1;
|
||||
elems[row][2] = m_r2;
|
||||
elems[row][3] = m_r3;
|
||||
}
|
||||
|
||||
Matrix4x4::Matrix4x4(const Quaternion &orientation, const Vector3 &translation) {
|
||||
SetRotatePart(orientation);
|
||||
SetTranslatePart(translation);
|
||||
SetRow(3, 0, 0, 0, 1);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user