Description
Functions
const corner_t * | getCornerIndices(const side_t side) Return the indices of the corners for the requested side . |
const Vec3f & | getNormal(const side_t side) Return the normal for the requested side . |
std::vector< Box_f > | splitUpBox(const Box_f & box, unsigned int partsX, unsigned int partsY, unsigned int partsZ) |
std::vector< Box_f > | splitBoxCubeLike(const Box_f & box) |
Box_f | getTransformedBox(const Box_f & box, const Matrix4x4f & matrix) |
template< typename value_t > | |
_Vec2 < value_t > | createOrthogonal(const _Vec2 < value_t > & vector) |
template< typename value_t > | |
_Vec3 < value_t > | createOrthogonal(const _Vec3 < value_t > & vector) |
Documentation
function
Geometry::Helper::getCornerIndices
public |
const corner_t * getCornerIndices( | const side_t | side ) |
Return the indices of the corners for the requestedside
.
Defined in Geometry/BoxHelper.h:32
function
Geometry::Helper::getNormal
public |
const Vec3f & getNormal( | const side_t | side ) |
Return the normal for the requestedside
.
Defined in Geometry/BoxHelper.h:35
function
Geometry::Helper::splitUpBox
public |
std::vector< Box_f > splitUpBox( | const Box_f & | box, |
unsigned int | partsX, | |
unsigned int | partsY, | |
unsigned int | partsZ | |
) |
Create new boxes by splitting up a box along x/y/z axis.
Parameters
- box
- Box that will be used for splitting
- partsX
- number of resulting boxes along x-axis
- partsY
- number of resulting boxes along y-axis
- partsZ
- number of resulting boxes along z-axis
Returns
Container with the new boxes
Defined in Geometry/BoxHelper.h:46
function
Geometry::Helper::splitBoxCubeLike
public |
std::vector< Box_f > splitBoxCubeLike( | const Box_f & | box ) |
Split up a box once along up to three axis such that the resulting boxes are getting cube-like (when repeating this splitting). A box is cube-like if extentMax / extentMin <= sqrt(2).
Parameters
- box
- Box that will be used for splitting
Returns
Container with the new boxes
Defined in Geometry/BoxHelper.h:56
function
Geometry::Helper::getTransformedBox
public |
Box_f getTransformedBox( | const Box_f & | box, |
const Matrix4x4f & | matrix | |
) |
Take a box and transform it by applying a transformation matrix to the corners. The resulting box will be axis-aligned.
Parameters
- box
- Box whose corners will be used
- matrix
- Transformation matrix
Returns
Axis-aligned box including the transformed corners
Defined in Geometry/BoxHelper.h:66
function
Geometry::Helper::createOrthogonal
public |
template< typename value_t > | ||
_Vec2 < value_t > createOrthogonal( | const _Vec2 < value_t > & | vector ) |
Return a vector that is orthogonal to a given vector.
Parameters
- vector
- Any two-dimensional input vector
Returns
Vector that is orthogonal to and has the same length as the input vector
Author: Benjamin Eikel
Date: 2013-03-05
Defined in Geometry/VecHelper.h:29
function
Geometry::Helper::createOrthogonal
public |
template< typename value_t > | ||
_Vec3 < value_t > createOrthogonal( | const _Vec3 < value_t > & | vector ) |
Return a vector that is orthogonal to a given vector.
Based on the article: David Eberly: Computing Orthonormal Sets in 2D, 3D, and 4D.http://www.geometrictools.com/Documentation/OrthonormalSets.pdf
Parameters
- vector
- Normalized three-dimensional input vector
Returns
Vector that is orthogonal to the input vector and has length one
Author: Benjamin Eikel
Date: 2013-03-05
Defined in Geometry/VecHelper.h:46