set hull from vertex format
The user can create a convex hull from a vertex format, not directly from a list of vertices. That's interesting because in some 3D engines convex hulls are typically created from a render mesh that might structure a vertex in different ways in the memory.
This commit is contained in:
@ -81,7 +81,7 @@ public:
|
||||
m_points[m_count++] = p;
|
||||
}
|
||||
|
||||
m_hull.Set(m_points, m_count);
|
||||
m_hull.Set(sizeof(b3Vec3), m_points, m_count);
|
||||
assert(m_hull.faceCount > 0);
|
||||
m_selection = m_hull.GetSupportFace(b3Vec3_z);
|
||||
}
|
||||
|
@ -85,14 +85,14 @@ public:
|
||||
void Step()
|
||||
{
|
||||
b3QHull hull1;
|
||||
hull1.Set(m_points1, e_count);
|
||||
hull1.Set(sizeof(b3Vec3), m_points1, e_count);
|
||||
|
||||
b3HullShape sA;
|
||||
sA.m_hull = &hull1;
|
||||
m_shapeA = &sA;
|
||||
|
||||
b3QHull hull2;
|
||||
hull2.Set(m_points2, e_count);
|
||||
hull2.Set(sizeof(b3Vec3), m_points2, e_count);
|
||||
|
||||
b3HullShape sB;
|
||||
sB.m_hull = &hull2;
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
points[j] = p;
|
||||
}
|
||||
|
||||
hull->Set(points, count);
|
||||
hull->Set(sizeof(b3Vec3), points, count);
|
||||
}
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user