DHART
Loading...
Searching...
No Matches
HF::RayTracer::NanoRTRayTracer Class Reference

#include <ray_data.h>

+ Collaboration diagram for HF::RayTracer::NanoRTRayTracer:

Public Member Functions

 NanoRTRayTracer (const HF::Geometry::MeshInfo< float > &MI)
 Construct a new raytracer with an instance of meshinfo. More...
 
 NanoRTRayTracer (const HF::Geometry::MeshInfo< double > &MI)
 
template<typename point_type , typename dist_type = real_t>
HitStruct< real_tIntersect (const point_type &origin, const point_type &dir, dist_type distance=-1.0, int mesh_id=-1)
 
template<typename point_type >
bool Occluded (const point_type &origin, const point_type &dir, float distance=-1, int mesh_id=-1)
 
template<typename point_type >
bool PointIntersection (point_type &origin, const point_type &dir, float distance=-1, int mesh_id=-1)
 

Private Types

using vertex_t = double
 
using real_t = double
 
using Intersection = nanort::TriangleIntersection< real_t >
 
using Intersector = nanort::TriangleIntersector< vertex_t, Intersection >
 
using NanoBVH = nanort::BVHAccel< vertex_t >
 
using NanoRay = nanort::Ray< real_t >
 

Private Member Functions

template<typename dist_type = real_t, typename N >
NanoRay ConstructRay (const N &origin, const N &direction, dist_type max_dist=std::numeric_limits< dist_type >::max())
 
Intersection CreateHit ()
 
template<typename point_type , typename dist_type >
void MovePoint (point_type &point, const point_type &dir, dist_type dist)
 

Private Attributes

std::unique_ptr< Intersectorintersector
 Triangle Intersector. More...
 
NanoBVH bvh
 A NanoRT BVH. More...
 
const real_t min_dist = 0.0
 
std::vector< real_tvertices
 
std::vector< unsigned int > indices
 

Detailed Description

Definition at line 135 of file ray_data.h.

Member Typedef Documentation

◆ Intersection

◆ Intersector

◆ NanoBVH

Definition at line 142 of file ray_data.h.

◆ NanoRay

Definition at line 143 of file ray_data.h.

◆ real_t

Definition at line 139 of file ray_data.h.

◆ vertex_t

Definition at line 138 of file ray_data.h.

Constructor & Destructor Documentation

◆ NanoRTRayTracer() [1/2]

HF::RayTracer::NanoRTRayTracer::NanoRTRayTracer ( const HF::Geometry::MeshInfo< float > &  MI)

Construct a new raytracer with an instance of meshinfo.

Definition at line 122 of file nanort_raytracer.cpp.

References bvh, HF::Geometry::MeshInfo< numeric_type >::GetIndexPointer(), HF::Geometry::MeshInfo< numeric_type >::GetVertexPointer(), indices, intersector, and vertices.

+ Here is the call graph for this function:

◆ NanoRTRayTracer() [2/2]

HF::RayTracer::NanoRTRayTracer::NanoRTRayTracer ( const HF::Geometry::MeshInfo< double > &  MI)

Definition at line 143 of file nanort_raytracer.cpp.

References bvh, HF::Geometry::MeshInfo< numeric_type >::GetIndexPointer(), HF::Geometry::MeshInfo< numeric_type >::GetVertexPointer(), indices, intersector, and vertices.

+ Here is the call graph for this function:

Member Function Documentation

◆ ConstructRay()

template<typename dist_type = real_t, typename N >
NanoRay HF::RayTracer::NanoRTRayTracer::ConstructRay ( const N &  origin,
const N &  direction,
dist_type  max_dist = std::numeric_limits<dist_type>::max() 
)
inlineprivate

◆ CreateHit()

Intersection HF::RayTracer::NanoRTRayTracer::CreateHit ( )
inlineprivate

Definition at line 163 of file ray_data.h.

References nanort::TriangleIntersection< T >::prim_id, nanort::TriangleIntersection< T >::t, nanort::TriangleIntersection< T >::u, and nanort::TriangleIntersection< T >::v.

Referenced by Intersect().

+ Here is the caller graph for this function:

◆ Intersect()

template<typename point_type , typename dist_type = real_t>
HitStruct< real_t > HF::RayTracer::NanoRTRayTracer::Intersect ( const point_type &  origin,
const point_type &  dir,
dist_type  distance = -1.0,
int  mesh_id = -1 
)
inline

Definition at line 184 of file ray_data.h.

References bvh, CreateHit(), nanort::TriangleIntersection< T >::t, and nanort::BVHAccel< T >::Traverse().

Referenced by Occluded(), and PointIntersection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MovePoint()

template<typename point_type , typename dist_type >
void HF::RayTracer::NanoRTRayTracer::MovePoint ( point_type &  point,
const point_type &  dir,
dist_type  dist 
)
inlineprivate

Definition at line 170 of file ray_data.h.

Referenced by PointIntersection().

+ Here is the caller graph for this function:

◆ Occluded()

template<typename point_type >
bool HF::RayTracer::NanoRTRayTracer::Occluded ( const point_type &  origin,
const point_type &  dir,
float  distance = -1,
int  mesh_id = -1 
)
inline

Definition at line 208 of file ray_data.h.

References Intersect().

+ Here is the call graph for this function:

◆ PointIntersection()

template<typename point_type >
bool HF::RayTracer::NanoRTRayTracer::PointIntersection ( point_type &  origin,
const point_type &  dir,
float  distance = -1,
int  mesh_id = -1 
)
inline

Definition at line 218 of file ray_data.h.

References Intersect(), and MovePoint().

+ Here is the call graph for this function:

Member Data Documentation

◆ bvh

NanoBVH HF::RayTracer::NanoRTRayTracer::bvh
private

A NanoRT BVH.

Definition at line 147 of file ray_data.h.

Referenced by NanoRTRayTracer(), and Intersect().

◆ indices

std::vector<unsigned int> HF::RayTracer::NanoRTRayTracer::indices
private

Definition at line 151 of file ray_data.h.

Referenced by NanoRTRayTracer().

◆ intersector

std::unique_ptr<Intersector> HF::RayTracer::NanoRTRayTracer::intersector
private

Triangle Intersector.

Definition at line 146 of file ray_data.h.

Referenced by NanoRTRayTracer().

◆ min_dist

const real_t HF::RayTracer::NanoRTRayTracer::min_dist = 0.0
private

Definition at line 149 of file ray_data.h.

Referenced by ConstructRay().

◆ vertices

std::vector<real_t> HF::RayTracer::NanoRTRayTracer::vertices
private

Definition at line 150 of file ray_data.h.

Referenced by NanoRTRayTracer().


The documentation for this class was generated from the following files: