move qhull limits inside base class
This commit is contained in:
parent
63f034535e
commit
ece8cea0c7
@ -21,6 +21,15 @@
|
|||||||
|
|
||||||
#include <bounce/common/geometry.h>
|
#include <bounce/common/geometry.h>
|
||||||
|
|
||||||
|
// The maximum number of vertices that a hull can have.
|
||||||
|
#define B3_MAX_HULL_VERTICES (B3_MAX_U8 + 1)
|
||||||
|
|
||||||
|
// The maximum number of half-edges a hull can have.
|
||||||
|
#define B3_MAX_HULL_EDGES (B3_MAX_U8 + 1)
|
||||||
|
|
||||||
|
// The maximum number of faces and planes a hull can have.
|
||||||
|
#define B3_MAX_HULL_FACES (B3_MAX_U8 + 1)
|
||||||
|
|
||||||
struct b3Face
|
struct b3Face
|
||||||
{
|
{
|
||||||
u8 edge;
|
u8 edge;
|
||||||
|
@ -21,15 +21,6 @@
|
|||||||
|
|
||||||
#include <bounce/collision/shapes/hull.h>
|
#include <bounce/collision/shapes/hull.h>
|
||||||
|
|
||||||
// The maximum number of vertices that a hull can have.
|
|
||||||
#define B3_MAX_HULL_VERTICES (256)
|
|
||||||
|
|
||||||
// The maximum number of half-edges a hull can have.
|
|
||||||
#define B3_MAX_HULL_EDGES (256)
|
|
||||||
|
|
||||||
// The maximum number of faces and planes a hull can have.
|
|
||||||
#define B3_MAX_HULL_FACES (256)
|
|
||||||
|
|
||||||
// This hull can be constructed from an array of points.
|
// This hull can be constructed from an array of points.
|
||||||
struct b3QHull : public b3Hull
|
struct b3QHull : public b3Hull
|
||||||
{
|
{
|
||||||
@ -52,8 +43,9 @@ struct b3QHull : public b3Hull
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a convex hull from an array of points.
|
// Create a convex hull from an array of points.
|
||||||
// If the points define a degenerate polyhedron the hull is not overwritten.
|
// The counter must be in the range [0, B3_MAX_HULL_VERTICES].
|
||||||
// Coincident points are removed.
|
// Coincident points are removed.
|
||||||
|
// Some coplanar faces are merged.
|
||||||
void Set(const b3Vec3* points, u32 count);
|
void Set(const b3Vec3* points, u32 count);
|
||||||
|
|
||||||
// Set this hull as a cylinder located at the origin.
|
// Set this hull as a cylinder located at the origin.
|
||||||
|
@ -41,6 +41,7 @@ typedef float float32;
|
|||||||
#define B3_MAX_FLOAT (FLT_MAX)
|
#define B3_MAX_FLOAT (FLT_MAX)
|
||||||
#define B3_EPSILON (FLT_EPSILON)
|
#define B3_EPSILON (FLT_EPSILON)
|
||||||
|
|
||||||
|
#define B3_MAX_U8 (0xFF)
|
||||||
#define B3_MAX_U32 (0xFFFFFFFF)
|
#define B3_MAX_U32 (0xFFFFFFFF)
|
||||||
|
|
||||||
// Collision
|
// Collision
|
||||||
|
Loading…
x
Reference in New Issue
Block a user