Wraith
0.1.5
Basic 3D game engine in C++
|
Provides a few math tools from MathTools namespace that user can use. A few tools include getting scale and translation from a. More...
Functions | |
bool | MathTools::Intersect (const CollisionVolumeBSphere &BSphere_1, const CollisionVolumeBSphere &BSphere_2) |
Test intersection between two BSpheres. More... | |
bool | MathTools::Intersect (const CollisionVolumeBSphere &BSphere, const CollisionVolumeAABB &AABB) |
Test intersection between BSphere and AABB. More... | |
bool | MathTools::Intersect (const CollisionVolumeBSphere &BSphere, const CollisionVolumeOBB &OBB) |
Test intersection between BSphere and OBB. More... | |
bool | MathTools::Intersect (const CollisionVolumeBSphere &BSphere, const CollisionVolumeOctree &Octree) |
Test intersection between BSphere and Octree. More... | |
bool | MathTools::Intersect (const CollisionVolumeAABB &AABB_1, const CollisionVolumeAABB &AABB_2) |
Test intersection between two AABBs. More... | |
bool | MathTools::Intersect (const CollisionVolumeAABB &AABB, const CollisionVolumeOBB &OBB) |
Test intersection between AABB and OBB. More... | |
bool | MathTools::Intersect (const CollisionVolumeAABB &AABB, const CollisionVolumeOctree &Octree) |
Test intersection between AABB and Octree. More... | |
bool | MathTools::Intersect (const CollisionVolumeOBB &OBB_1, const CollisionVolumeOBB &OBB_2) |
Test intersection between two OBBs. More... | |
bool | MathTools::Intersect (const CollisionVolumeOBB &OBB, const CollisionVolumeOctree &Octree) |
Test intersection between an OBB and an Octree. More... | |
bool | MathTools::Intersect (const CollisionVolumeOctree &Octree_1, const CollisionVolumeOctree &Octree_2) |
Test intersection between two Octrees. More... | |
bool | MathTools::Intersect (const CollisionVolumeAABB &AABB, const Vect &point) |
Test intersection between an AABB and a point. More... | |
bool | MathTools::Intersect (const CollisionVolumeOBB &OBB, const Vect &point) |
Test intersection between an OBB and a point. More... | |
bool | MathTools::Intersect (const CollisionVolumeOBB &OBB, const Triangle &triangle) |
Test intersection between an OBB and a Triangle. More... | |
Matrix | MathTools::ExtractScaleMatrix (const Matrix &worldMatrix) |
Extracts scale matrix. More... | |
Vect | MathTools::ExtractScaleXYZ (const Matrix &worldMatrix) |
Extracts XYZ scale of a world matrix. More... | |
float | MathTools::ExtractScaleX (const Matrix &worldMatrix) |
Extracts X-scale from world matrix. More... | |
float | MathTools::ExtractScaleY (const Matrix &worldMatrix) |
Extracts Y scale from the world matrix. More... | |
float | MathTools::ExtractScaleZ (const Matrix &worldMatrix) |
Extracts Z scale from world matrix. More... | |
Matrix | MathTools::ExtractTranslationMatrix (const Matrix &worldMatrix) |
Extracts translation matrix from world matrix. More... | |
Vect | MathTools::ExtractTranslationXYZ (const Matrix &worldMatrix) |
Extract translation vector from world matrix. More... | |
Matrix | MathTools::RotationFromTowards (const Vect ¤t, const Vect &target) |
Computes rotation matrix to rotate vector from current to target. More... | |
Vect | MathTools::MultiplyComponents (const Vect &vect_1, const Vect &vect_2) |
Multiplies two vectors by each component (x1 * x2, y1 * y2, z1 * z2). More... | |
Vect | MathTools::Min (const Vect &vect_1, const Vect &vect_2) |
Constructs Vect using the mininum values of two Vects. More... | |
Vect | MathTools::Max (const Vect &vect_1, const Vect &vect_2) |
Constructs Vect using the maximum values of two Vects. More... | |
float | MathTools::power (float base, int exponent) |
raises base to the power of integers. More... | |
bool | MathTools::IsInRange (const Vect &vect, const Vect &vect_1, const Vect &vect_2) |
Determines if a Vect is in between two Vect values More... | |
bool | MathTools::IsLessThan (const Vect &vect_1, const Vect &vect_2) |
Determines if a Vect is less than another Vect. More... | |
bool | MathTools::IsGreaterThan (const Vect &vect_1, const Vect &vect_2) |
Determines if a Vect is greater than another Vect. More... | |
bool | MathTools::DoIntervalsOverlap (const Interval &interval_1, const Interval &interval_2) |
Determines if two intervals overlap More... | |
Provides a few math tools from MathTools namespace that user can use. A few tools include getting scale and translation from a.
Determines if two intervals overlap
Uses MathTools::Interval struct testing intervals
interval_1 | An interval. |
interval_2 | An interval. |
Matrix MathTools::ExtractScaleMatrix | ( | const Matrix & | worldMatrix | ) |
Extracts scale matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
float MathTools::ExtractScaleX | ( | const Matrix & | worldMatrix | ) |
Extracts X-scale from world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
Vect MathTools::ExtractScaleXYZ | ( | const Matrix & | worldMatrix | ) |
Extracts XYZ scale of a world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
float MathTools::ExtractScaleY | ( | const Matrix & | worldMatrix | ) |
Extracts Y scale from the world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
float MathTools::ExtractScaleZ | ( | const Matrix & | worldMatrix | ) |
Extracts Z scale from world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
Matrix MathTools::ExtractTranslationMatrix | ( | const Matrix & | worldMatrix | ) |
Extracts translation matrix from world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
Vect MathTools::ExtractTranslationXYZ | ( | const Matrix & | worldMatrix | ) |
Extract translation vector from world matrix.
assumes matrix is a world matrix composed of translation, rotation and scale.
worldMatrix | The world matrix. |
bool MathTools::Intersect | ( | const CollisionVolumeAABB & | AABB, |
const CollisionVolumeOBB & | OBB | ||
) |
Test intersection between AABB and OBB.
AABB | An AABB. |
OBB | An OBB. |
bool MathTools::Intersect | ( | const CollisionVolumeAABB & | AABB, |
const CollisionVolumeOctree & | Octree | ||
) |
Test intersection between AABB and Octree.
AABB | An AABB. |
Octree | An Octree. |
bool MathTools::Intersect | ( | const CollisionVolumeAABB & | AABB, |
const Vect & | point | ||
) |
Test intersection between an AABB and a point.
AABB | An AABB. |
point | A point. |
bool MathTools::Intersect | ( | const CollisionVolumeAABB & | AABB_1, |
const CollisionVolumeAABB & | AABB_2 | ||
) |
Test intersection between two AABBs.
AABB_1 | An AABB. |
AABB_2 | An AABB. |
bool MathTools::Intersect | ( | const CollisionVolumeBSphere & | BSphere, |
const CollisionVolumeAABB & | AABB | ||
) |
Test intersection between BSphere and AABB.
BSphere | A BSphere. |
AABB | An AABB. |
bool MathTools::Intersect | ( | const CollisionVolumeBSphere & | BSphere, |
const CollisionVolumeOBB & | OBB | ||
) |
Test intersection between BSphere and OBB.
BSphere | A BSphere. |
OBB | An OBB. |
bool MathTools::Intersect | ( | const CollisionVolumeBSphere & | BSphere, |
const CollisionVolumeOctree & | Octree | ||
) |
Test intersection between BSphere and Octree.
BSphere | A BSphere. |
Octree | An Octree. |
bool MathTools::Intersect | ( | const CollisionVolumeBSphere & | BSphere_1, |
const CollisionVolumeBSphere & | BSphere_2 | ||
) |
Test intersection between two BSpheres.
BSphere_1 | The first sphere. |
BSphere_2 | The second sphere. |
bool MathTools::Intersect | ( | const CollisionVolumeOBB & | OBB, |
const CollisionVolumeOctree & | Octree | ||
) |
Test intersection between an OBB and an Octree.
OBB | An OBB. |
Octree | An Octree. |
bool MathTools::Intersect | ( | const CollisionVolumeOBB & | OBB, |
const Triangle & | triangle | ||
) |
bool MathTools::Intersect | ( | const CollisionVolumeOBB & | OBB, |
const Vect & | point | ||
) |
Test intersection between an OBB and a point.
OBB | An OBB. |
point | A point. |
bool MathTools::Intersect | ( | const CollisionVolumeOBB & | OBB_1, |
const CollisionVolumeOBB & | OBB_2 | ||
) |
Test intersection between two OBBs.
OBB_1 | An OBB. |
OBB_2 | An OBB. |
bool MathTools::Intersect | ( | const CollisionVolumeOctree & | Octree_1, |
const CollisionVolumeOctree & | Octree_2 | ||
) |
Test intersection between two Octrees.
Octree_1 | An Octree. |
Octree_2 | An Octree. |
bool MathTools::IsGreaterThan | ( | const Vect & | vect_1, |
const Vect & | vect_2 | ||
) |
Determines if a Vect is greater than another Vect.
vect_1 | A Vect. |
vect_2 | A Vect. |
bool MathTools::IsInRange | ( | const Vect & | vect, |
const Vect & | vect_1, | ||
const Vect & | vect_2 | ||
) |
Determines if a Vect is in between two Vect values
vect | A Vect. |
vect_1 | A Vect. |
vect_2 | A Vect. |
bool MathTools::IsLessThan | ( | const Vect & | vect_1, |
const Vect & | vect_2 | ||
) |
Determines if a Vect is less than another Vect.
vect_1 | A Vect. |
vect_2 | A Vect. |
Vect MathTools::Max | ( | const Vect & | vect_1, |
const Vect & | vect_2 | ||
) |
Constructs Vect using the maximum values of two Vects.
vect_1 | A Vect. |
vect_2 | A Vect. |
Vect MathTools::Min | ( | const Vect & | vect_1, |
const Vect & | vect_2 | ||
) |
Constructs Vect using the mininum values of two Vects.
vect_1 | A Vect. |
vect_2 | A Vect. |
Vect MathTools::MultiplyComponents | ( | const Vect & | vect_1, |
const Vect & | vect_2 | ||
) |
Multiplies two vectors by each component (x1 * x2, y1 * y2, z1 * z2).
vect_1 | A Vect. |
vect_2 | A Vect. |
float MathTools::power | ( | float | base, |
int | exponent | ||
) |
raises base to the power of integers.
base | The base. |
exponent | An interger exponent. |
Matrix MathTools::RotationFromTowards | ( | const Vect & | current, |
const Vect & | target | ||
) |
Computes rotation matrix to rotate vector from current to target.
.
current | A Vect. |
target | A Vect. |