mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
Cleanup aabb intersection logic (#1329)
This commit is contained in:
1 parent
9966c43811
commit
567268854b
2 files changed
+63
-40
No files matched your search
@@ -16,7 +16,6 @@
|
||||
Camera Models
|
||||
"""
|
||||
import base64
|
||||
import importlib
|
||||
import math
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
@@ -472,15 +471,7 @@ class Cameras(TensorDataclass):
|
||||
rays_o = rays_o.reshape((-1, 3))
|
||||
rays_d = rays_d.reshape((-1, 3))
|
||||
|
||||
if self._use_nerfacc:
|
||||
try:
|
||||
nerfacc = importlib.import_module("nerfacc")
|
||||
t_min, t_max = nerfacc.ray_aabb_intersect(rays_o, rays_d, tensor_aabb)
|
||||
except: # pylint: disable=bare-except
|
||||
t_min, t_max = nerfstudio.utils.math.intersect_aabb(rays_o, rays_d, tensor_aabb)
|
||||
self._use_nerfacc = False
|
||||
else:
|
||||
t_min, t_max = nerfstudio.utils.math.intersect_aabb(rays_o, rays_d, tensor_aabb)
|
||||
t_min, t_max = nerfstudio.utils.math.intersect_aabb(rays_o, rays_d, tensor_aabb)
|
||||
|
||||
t_min = t_min.reshape([shape[0], shape[1], 1])
|
||||
t_max = t_max.reshape([shape[0], shape[1], 1])
|
||||
|
||||
Reference in new issue
Block a user