Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::OrientedBoundingBox Class Reference

An oriented bounding box represents a bounding box that has been transformed by a transformation matrix. More...

#include <kanzi/core/math/oriented_bounding_box.hpp>

Public Types

enum  CornerIndex {
  BackBottomLeft, BackTopLeft, BackTopRight, BackBottomRight,
  FrontBottomLeft, FrontTopLeft, FrontTopRight, FrontBottomRight
}
 Indices for accessing corners with the getCornerPoint function. More...
 

Public Member Functions

Vector3 getCornerPoint (size_t index) const
 Gets a corner pointer of the oriented bounding box. More...
 
 OrientedBoundingBox (const Matrix4x4 &transformation, const Box &aabb)
 Creates an oriented bounding box from an axis-aligned bounding box. More...
 

Detailed Description

An oriented bounding box represents a bounding box that has been transformed by a transformation matrix.

It stores the transformed (world space) corner points of a bounding box.

Member Enumeration Documentation

Indices for accessing corners with the getCornerPoint function.

Enumerator
BackBottomLeft 

Index for the bottom left back corner.

BackTopLeft 

Index for the top left back corner.

BackTopRight 

Index for the top right back corner.

BackBottomRight 

Index for the bottom right back corner.

FrontBottomLeft 

Index for the bottom left front corner.

FrontTopLeft 

Index for the top left front corner.

FrontTopRight 

Index for the top right front corner.

FrontBottomRight 

Index for the bottom right front corner.

Constructor & Destructor Documentation

kanzi::OrientedBoundingBox::OrientedBoundingBox ( const Matrix4x4 transformation,
const Box aabb 
)
explicit

Creates an oriented bounding box from an axis-aligned bounding box.

Parameters
transformationThe transformation matrix.
aabbThe axis-aligned bounding box.

Member Function Documentation

Vector3 kanzi::OrientedBoundingBox::getCornerPoint ( size_t  index) const
inline

Gets a corner pointer of the oriented bounding box.

Parameters
indexIndex of the corner.
Returns
The corner point.

The documentation for this class was generated from the following file: