Data Structures | Functions
AtBBox API

Data Structures

struct  AtBBox
 3D axis-aligned bounding box (uses single-precision) More...
 
struct  AtBBox2
 2D axis-aligned bounding box (uses integers) More...
 

Functions

void AiBBoxAddSlack (AtBBox &bbox, float slack)
 Expand a bounding box with some safety slack volume.
 
void AiBBoxInit (AtBBox &bbox, float bound)
 Initialize a bounding box.
 
void AiBBoxExpand (AtBBox &bbox, const AtVector &v)
 Expand a bounding box with a point.
 
void AiBBoxTriangle (AtBBox &bbox, const AtPoint &p0, const AtPoint &p1, const AtPoint &p2)
 Compute the bbox of a triangle.
 
void AiBBoxUnion (AtBBox &bbox, const AtBBox &b1, const AtBBox &b2)
 Compute the "union" of two bboxes. More...
 
void AiBBoxIntersection (AtBBox &bbox, const AtBBox &b1, const AtBBox &b2)
 Compute the intersection of two bboxes.
 
bool AiBBoxInside (const AtBBox &bbox, const AtPoint &p)
 Check to see if the specified point is inside the bbox.
 
float AiBBoxVolume (const AtBBox &bbox)
 Compute the volume of a bbox.
 
bool AiBBoxIsEmpty (const AtBBox &bbox)
 Returns whether or not the specified box is empty.
 
float AiBBoxArea (const AtBBox &bbox)
 Compute the surface area of a bbox.
 
float AiBBoxHalfArea (const AtBBox &bbox)
 Compute half the surface area of a bbox.
 
void AiBBoxCenter (const AtBBox &bbox, AtPoint &c)
 Compute the center of a bbox.
 
void AiBBoxLerp (AtBBox &bbox, float k, const AtBBox &lo, const AtBBox &hi)
 Linear interpolation between two bboxes (k=0 -> bbox=lo, k=1 -> bbox=hi)
 
int AiBBox2Area (const AtBBox2 &bbox)
 Compute the area (# of pixels) of an integer bbox.
 

Constants

AI_API AtBBox AI_BBOX_UNIT
 Unit bounding box.
 
AI_API AtBBox AI_BBOX_ZERO
 Zero-width bounding box.
 

Detailed Description

Function Documentation

void AiBBoxUnion ( AtBBox bbox,
const AtBBox b1,
const AtBBox b2 
)
inline

Compute the "union" of two bboxes.

Note
this name is misleading since it's the bbox of bboxes, not the union (which can be disjoint)

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com