bugfix; operations

This commit is contained in:
Irlan
2018-04-27 03:32:20 -03:00
parent bd490d7925
commit abc5f59170
2 changed files with 60 additions and 33 deletions

View File

@ -68,19 +68,25 @@ struct qhFace
struct qhHalfEdge
{
qhVertex* tail;
qhHalfEdge* prev;
qhHalfEdge* next;
qhHalfEdge* twin;
qhFace* face;
qhVertex* tail;
//
qhHalfEdge* freeNext;
bool active;
};
enum qhVertexMark
{
e_conflict,
e_hull
};
struct qhVertex
{
qhVertex* prev;
@ -89,6 +95,8 @@ struct qhVertex
b3Vec3 position;
qhFace* conflictFace;
qhVertexMark mark;
//
qhVertex* freeNext;
@ -124,6 +132,9 @@ public:
void Draw() const;
private:
bool BuildInitialHull(const b3Vec3* vertices, u32 count);
qhVertex* AddVertex(const b3Vec3& position);
qhFace* AddFace(qhVertex* v1, qhVertex* v2, qhVertex* v3);
qhFace* RemoveFace(qhFace* face);