triro 1.3.0
A Python Ray-Mesh Intersector in OptiX
|
Functions | |
get_module () | |
init_optix () | |
create_optix_context () | |
create_optix_module () | |
create_optix_pipelines () | |
build_sbts () | |
Bool[torch.Tensor, "*b"] | intersects_any (OptixAccelStructureWrapper accel_structure, Float32[torch.Tensor, "*b 3"] origins, Float32[torch.Tensor, "*b 3"] dirs) |
Int32[torch.Tensor, "*b"] | intersects_first (OptixAccelStructureWrapper accel_structure, Float32[torch.Tensor, "*b 3"] origins, Float32[torch.Tensor, "*b 3"] dirs) |
Tuple[ Bool[torch.Tensor, "*b"], # hit Bool[torch.Tensor, "*b"], # front Int32[torch.Tensor, "*b"], # triangle index Float32[torch.Tensor, "*b 3"], # intersect location Float32[torch.Tensor, "*b 2"], # uv] | intersects_closest (OptixAccelStructureWrapper accel_structure, Float32[torch.Tensor, "*b 3"] origins, Float32[torch.Tensor, "*b 3"] dirs) |
Int32[torch.Tensor, "*b"] | intersects_count (OptixAccelStructureWrapper accel_structure, Float32[torch.Tensor, "*b 3"] origins, Float32[torch.Tensor, "*b 3"] dirs) |
Tuple[ Float32[torch.Tensor, "h 3"], Int32[torch.Tensor, "h"], Int32[torch.Tensor, "h"]] | intersects_location (OptixAccelStructureWrapper accel_structure, Float32[torch.Tensor, "*b 3"] origins, Float32[torch.Tensor, "*b 3"] dirs) |
Variables | |
triro_module = None | |
ops.get_module | ( | ) |
Bool[torch.Tensor, "*b"] ops.intersects_any | ( | OptixAccelStructureWrapper | accel_structure, |
Float32[torch.Tensor, "*b 3"] | origins, | ||
Float32[torch.Tensor, "*b 3"] | dirs | ||
) |
Check if any ray intersects with the acceleration structure. Args: accel_structure: The acceleration structure. origins: The origins of the rays. dirs: The directions of the rays. Returns: A boolean tensor indicating if each ray intersects with the acceleration structure.
Tuple[ Bool[torch.Tensor, "*b"], # hit Bool[torch.Tensor, "*b"], # front Int32[torch.Tensor, "*b"], # triangle index Float32[torch.Tensor, "*b 3"], # intersect location Float32[torch.Tensor, "*b 2"], # uv ] ops.intersects_closest | ( | OptixAccelStructureWrapper | accel_structure, |
Float32[torch.Tensor, "*b 3"] | origins, | ||
Float32[torch.Tensor, "*b 3"] | dirs | ||
) |
Find the closest intersection for each ray. Args: accel_structure: The acceleration structure. origins: The origins of the rays. dirs: The directions of the rays. Returns: A tuple containing the following tensors: - A boolean tensor indicating if each ray hits an object. - A boolean tensor indicating if each ray hits the front face of an object. - An integer tensor indicating the index of the triangle that each ray intersects with. - A float tensor indicating the location of the intersection for each ray. - A float tensor indicating the UV coordinates of the intersection for each ray.
Int32[torch.Tensor, "*b"] ops.intersects_count | ( | OptixAccelStructureWrapper | accel_structure, |
Float32[torch.Tensor, "*b 3"] | origins, | ||
Float32[torch.Tensor, "*b 3"] | dirs | ||
) |
Int32[torch.Tensor, "*b"] ops.intersects_first | ( | OptixAccelStructureWrapper | accel_structure, |
Float32[torch.Tensor, "*b 3"] | origins, | ||
Float32[torch.Tensor, "*b 3"] | dirs | ||
) |
Find the index of the first intersection for each ray. Args: accel_structure: The acceleration structure. origins: The origins of the rays. dirs: The directions of the rays. Returns: An integer tensor indicating the index of the first intersection for each ray.
Tuple[ Float32[torch.Tensor, "h 3"], Int32[torch.Tensor, "h"], Int32[torch.Tensor, "h"] ] ops.intersects_location | ( | OptixAccelStructureWrapper | accel_structure, |
Float32[torch.Tensor, "*b 3"] | origins, | ||
Float32[torch.Tensor, "*b 3"] | dirs | ||
) |
Find the location of intersections for each ray. Args: accel_structure: The acceleration structure. origins: The origins of the rays. dirs: The directions of the rays. Returns: A tuple containing the following tensors: - A float tensor indicating the location of the intersection for each ray. - The index of the ray that had the intersection. - An integer tensor indicating the index of the instance that each ray intersects with.