Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

obb3 Struct Reference

List of all members.

Detailed Description

An oriented three-dimensional bounding box.


Public Member Functions

vec3 center ()
 Return the center of the box and the pivot for the axis.

vec3 dim ()
 Return the dimensions of the box.

sphere3 toSphere ()
 Return a sphere that encapsulates the box.

void toPlanes (plane3[] planes)
 Convert the oriented bounding box into six planes.

vec3 toWorld (vec3 vector)
 Convert a local coordinate to world coordinates.

vec3 toLocal (vec3 vector)
 Convert a world coordinate to local coordinates.

bit contains (vec3 vector)
 Return whether this world vector is inside the box.

vec3 corner (uint index)
 Return an indexed corner of the box in world coordinates.

bit overlaps (obb3 other)
 Return whether the bounding boxes overlap one another.


Static Public Member Functions

obb3 createSpoke (vec3 centerTop, mat3 axis, vec3 size)
 Create a spoke oriented bounding box.


Public Attributes

box3 box
 The base box.

mat3 axis
 Orientation axis.


Related Functions

(Note that these are not member functions.)

obb3 aobb3 (box3 box, mat3 axis)
 Create an oriented bounding box.

obb3 aobb3 (box3 box)
 Create an oriented bounding box with an identity axis.


Member Function Documentation

obb3 obb3.createSpoke vec3  centerTop,
mat3  axis,
vec3  size
[static]
 

Create a spoke oriented bounding box.

Parameters:
centerTop The center of the top of the bounding box.
axis The orientation axis.
size The dimensions of the bounding box.
Returns:
An oriented bounding box describing these parameters.

bit obb3.overlaps obb3  other  ) 
 

Return whether the bounding boxes overlap one another.

This function was stolen from ODE.

Parameters:
other The other oriented bounding box to test against.
Returns:
Whether the bounding boxes overlap one another.

void obb3.toPlanes plane3  planes[]  ) 
 

Convert the oriented bounding box into six planes.

Parameters:
planes The planes to store the box into. This must have a length of six.


Member Data Documentation

mat3 obb3.axis
 

Orientation axis.

The OBB pivots around the center of box.


The documentation for this struct was generated from the following file:
Generated on Thu Sep 4 13:12:53 2003 for dig by doxygen 1.3.2