-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
vectorize the function that check triangle intersection #93
Conversation
Thank you, @yaio4109, for improving
|
@@ -220,7 +255,7 @@ def intersect_w_surface(ray, points): | |||
normal = get_triangle_normal(points) | |||
if len(ray.shape) == 2: | |||
ray = ray.unsqueeze(0) | |||
if len(points) == 2: | |||
if len(points.shape) == 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be the tensor shape, not the length of tensor. I also fix same bug in "raytracing" module.
I add my name If having other issue, please let me know. 🤗 |
Thank you very much, @yaio4109, for your contributions to I hope to be able to meet in-person one day, and please to meet you virtually! |
When i use latest version of odak code, the function checking triangle intersection can only check one triangle at a time. So if i try to check a lot of triangle intersections, i need to loop through the triangles, which is slow in Python. Therefore, I rewrote the code associating with triangle intersection in vectorization form.