NGL  6.5
The NCCA Graphics Library
ngl::AABB Class Reference

#include <AABB.h>

+ Collaboration diagram for ngl::AABB:

Public Member Functions

 AABB (const Vec4 &_corner, Real _x, Real _y, Real _z) noexcept
 ctor More...
 
 AABB () noexcept
 default ctor More...
 
 ~AABB ()
 dtor (not used) More...
 
void set (const Vec4 &_corner, Real _x, Real _y, Real _z) noexcept
 set the AABB values More...
 
void setFromBBox (const BBox &_b) noexcept
 set from a bounding box More...
 
Vec3 getVertexP (const Vec3 &_normal) const noexcept
 
Vec3 getVertexN (const Vec3 &_normal) const noexcept
 

Private Attributes

Vec4 m_corner
 
Real m_x
 
Real m_y
 
Real m_z
 

Friends

class BBox
 

Detailed Description

Definition at line 42 of file AABB.h.

Constructor & Destructor Documentation

ngl::AABB::AABB ( const Vec4 _corner,
Real  _x,
Real  _y,
Real  _z 
)
noexcept

ctor

Parameters
[in]_cornerthe corner extent of the AABB
[in]_xthe x extent
[in]_ythe y extent
[in]_zthe z extent

Definition at line 35 of file AABB.cpp.

ngl::AABB::AABB ( )
noexcept

default ctor

Definition at line 26 of file AABB.cpp.

References m_corner, m_x, m_y, m_z, and ngl::Vec4::set().

+ Here is the call graph for this function:

ngl::AABB::~AABB ( )

dtor (not used)

Definition at line 41 of file AABB.cpp.

Member Function Documentation

Vec3 ngl::AABB::getVertexN ( const Vec3 _normal) const
noexcept

Definition at line 90 of file AABB.cpp.

References m_corner, m_x, ngl::Vec3::m_x, m_y, ngl::Vec3::m_y, m_z, ngl::Vec3::m_z, and ngl::Vec4::toVec3().

+ Here is the call graph for this function:

Vec3 ngl::AABB::getVertexP ( const Vec3 _normal) const
noexcept

Definition at line 70 of file AABB.cpp.

References m_corner, m_x, ngl::Vec3::m_x, m_y, ngl::Vec3::m_y, m_z, ngl::Vec3::m_z, and ngl::Vec4::toVec3().

+ Here is the call graph for this function:

void ngl::AABB::set ( const Vec4 _corner,
Real  _x,
Real  _y,
Real  _z 
)
noexcept

set the AABB values

Parameters
[in]_cornerthe corner extent of the AABB
[in]_xthe x extent
[in]_ythe y extent
[in]_zthe z extent

Definition at line 46 of file AABB.cpp.

References m_corner, m_x, ngl::Vec4::m_x, m_y, ngl::Vec4::m_y, m_z, and ngl::Vec4::m_z.

void ngl::AABB::setFromBBox ( const BBox _b)
noexcept

set from a bounding box

Parameters
_bthe bbox to set from

Friends And Related Function Documentation

friend class BBox
friend

Definition at line 44 of file AABB.h.

Member Data Documentation

Vec4 ngl::AABB::m_corner
private

Definition at line 84 of file AABB.h.

Real ngl::AABB::m_x
private

Definition at line 86 of file AABB.h.

Real ngl::AABB::m_y
private

Definition at line 87 of file AABB.h.

Real ngl::AABB::m_z
private

Definition at line 88 of file AABB.h.


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