1#ifndef CHI_MESH_RAYTRACING_H
2#define CHI_MESH_RAYTRACING_H
4#include "../chi_mesh.h"
34 std::vector<double> in_cell_sizes,
35 bool in_perform_concavity_checks =
true) :
60 int function_depth=0);
73 bool& intersection_found,
74 bool& backward_tolerance_hit,
79 bool& intersection_found,
80 bool& backward_tolerance_hit,
85 bool& intersection_found,
86 bool& backward_tolerance_hit,
96 std::pair<double,double>* weights=
nullptr);
106 double* distance_to_intersection =
nullptr);
116 double* distance_to_intersection =
nullptr);
128 const std::vector<chi_mesh::Vector3>& tet_points);
136 std::vector<double> &segment_lengths);
void SetTolerancesFromCellSize(double cell_size)
const chi_mesh::MeshContinuum & reference_grid_
RayTracerOutputInformation TraceRay(const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, int function_depth=0)
bool perform_concavity_checks_
std::vector< double > cell_sizes_
double extension_distance_
void TraceSlab(const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
void TracePolyhedron(const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
RayTracerOutputInformation TraceIncidentRay(const Cell &cell, const Vector3 &pos_i, const Vector3 &omega_i)
double backward_tolerance_
void TracePolygon(const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
const chi_mesh::MeshContinuum & Grid() const
RayTracer(const chi_mesh::MeshContinuum &grid, std::vector< double > in_cell_sizes, bool in_perform_concavity_checks=true)
bool CheckPlaneTetIntersect(const chi_mesh::Normal &plane_normal, const chi_mesh::Vector3 &plane_point, const std::vector< chi_mesh::Vector3 > &tet_points)
bool CheckLineIntersectTriangle2(const chi_mesh::Vector3 &tri_point0, const chi_mesh::Vector3 &tri_point1, const chi_mesh::Vector3 &tri_point2, const chi_mesh::Vector3 &ray_posi, const chi_mesh::Vector3 &ray_dir, chi_mesh::Vector3 &intersection_point, double *distance_to_intersection=nullptr)
bool CheckPlaneLineIntersect(const chi_mesh::Normal &plane_normal, const chi_mesh::Vector3 &plane_point, const chi_mesh::Vector3 &line_point_0, const chi_mesh::Vector3 &line_point_1, chi_mesh::Vector3 &intersection_point, std::pair< double, double > *weights=nullptr)
void PopulateRaySegmentLengths(const chi_mesh::MeshContinuum &grid, const Cell &cell, const chi_mesh::Vector3 &line_point0, const chi_mesh::Vector3 &line_point1, const chi_mesh::Vector3 &omega, std::vector< double > &segment_lengths)
bool CheckLineIntersectStrip(const chi_mesh::Vector3 &strip_point0, const chi_mesh::Vector3 &strip_point1, const chi_mesh::Vector3 &strip_normal, const chi_mesh::Vector3 &line_point0, const chi_mesh::Vector3 &line_point1, chi_mesh::Vector3 &intersection_point, double *distance_to_intersection=nullptr)
bool CheckPointInTriangle(const chi_mesh::Vector3 &v0, const chi_mesh::Vector3 &v1, const chi_mesh::Vector3 &v2, const chi_mesh::Normal &n, const chi_mesh::Vector3 &point)