Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

LsgBBox Struct Reference

Axis Aligned Bounding Box. More...

#include <bbox.h>

Collaboration diagram for LsgBBox:

Collaboration graph
[legend]

Data Fields

LsgObject super
Vertex min
Vertex max
int valid

Related Functions

(Note that these are not member functions.)

LsgBBoxLsgBBox_create (void)
void LsgBBox_init (LsgBBox *self)
void LsgBBox_clear (LsgBBox *self)
void LsgBBox_combine (LsgBBox *self, const LsgBBox *box)
void LsgBBox_include (LsgBBox *self, Vertex v)
void LsgBBox_transform (LsgBBox *self, Matrix tm)
int LsgBBox_contains (LsgBBox *self, Vertex v)
int LsgBBox_visible (LsgBBox *self, LsgFrustum *frustum)
void LsgBBox_nearest (LsgBBox *self, Vertex v, Vertex n)

Detailed Description

Axis Aligned Bounding Box.

An axis aligned bounding box


Friends And Related Function Documentation

LsgBBox * LsgBBox_create void   )  [related]
 

Allocate and initialize a bounding box.

void LsgBBox_init LsgBBox self  )  [related]
 

Constructor method for LsgBBox. Initially set the bounding box state to invalid.

Parameters:
self The instance variable

void LsgBBox_clear LsgBBox self  )  [related]
 

Clear the bounding box volume. Set the bounding box state to invalid. Min and max are undefined.

Parameters:
self The instance variable

void LsgBBox_combine LsgBBox self,
const LsgBBox box
[related]
 

Include another bounding box in the bounded volume.

Parameters:
self The instance variable
box The other bounding box

void LsgBBox_include LsgBBox self,
Vertex  v
[related]
 

Add a vertex to the bounded volume.

Parameters:
self The instance variable
v The vertex to add to the bounded volume

void LsgBBox_transform LsgBBox self,
Matrix  tm
[related]
 

Transform the bounding box with a matrix.

Parameters:
self The instance variable
tm The transformation matrix

int LsgBBox_contains LsgBBox self,
Vertex  v
[related]
 

Check if the bounding box contains a vertex.

Parameters:
self The instance variable
v The vertex to check
Returns:
1 if the vertex v is contained in the volume bound by self, 0 otherwise

int LsgBBox_visible LsgBBox self,
LsgFrustum frustum
[related]
 

Check if any part of the bounding box is inside a given view frustum.

Parameters:
self The instance variable
frustum The view frustum
Returns:
1 if any part of the volume bound by self intersects with the view frustum, 0 otherwise

void LsgBBox_nearest LsgBBox self,
Vertex  v,
Vertex  n
[related]
 

Compute the point nearest to a given vertex that is still inside the bounded volume.

Parameters:
self The instance variable
v Some vertex
n The buffer to hold the vertex nearest to v but still inside the bounded volume


The documentation for this struct was generated from the following file:
(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen