XDG Interface
-
namespace xdg
-
class XDG
Public Functions
-
XDG() = default
- std::shared_ptr<MeshManager> mesh_manager,
- RTLibrary ray_tracing_lib = RTLibrary::EMBREE,
-
void prepare_raytracer()
-
void prepare_volume_for_raytracing(MeshID volume)
-
MeshID find_volume(const Position &point, const Direction &direction) const
- bool point_in_volume(
- MeshID volume,
- const Position point,
- const Direction *direction = nullptr,
- const std::vector<MeshID> *exclude_primitives = nullptr,
- std::pair<double, MeshID> ray_fire(
- MeshID volume,
- const Position &origin,
- const Direction &direction,
- const double dist_limit = INFTY,
- HitOrientation orientation = HitOrientation::EXITING,
- std::vector<MeshID> *const exclude_primitives = nullptr,
- void closest(
- MeshID volume,
- const Position &origin,
- double &dist,
- MeshID &triangle,
-
void closest(MeshID volume, const Position &origin, double &dist) const
- bool occluded(
- MeshID volume,
- const Position &origin,
- const Direction &direction,
- double &dist,
- Direction surface_normal(
- MeshID surface,
- Position point,
- const std::vector<MeshID> *exclude_primitives = nullptr,
-
double measure_volume(MeshID volume) const
-
double measure_surface_area(MeshID surface) const
-
double measure_volume_area(MeshID surface) const
- std::shared_ptr<MeshManager> mesh_manager,
-
inline const std::shared_ptr<MeshManager> &mesh_manager() const
Public Static Functions
Private Functions
-
double _triangle_volume_contribution(const PrimitiveRef &triangle) const
-
double _triangle_area_contribution(const PrimitiveRef &triangle) const
-
XDG() = default
-
class XDG
-
namespace xdg
-
class MeshManager
Subclassed by xdg::LibMeshManager, xdg::MOABMeshManager
Public Functions
-
virtual ~MeshManager() = default
-
virtual void load_file(const std::string &filepath) = 0
-
virtual void init() = 0
-
virtual int num_volumes() const = 0
-
virtual int num_surfaces() const = 0
-
virtual int num_ents_of_dimension(int dim) const = 0
-
virtual int num_volume_elements(MeshID volume) const = 0
-
virtual int num_volume_faces(MeshID volume) const = 0
-
virtual int num_surface_faces(MeshID surface) const = 0
-
virtual std::vector<MeshID> get_volume_elements(MeshID volume) const = 0
-
std::vector<MeshID> get_volume_faces(MeshID volume) const
-
virtual std::vector<MeshID> get_surface_faces(MeshID surface) const = 0
-
virtual std::vector<Vertex> element_vertices(MeshID element) const = 0
-
virtual std::array<Vertex, 3> face_vertices(MeshID element) const = 0
-
virtual std::vector<Vertex> get_surface_vertices(MeshID surface) const = 0
- virtual std::pair<std::vector<Vertex>, std::vector<int>> get_surface_mesh(
- MeshID surface,
-
virtual SurfaceElementType get_surface_element_type(MeshID element) const = 0
-
BoundingBox element_bounding_box(MeshID element) const
-
BoundingBox face_bounding_box(MeshID element) const
-
BoundingBox volume_bounding_box(MeshID volume) const
-
BoundingBox surface_bounding_box(MeshID surface) const
-
Direction face_normal(MeshID element) const
-
std::pair<MeshID, MeshID> get_parent_volumes(MeshID surface) const
-
virtual std::vector<MeshID> get_volume_surfaces(MeshID volume) const = 0
-
virtual std::pair<MeshID, MeshID> surface_senses(MeshID surface) const = 0
-
virtual Sense surface_sense(MeshID surface, MeshID volume) const = 0
-
virtual MeshID create_volume() = 0
- virtual void add_surface_to_volume(
- MeshID volume,
- MeshID surface,
- Sense sense,
- bool overwrite = false,
-
MeshID next_volume(MeshID current_volume, MeshID surface) const
-
MeshID next_volume_id() const
-
MeshID next_surface_id() const
-
MeshID create_implicit_complement()
-
virtual void parse_metadata() = 0
-
bool volume_has_property(MeshID volume, PropertyType type) const
-
bool surface_has_property(MeshID surface, PropertyType type) const
-
Property get_volume_property(MeshID volume, PropertyType type) const
-
Property get_surface_property(MeshID surface, PropertyType type) const
-
inline const std::vector<MeshID> &volumes() const
-
inline std::vector<MeshID> &volumes()
-
inline const std::vector<MeshID> &surfaces() const
-
inline std::vector<MeshID> &surfaces()
-
inline MeshID implicit_complement() const
-
virtual MeshLibrary mesh_library() const = 0
-
virtual ~MeshManager() = default
-
class MeshManager
-
namespace xdg
-
class RayTracer
Subclassed by xdg::EmbreeRayTracer
Public Functions
-
virtual ~RayTracer()
-
virtual void init() = 0
- const std::shared_ptr<MeshManager> mesh_manager,
- MeshID volume,
- virtual bool point_in_volume(
- TreeID tree,
- const Position &point,
- const Direction *direction = nullptr,
- const std::vector<MeshID> *exclude_primitives = nullptr,
- virtual std::pair<double, MeshID> ray_fire(
- TreeID tree,
- const Position &origin,
- const Direction &direction,
- const double dist_limit = INFTY,
- HitOrientation orientation = HitOrientation::EXITING,
- std::vector<MeshID> *const exclude_primitives = nullptr,
- virtual void closest(
- TreeID tree,
- const Position &origin,
- double &dist,
- MeshID &triangle,
-
virtual void closest(TreeID tree, const Position &origin, double &dist) = 0
- virtual bool occluded(
- TreeID tree,
- const Position &origin,
- const Direction &direction,
- double &dist,
-
inline int num_registered_trees() const
-
inline const std::vector<MeshID> &trees() const
- virtual const std::shared_ptr<GeometryUserData> &geometry_data(
- MeshID surface,
Protected Functions
- const std::shared_ptr<MeshManager> mesh_manager,
- MeshID volume_id,
-
TreeID next_tree_id() const
-
virtual ~RayTracer()
-
class RayTracer
-
namespace xdg
-
struct RTCDPointQuery : public RTCPointQuery
- #include <ray.h>
Structure extending Embree's RTCPointQuery to include double precision values
Public Functions
-
inline RTCDPointQuery()
-
inline void set_radius(double rad)
Set both the single and double precision versions of the query radius.
-
inline void set_point(const double xyz[3])
Set both the single and double precision versions of the query location.
-
inline void set_point(const Position &xyz)
Public Members
-
unsigned int primID = RTC_INVALID_GEOMETRY_ID
-
unsigned int geomID = RTC_INVALID_GEOMETRY_ID
-
double dblx
-
double dbly
-
double dblz
-
const PrimitiveRef *primitive_ref = {nullptr}
Pointer to the primitive reference for this hit.
-
double dradius
Double precision version of the query distance.
-
inline RTCDPointQuery()
-
struct RTCDualHit : public RTCHit
- #include <ray.h>
Structure extending Embree's RayHit to include a double precision version of the primitive normal
Public Functions
-
inline RTCDualHit()
-
inline RTCDualHit()
-
struct RTCDualRay : public RTCRay
- #include <ray.h>
Stucture that is an extension of Embree's RTCRay with double precision versions of the origin, direction and intersection distance.
Subclassed by xdg::RTCElementDualRay, xdg::RTCSurfaceDualRay
Public Functions
-
inline RTCDualRay()
-
inline void set_org(double o[3])
Set both the single and double precision versions of the ray origin.
-
inline void set_org(const double o[3])
Set both the single and double precision versions of the ray origin.
-
inline void set_org(const Vec3da &o)
Set both the single and double precision versions of the ray origin.
-
inline void set_dir(double o[3])
Set both the single and double precision versions of the ray direction.
-
inline void set_dir(const double o[3])
Set both the single and double precision versions of the ray direction.
-
inline void set_dir(const Vec3da &o)
Set both the single and double precision versions of the ray direction.
-
inline void set_tfar(double d)
Set both the single and double precision versions of the ray max distance.
-
inline void set_tnear(double d)
Set both the single and double precision versions of the ray near distance.
-
inline RTCDualRay()
-
struct RTCDualRayHit
- #include <ray.h>
Stucture combining the ray and ray-hit structures to be passed to Embree queries
Public Functions
-
inline double dot_prod()
Compute the dot product of the ray direction and current hit normal.
-
inline double dot_prod()
-
struct RTCElementDualRay : public xdg::RTCDualRay
Public Functions
-
inline RTCElementDualRay()
Public Members
-
MeshID element
ID of the element this ray is associated with.
-
inline RTCElementDualRay()
-
struct RTCSurfaceDualRay : public xdg::RTCDualRay
Public Members
-
RayFireType rf_type = {RayFireType::VOLUME}
Enum indicating the type of query this ray is used for.
-
HitOrientation orientation = {HitOrientation::EXITING}
Enum indicating what hits to accept based on orientation.
-
const std::vector<MeshID> *exclude_primitives = {nullptr}
-
TreeID volume_tree = {ID_NONE}
< Set of primitives to exclude from the query
-
RayFireType rf_type = {RayFireType::VOLUME}
-
struct RTCDPointQuery : public RTCPointQuery