Commit 6a63c0f1 authored by Ioan Sucan's avatar Ioan Sucan
Browse files

fix generation of mesh from cone

parent 8e144bc0
......@@ -278,9 +278,11 @@ void generateBVHModel(BVHModel<BV>& model, const Cone& shape, const Transform3f&
for(unsigned int i = 0; i < h_num - 1; ++i)
{
double h_i = h / 2 - (i + 1) * hd;
double rh = r * (0.5 - h_i / h);
for(unsigned int j = 0; j < tot; ++j)
{
points.push_back(Vec3f(r * cos(phi + phid * j), r * sin(phi + phid * j), h / 2 - (i + 1) * hd));
points.push_back(Vec3f(rh * cos(phi + phid * j), rh * sin(phi + phid * j), h_i));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment