Can't make marching cubes work
slapin opened this issue · comments
I'm really sorry for disturbance, but could you please provide some small working example
to run rjm_mc.h?
I tried to use it but got mess of points. It looks like vertices are not correctly generated.
What I get:
isofn:
static float isofn(const float *pos, float *extra, void *userparam)
{
Vector3 position(pos);
extra[0] = position.x_;
extra[1] = position.z_;
if (position.y_ > 4.0f)
return 1.0f;
if (position.y_ < 1.0f)
return 1.0f;
float center = 1.0f + (5.0f - 1.0f) / 2.0f;
if (position.y_ < center)
return position.y_ - center;
else
return center - position.y_;
I've updated the header to include a complete working example, which should get you going :-)
Thank you so much! Now it is all clear!
…On Fri, Jan 12, 2018 at 10:11 PM, Richard Mitton ***@***.***> wrote:
Closed #2 <#2>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAAX04jnyf95ojme2h6Jzeb92lmy8ayEks5tJ65agaJpZM4RcXdM>
.