74 std::unordered_map<std::string, core::Tensor>
CastRays(
92 const float tnear = 0.f,
94 const int nthreads = 0);
107 const int nthreads = 0);
155 const core::Tensor &query_points,
const int nthreads = 0);
167 const int nthreads = 0);
192 const int nthreads = 0,
193 const int nsamples = 1);
218 const int nthreads = 0,
219 const int nsamples = 1);
256 #ifdef BUILD_SYCL_MODULE
259 std::unique_ptr<Impl> impl_;
A scene class with basic ray casting and closest point queries.
static core::Tensor CreateRaysPinhole(const core::Tensor &intrinsic_matrix, const core::Tensor &extrinsic_matrix, int width_px, int height_px)
Creates rays for the given camera parameters.
std::unordered_map< std::string, core::Tensor > ListIntersections(const core::Tensor &rays, const int nthreads=0)
Lists the intersections of the rays with the scene.
uint32_t AddTriangles(const core::Tensor &vertex_positions, const core::Tensor &triangle_indices)
Add a triangle mesh to the scene.
std::unordered_map< std::string, core::Tensor > CastRays(const core::Tensor &rays, const int nthreads=0) const
Computes the first intersection of the rays with the scene.
core::Tensor CountIntersections(const core::Tensor &rays, const int nthreads=0)
Computes the number of intersection of the rays with the scene.
RaycastingScene(int64_t nthreads=0, const core::Device &device=core::Device("CPU:0"))
Default Constructor.
core::Tensor ComputeOccupancy(const core::Tensor &query_points, const int nthreads=0, const int nsamples=1)
Computes the occupancy at the query point positions.
core::Tensor ComputeDistance(const core::Tensor &query_points, const int nthreads=0)
Computes the distance to the surface of the scene.
static uint32_t INVALID_ID()
The value for invalid IDs.
core::Tensor ComputeSignedDistance(const core::Tensor &query_points, const int nthreads=0, const int nsamples=1)
Computes the signed distance to the surface of the scene.
core::Tensor TestOcclusions(const core::Tensor &rays, const float tnear=0.f, const float tfar=std::numeric_limits< float >::infinity(), const int nthreads=0)
Checks if the rays have any intersection with the scene.
std::unordered_map< std::string, core::Tensor > ComputeClosestPoints(const core::Tensor &query_points, const int nthreads=0)
Computes the closest points on the surfaces of the scene.
A triangle mesh contains vertices and triangles.
__device__ __forceinline__ float infinity()
Generic file read and write utility for python interface.