soo is a simple 3D math library that provides essential features for game programming.
Features
- 3D Vector
double dotProduct = vec1.
dot(vec2);
3D vector class.
Definition vector3.h:22
T dot(const Vector3 &rhs) const noexcept
Definition vector3.h:190
void normalize()
Definition vector3.h:165
Vector3 cross(const Vector3 &rhs) const noexcept
Definition vector3.h:198
Vector3< double > Vector3d
Definition vector3.h:228
- Arbitrary-size Matrix
{1, 2, 3},
{4, 5, 6}
};
{7, 8},
{9, 10},
{11, 12}
};
auto mult = mat1 * mat2;
soo::Matrix4d mat3{
{0, -1, 0, 10},
{1, 0, 0, 20},
{0, 0, 1, 30},
{0, 0, 0, 1}
};
auto transformed = mat3 * vec1;
Matrix class.
Definition matrix.h:21
Matrix< T, Col, Row > transpose() const noexcept
Definition matrix.h:265
Usage
- Copy include/soo directory to your project, then add its path to the include path.
- include header as below:
Refer documentation for the implementation details.