|
7 | 7 | # license agreement from NVIDIA CORPORATION & AFFILIATES is strictly prohibited. |
8 | 8 |
|
9 | 9 | import torch |
10 | | -import torch.nn.functional as F |
11 | | -import torch.nn as nn |
12 | | -import numpy as np |
13 | | -import logging as log |
14 | | - |
15 | 10 | import wisp.ops.mesh as mesh_ops |
16 | | - |
17 | | -from wisp.ops.perf import PerfTimer |
18 | | -from wisp.ops.debug import PsDebugger |
19 | | - |
| 11 | +from wisp.utils import PsDebugger, PerfTimer |
20 | 12 | import wisp.ops.spc as wisp_spc_ops |
21 | 13 | import kaolin.ops.spc as spc_ops |
22 | 14 | import kaolin.render.spc as spc_render |
23 | 15 |
|
| 16 | + |
24 | 17 | class OctreeAS(object): |
25 | | - """Octree accelstruct class implemented using Kaolin SPC. |
| 18 | + """Octree bottom-level acceleration structure class implemented using Kaolin SPC. |
| 19 | + Can be used to to quickly query cells occupancy, and trace rays against the volume. |
26 | 20 | """ |
27 | 21 |
|
28 | 22 | def __init__(self): |
@@ -126,8 +120,9 @@ def query(self, coords, level=None, with_parents=False): |
126 | 120 | return spc_ops.unbatched_query(self.octree, self.prefix, coords, level, with_parents) |
127 | 121 |
|
128 | 122 | def raytrace(self, rays, level=None, with_exit=False): |
129 | | - """Traces rays against the SPC structure. |
130 | | - |
| 123 | + """Traces rays against the SPC structure, returning all intersections along the ray with the SPC points |
| 124 | + (SPC points are quantized, and can be interpreted as octree cell centers or corners). |
| 125 | +
|
131 | 126 | Args: |
132 | 127 | rays (wisp.core.Rays): Ray origins and directions of shape [batch, 3]. |
133 | 128 | level (int) : The level of the octree to raytrace. If None, traces the highest level. |
|
0 commit comments