Kaim::OrientedBox2d Class Reference

Kaim::OrientedBox2d Class Reference

#include <orientedbox2d.h>

Class Description

OrientedBox2d is a 3d box with rotation constrained to be along Z.

+---------------+
| |
m_left_length | |
| |
m_corner---------------+----> m_forward_dir2d
<--------------->
m_forward_length

Constructors

 OrientedBox2d ()
 Construct a zero size OrientedBox2d. More...
 
 OrientedBox2d (const Vec3f &corner, const Vec2f &forward, KyFloat32 forward_length, KyFloat32 left_length, KyFloat32 height)
 Construct OrientedBox2d. forward will be normalized. More...
 

Main API Functions

bool IsValid ()
 
void Clear ()
 
void Set (const Vec3f &corner, const Vec2f &forward_dir2d, KyFloat32 forward_length, KyFloat32 left_length, KyFloat32 height)
 Init OrientedBox2d. dir2d must be normalized. More...
 
void InitAs2dInflatedSegment (const Vec3f &start, const Vec3f &dest, KyFloat32 radius)
 Creates a new OrientedBox2d that will be an inflate of the segment going from start to dest of radius Object created using this constructor. More...
 
bool IsInside2d (const Vec3f &pos)
 
Box3f ComputeAABB () const
 

Public Data Members

Vec3f m_corner
 
Vec2f m_forward_dir2d
 
KyFloat32 m_forward_length
 
KyFloat32 m_left_length
 
KyFloat32 m_height
 

Constructor & Destructor Documentation

Kaim::OrientedBox2d::OrientedBox2d ( )
inline

Construct a zero size OrientedBox2d.

Kaim::OrientedBox2d::OrientedBox2d ( const Vec3f corner,
const Vec2f forward,
KyFloat32  forward_length,
KyFloat32  left_length,
KyFloat32  height 
)
inline

Construct OrientedBox2d. forward will be normalized.

Member Function Documentation

void Kaim::OrientedBox2d::InitAs2dInflatedSegment ( const Vec3f start,
const Vec3f dest,
KyFloat32  radius 
)
inline

Creates a new OrientedBox2d that will be an inflate of the segment going from start to dest of radius Object created using this constructor.

void Kaim::OrientedBox2d::Set ( const Vec3f corner,
const Vec2f forward_dir2d,
KyFloat32  forward_length,
KyFloat32  left_length,
KyFloat32  height 
)
inline

Init OrientedBox2d. dir2d must be normalized.


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