Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gbmath::geometry::AABB Class Reference

Axis Aligned Bounding Box Defined by a center position and a half-length vector representing the half-lengths along the X, Y, Z vectors. More...

#include <aabb.h>

List of all members.

Public Types

enum  {
  LEFT = 1<<0, RIGHT = 1<<1, TOP = 1<<2, BOTTOM = 1<<3,
  NEARZ = 1<<4
}
 Constants for the faces. More...


Public Methods

Constructors
 AABB (const V3 &position=V3::O, const V3 &lengths=V3::O)
 .

Initializers
void Set (const V3 &position, const V3 &lengths)
 .

void Set (const V3 *verts, int numVerts)
 Initialize with an array of points.

void Set (const std::vector< V3 > &verts)
 Initialize with a vector of points.

void Add (const V3 *verts, int numVerts)
 Expands the box with an array of points.

void Add (const std::vector< V3 > &verts)
 Expands the box with an vector of points.

Accessors
V3 GetPosition () const
 .

V3 GetLengths () const
 .

V3 GetMin () const
 .

V3 GetMax () const
 .

V3 GetPoint (int i) const
 Returns a box point.

V3 GetEdgePoint (int i, int j) const
 Returns and edge point.

V3 GetFacePoint (int i, int j) const
 Returns a face point.

void SetPosition (const V3 &position)
 .

void SetLengths (const V3 &lengths)
 .


Static Public Attributes

const V3 Points [8]
 .

const int Edges [12][2]
 .

const int Faces [6][4]
 .


Detailed Description

Axis Aligned Bounding Box Defined by a center position and a half-length vector representing the half-lengths along the X, Y, Z vectors.


Member Enumeration Documentation

anonymous enum
 

Constants for the faces.

Enumeration values:
LEFT  .
RIGHT  .
TOP  .
BOTTOM  .
NEARZ  .


Member Function Documentation

V3 gbmath::geometry::AABB::GetEdgePoint int    i,
int    j
const [inline]
 

Returns and edge point.

Parameters:
i  0-11 : One of the twelve edges.
j  0 or 1: the first or second point on the edge.

V3 gbmath::geometry::AABB::GetFacePoint int    i,
int    j
const [inline]
 

Returns a face point.

Parameters:
i  0-5 : One of the six faces.
j  0-3 : One of the four points on the face.

V3 gbmath::geometry::AABB::GetPoint int    i const [inline]
 

Returns a box point.

Parameters:
i  0-7 : One of the eight box points.


The documentation for this class was generated from the following file:
Generated on Mon Sep 2 14:52:34 2002 for GunBuster Engine by doxygen1.2.17