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:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Detailed Description
Axis Aligned Bounding Box.
Function Documentation
|
|
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 |
|
|
|
Include another bounding box in the bounded volume. - Parameters:
-
| self | The instance variable |
| box | The other bounding box |
|
|
|
Add a vertex to the bounded volume. - Parameters:
-
| self | The instance variable |
| v | The vertex to add to the bounded volume |
|
|
|
Transform the bounding box with a matrix. - Parameters:
-
| self | The instance variable |
| tm | The transformation matrix |
|
|
|
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
|
|
|
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
|
|
|
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 |
|