triro 1.3.0
A Python Ray-Mesh Intersector in OptiX
Loading...
Searching...
No Matches
ray.h
Go to the documentation of this file.
1#pragma once
2
3#include "CUDABuffer.h"
4#include "base.h"
5#include "optix_types.h"
6#include <torch/extension.h>
7#include <limits>
8
9namespace hmesh {
10
12 OptixTraversableHandle asHandle = 0;
14 void buildAccelStructure(torch::Tensor vertices, torch::Tensor faces);
15 void freeAccelStructure();
16};
17
18extern torch::Tensor intersectsAny(OptixAccelStructureWrapperCPP as,
19 const torch::Tensor &origins,
20 const torch::Tensor &dirs);
22 const torch::Tensor &origins,
23 const torch::Tensor &dirs);
24extern std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor,
25 torch::Tensor>
26intersectsClosest(OptixAccelStructureWrapperCPP as, torch::Tensor origins,
27 torch::Tensor directions);
29 torch::Tensor origins,
30 torch::Tensor directions);
31extern std::tuple<torch::Tensor, torch::Tensor, torch::Tensor>
33 torch::Tensor directions);
34
35} // namespace hmesh
Definition base.cpp:13
std::tuple< torch::Tensor, torch::Tensor, torch::Tensor > intersectsLocation(OptixAccelStructureWrapperCPP as, torch::Tensor origins, torch::Tensor directions)
Definition ray.cpp:325
torch::Tensor intersectsFirst(OptixAccelStructureWrapperCPP as, const torch::Tensor &origins, const torch::Tensor &dirs)
Definition ray.cpp:191
std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > intersectsClosest(OptixAccelStructureWrapperCPP as, torch::Tensor origins, torch::Tensor directions)
Find if ray hits any triangle and return ray index, triangle index, hit location and uv.
Definition ray.cpp:233
torch::Tensor intersectsCount(OptixAccelStructureWrapperCPP as, torch::Tensor origins, torch::Tensor directions)
Definition ray.cpp:291
torch::Tensor intersectsAny(OptixAccelStructureWrapperCPP as, const torch::Tensor &origins, const torch::Tensor &dirs)
Definition ray.cpp:161
void buildAccelStructure(torch::Tensor vertices, torch::Tensor faces)
Definition ray.cpp:27
OptixTraversableHandle asHandle
Definition ray.h:12