# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::AABB Class Reference

The AABB class implements an axis-aligned bounding box using vl::Real precision. More...

`#include <AABB.hpp>`

List of all members.

## Public Member Functions
| AABB ()
| AABB (const vec3 &center, Real radius)
| AABB (const vec3 &pt1, const vec3 &pt2, Real displace=0)
void | setNull ()
bool | isNull () const
bool | isPoint () const
void | enlarge (Real displace)
void | addPoint (const vec3 &v, Real radius)
bool | intersects (const AABB &bb) const
vec3 | clip (const vec3 &v, bool clipx=true, bool clipy=true, bool clipz=true) const
bool | isInside (const vec3 &v, bool clipx, bool clipy, bool clipz) const
bool | isInside (const vec3 &v) const
Real | height () const
Real | width () const
Real | depth () const
AABB | operator+ (const AABB &aabb) const
const AABB & | operator+= (const AABB &other)
AABB | operator+ (const vec3 &p)
const AABB & | operator+= (const vec3 &p)
vec3 | center () const
Real | area () const
Real | longestSideLength () const
void | addPoint (const vec3 &v)
void | transformed (AABB &aabb, const mat4 &mat) const
AABB | transformed (const mat4 &mat) const
const vec3 & | minCorner () const
const vec3 & | maxCorner () const
void | setMinCorner (Real x, Real y, Real z)
void | setMinCorner (const vec3 &v)
void | setMaxCorner (Real x, Real y, Real z)
void | setMaxCorner (const vec3 &v)
Real | volume () const
## Protected Attributes
vec3 | mMin
vec3 | mMax

## Detailed Description

The AABB class implements an axis-aligned bounding box using vl::Real precision.

## Constructor & Destructor Documentation

AABB::AABB | ( |  | ) |

AABB::AABB | ( | const vec3 & | center,
|  | Real | radius |
| ) |  |  |

AABB::AABB | ( | const vec3 & | pt1,
|  | const vec3 & | pt2,
|  | Real | displace = `0` |
| ) |  |  |

## Member Function Documentation

void vl::AABB::setNull | ( |  | ) | `[inline]`

bool vl::AABB::isNull | ( |  | ) | const`[inline]`

bool vl::AABB::isPoint | ( |  | ) | const`[inline]`

void AABB::enlarge | ( | Real | displace | ) |

void AABB::addPoint | ( | const vec3 & | v,
|  | Real | radius |
| ) |  |  |

bool AABB::intersects | ( | const AABB & | bb | ) | const

vec3 AABB::clip | ( | const vec3 & | v,
|  | bool | clipx = `true`,
|  | bool | clipy = `true`,
|  | bool | clipz = `true` |
| ) |  |  | const

bool AABB::isInside | ( | const vec3 & | v,
|  | bool | clipx,
|  | bool | clipy,
|  | bool | clipz |
| ) |  |  | const

bool AABB::isInside | ( | const vec3 & | v | ) | const

Real AABB::height | ( |  | ) | const

Real AABB::width | ( |  | ) | const

Real AABB::depth | ( |  | ) | const

AABB AABB::operator+ | ( | const AABB & | aabb | ) | const

const AABB& vl::AABB::operator+= | ( | const AABB & | other | ) | `[inline]`

AABB vl::AABB::operator+ | ( | const vec3 & | p | ) | `[inline]`

const AABB& vl::AABB::operator+= | ( | const vec3 & | p | ) | `[inline]`

vec3 AABB::center | ( |  | ) | const

Real vl::AABB::area | ( |  | ) | const`[inline]`

Real vl::AABB::longestSideLength | ( |  | ) | const`[inline]`

void vl::AABB::addPoint | ( | const vec3 & | v | ) | `[inline]`

void vl::AABB::transformed | ( | AABB & | aabb,
|  | const mat4 & | mat |
| ) |  |  | const`[inline]`

AABB vl::AABB::transformed | ( | const mat4 & | mat | ) | const`[inline]`

const vec3& vl::AABB::minCorner | ( |  | ) | const`[inline]`

const vec3& vl::AABB::maxCorner | ( |  | ) | const`[inline]`

void vl::AABB::setMinCorner | ( | Real | x,
|  | Real | y,
|  | Real | z |
| ) |  |  | `[inline]`

void vl::AABB::setMinCorner | ( | const vec3 & | v | ) | `[inline]`

void vl::AABB::setMaxCorner | ( | Real | x,
|  | Real | y,
|  | Real | z |
| ) |  |  | `[inline]`

void vl::AABB::setMaxCorner | ( | const vec3 & | v | ) | `[inline]`

Real vl::AABB::volume | ( |  | ) | const`[inline]`

## Member Data Documentation

vec3 vl::AABB::mMin`[protected]`

vec3 vl::AABB::mMax`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/AABB.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/AABB.cpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:28:55 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.