#include <AxisAlignedBox.h>
cinder::AxisAlignedBox::AxisAlignedBox |
( |
| ) |
|
cinder::AxisAlignedBox::AxisAlignedBox |
( |
const vec3 & |
min, |
|
|
const vec3 & |
max |
|
) |
| |
const vec3& cinder::AxisAlignedBox::getCenter |
( |
| ) |
const |
Returns the center of the axis-aligned box.
const vec3& cinder::AxisAlignedBox::getExtents |
( |
| ) |
const |
Returns the extents of the axis-aligned box.
vec3 cinder::AxisAlignedBox::getSize |
( |
| ) |
const |
Returns the size of the axis-aligned box.
vec3 cinder::AxisAlignedBox::getMin |
( |
| ) |
const |
Returns the corner of the axis-aligned box with the smallest x, y and z coordinates.
vec3 cinder::AxisAlignedBox::getMax |
( |
| ) |
const |
Returns the corner of the axis-aligned box with the largest x, y and z coordinates.
void cinder::AxisAlignedBox::set |
( |
const vec3 & |
min, |
|
|
const vec3 & |
max |
|
) |
| |
Construct an axis-aligned box by specifying two opposite corners.
void cinder::AxisAlignedBox::include |
( |
const vec3 & |
point | ) |
|
Expands the box so that it contains point.
Expands the box so that it contains box.
bool cinder::AxisAlignedBox::contains |
( |
const vec3 & |
point | ) |
const |
Returns true
if the axis-aligned box contains point.
bool cinder::AxisAlignedBox::intersects |
( |
const AxisAlignedBox & |
box | ) |
const |
Returns true
if the axis-aligned boxes intersect.
bool cinder::AxisAlignedBox::intersects |
( |
const ci::Sphere & |
sphere | ) |
const |
Returns true
if the axis-aligned box intersects sphere.
bool cinder::AxisAlignedBox::intersects |
( |
const Ray & |
ray | ) |
const |
Returns true
if the ray intersects the axis-aligned box.
int cinder::AxisAlignedBox::intersect |
( |
const Ray & |
ray, |
|
|
float * |
min, |
|
|
float * |
max |
|
) |
| const |
Performs ray intersections and returns the number of intersections (0, 1 or 2). Returns min and max distance from the ray origin.
void cinder::AxisAlignedBox::project |
( |
const vec3 & |
normal, |
|
|
float * |
min, |
|
|
float * |
max |
|
) |
| const |
Given a plane through the origin with normal, returns the minimum and maximum distance to the axis-aligned box.
vec3 cinder::AxisAlignedBox::getNegative |
( |
const vec3 & |
normal | ) |
const |
Given a plane through the origin with normal, returns the corner closest to the plane.
vec3 cinder::AxisAlignedBox::getPositive |
( |
const vec3 & |
normal | ) |
const |
Given a plane through the origin with normal, returns the corner farthest from the plane.
void cinder::AxisAlignedBox::transform |
( |
const mat4 & |
transform | ) |
|
Converts axis-aligned box to another coordinate space.
AxisAlignedBox cinder::AxisAlignedBox::transformed |
( |
const mat4 & |
transform | ) |
const |
Converts axis-aligned box to another coordinate space.
vec3 cinder::AxisAlignedBox::mCenter |
|
protected |
vec3 cinder::AxisAlignedBox::mExtents |
|
protected |
The documentation for this class was generated from the following file: