Implement Mat4x4 member docs
This commit is contained in:
@@ -375,15 +375,15 @@ namespace LinearAlgebra {
|
||||
return Vector3 { At(0, 0), At(1,1), At(2,2) };
|
||||
}
|
||||
|
||||
Vector4 Matrix4x4::WorldX() const {
|
||||
Vector3 Matrix4x4::WorldX() const {
|
||||
return GetColumn3(0);
|
||||
}
|
||||
|
||||
Vector4 Matrix4x4::WorldY() const {
|
||||
Vector3 Matrix4x4::WorldY() const {
|
||||
return GetColumn3(1);
|
||||
}
|
||||
|
||||
Vector4 Matrix4x4::WorldZ() const {
|
||||
Vector3 Matrix4x4::WorldZ() const {
|
||||
return GetColumn3(2);
|
||||
}
|
||||
|
||||
@@ -404,4 +404,19 @@ namespace LinearAlgebra {
|
||||
Vector3 Matrix4x4::operator*(const Vector3 &rhs) const { return this->Transform(rhs);}
|
||||
|
||||
Vector4 Matrix4x4::operator*(const Vector4 &rhs) const { return this->Transform(rhs);}
|
||||
|
||||
Vector4 Matrix4x4::Transform(float tx, float ty, float tz, float tw) const {
|
||||
return Transform({tx, ty, tz, tw});
|
||||
}
|
||||
|
||||
Vector4 Matrix4x4::Transform(const Vector4 &rhs) const {
|
||||
return Vector4(At(0, 0) * rhs.x + At(0, 1) * rhs.y + At(0, 2) * rhs.z + At(0, 3) * rhs.w,
|
||||
At(1, 0) * rhs.x + At(1, 1) * rhs.y + At(1, 2) * rhs.z + At(1, 3) * rhs.w,
|
||||
At(2, 0) * rhs.x + At(2, 1) * rhs.y + At(2, 2) * rhs.z + At(2, 3) * rhs.w,
|
||||
At(3, 0) * rhs.x + At(3, 1) * rhs.y + At(3, 2) * rhs.z + At(3, 3) * rhs.w);
|
||||
}
|
||||
|
||||
Vector3 Matrix4x4::GetTranslatePart() const {
|
||||
return GetColumn3(3);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user