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

bbox.h File Reference

Axis Aligned Bounding Box. More...

#include <lescegra/util/object.h>
#include <lescegra/util/vertex.h>
#include <lescegra/util/matrix.h>
#include <lescegra/util/frustum.h>

Include dependency graph for bbox.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  LsgBBox
 Axis Aligned Bounding Box. More...


Defines

#define LSG_BBOX_H   1

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.


Function Documentation

LsgBBox* LsgBBox_create void   ) 
 

Allocate and initialize a bounding box.

void LsgBBox_init LsgBBox self  ) 
 

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

Parameters:
self The instance variable

void LsgBBox_clear LsgBBox self  ) 
 

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
 

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
 

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
 

Transform the bounding box with a matrix.

Parameters:
self The instance variable
tm The transformation matrix

int LsgBBox_contains LsgBBox self,
Vertex  v
 

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
 

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
 

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


(c) 2003, by Enno Cramer
generated on 9 Jul 2003
lescegra - doxygen