Implement M3x3::SetColumn
This commit is contained in:
@@ -5,12 +5,6 @@
|
|||||||
|
|
||||||
namespace LinearAlgebra {
|
namespace LinearAlgebra {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// A 4-by-4 matrix for affine transformations and perspective projections of 3D geometry.
|
/// A 4-by-4 matrix for affine transformations and perspective projections of 3D geometry.
|
||||||
/* This matrix can represent the most generic form of transformations for 3D objects,
|
/* This matrix can represent the most generic form of transformations for 3D objects,
|
||||||
* including perspective projections, which a 4-by-3 cannot store,
|
* including perspective projections, which a 4-by-3 cannot store,
|
||||||
@@ -18,7 +12,7 @@ namespace LinearAlgebra {
|
|||||||
* The elements of this matrix are
|
* The elements of this matrix are
|
||||||
* m_00, m_01, m_02, m_03
|
* m_00, m_01, m_02, m_03
|
||||||
* m_10, m_11, m_12, m_13
|
* m_10, m_11, m_12, m_13
|
||||||
* m_20, m_21, m_22, xm_23,
|
* m_20, m_21, m_22, am_23,
|
||||||
* m_30, m_31, m_32, m_33
|
* m_30, m_31, m_32, m_33
|
||||||
*
|
*
|
||||||
* The element m_yx is the value on the row y and column x.
|
* The element m_yx is the value on the row y and column x.
|
||||||
|
@@ -228,6 +228,13 @@ namespace LinearAlgebra {
|
|||||||
elems[i][2] = vec.z;
|
elems[i][2] = vec.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Matrix3x3::SetColumn(int i, const Vector3& vec)
|
||||||
|
{
|
||||||
|
elems[0][i] = vec.x;
|
||||||
|
elems[1][i] = vec.y;
|
||||||
|
elems[2][i] = vec.z;
|
||||||
|
}
|
||||||
|
|
||||||
Matrix3x3
|
Matrix3x3
|
||||||
Matrix3x3::LookAt(const Vector3 &forward, const Vector3 &target, const Vector3 &localUp, const Vector3 &worldUp) {
|
Matrix3x3::LookAt(const Vector3 &forward, const Vector3 &target, const Vector3 &localUp, const Vector3 &worldUp) {
|
||||||
// User must input proper normalized input direction vectors
|
// User must input proper normalized input direction vectors
|
||||||
|
Reference in New Issue
Block a user