-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose normals in libfive_mesh #547
Comments
From what I understand I need to use https://github.com/libfive/libfive/blob/master/libfive/include/libfive/eval/eval_deriv_array.hpp#L51 |
Which leads me to a nicer high level function here: libfive_vec3 libfive_tree_eval_d(libfive_tree t, libfive_vec3 p)
{
DerivArrayEvaluator e((Tree(t)));
auto v = e.deriv({p.x, p.y, p.z});
return {v.x(), v.y(), v.z()};
} But I'm not sure what exactly when to invoke this. Do I need to traverse the whole SDF, wait until I hit a boundary (0), and then .... something? Edit:
Aha! It seems then I need to go into one of the walkers / meshers and add this calculation there when at the boundary? |
Seems it's possible to compute normals #45 but they aren't exposed in any way.
The text was updated successfully, but these errors were encountered: