OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::sla::IndexedMesh::hit_result Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/IndexedMesh.hpp>

Collaboration diagram for Slic3r::sla::IndexedMesh::hit_result:

Public Member Functions

 hit_result (double val=infty())
double distance () const
const Vec3d & direction () const
const Vec3d & source () const
Vec3d position () const
int face () const
bool is_valid () const
bool is_hit () const
const Vec3d & normal () const
bool is_inside () const

Static Public Member Functions

static constexpr double infty ()

Private Member Functions

 hit_result (const IndexedMesh &em)

Private Attributes

double m_t = infty()
int m_face_id = -1
const IndexedMesh * m_mesh = nullptr
Vec3d m_dir
Vec3d m_source
Vec3d m_normal

Friends

class IndexedMesh

Detailed Description

Constructor & Destructor Documentation

◆ hit_result() [1/2]

Slic3r::sla::IndexedMesh::hit_result::hit_result ( const IndexedMesh & em)
inlineexplicitprivate
90: m_mesh(&em) {}
const IndexedMesh * m_mesh
Definition IndexedMesh.hpp:82

References IndexedMesh, and m_mesh.

Here is the call graph for this function:

◆ hit_result() [2/2]

Slic3r::sla::IndexedMesh::hit_result::hit_result ( double val = infty())
inlineexplicit
95: m_t(val) {}
double m_t
Definition IndexedMesh.hpp:80

References m_t.

Member Function Documentation

◆ direction()

const Vec3d & Slic3r::sla::IndexedMesh::hit_result::direction ( ) const
inline
98{ return m_dir; }
Vec3d m_dir
Definition IndexedMesh.hpp:83

References m_dir.

◆ distance()

double Slic3r::sla::IndexedMesh::hit_result::distance ( ) const
inline
97{ return m_t; }

References m_t.

Referenced by Slic3r::sla::SupportTreeBuildsteps::bridge_mesh_distance(), Slic3r::contour_extrusion_path(), and Slic3r::sla::SupportTreeBuildsteps::filter().

Here is the caller graph for this function:

◆ face()

int Slic3r::sla::IndexedMesh::hit_result::face ( ) const
inline
101{ return m_face_id; }
int m_face_id
Definition IndexedMesh.hpp:81

References m_face_id.

◆ infty()

constexpr double Slic3r::sla::IndexedMesh::hit_result::infty ( )
inlinestaticconstexpr
93{ return std::numeric_limits<double>::infinity(); }

Referenced by Slic3r::sla::DrainHole::get_intersections().

Here is the caller graph for this function:

◆ is_hit()

bool Slic3r::sla::IndexedMesh::hit_result::is_hit ( ) const
inline
103{ return m_face_id >= 0 && !std::isinf(m_t); }

References m_face_id, and m_t.

Referenced by Slic3r::contour_extrusion_path(), and is_inside().

Here is the caller graph for this function:

◆ is_inside()

bool Slic3r::sla::IndexedMesh::hit_result::is_inside ( ) const
inline
110 {
111 return is_hit() && normal().dot(m_dir) > 0;
112 }
bool is_hit() const
Definition IndexedMesh.hpp:103
const Vec3d & normal() const
Definition IndexedMesh.hpp:105

References is_hit(), m_dir, and normal().

Here is the call graph for this function:

◆ is_valid()

bool Slic3r::sla::IndexedMesh::hit_result::is_valid ( ) const
inline
102{ return m_mesh != nullptr; }

References m_mesh.

Referenced by normal().

Here is the caller graph for this function:

◆ normal()

const Vec3d & Slic3r::sla::IndexedMesh::hit_result::normal ( ) const
inline
105 {
106 assert(is_valid());
107 return m_normal;
108 }
bool is_valid() const
Definition IndexedMesh.hpp:102
Vec3d m_normal
Definition IndexedMesh.hpp:85

References is_valid(), and m_normal.

Referenced by Slic3r::contour_extrusion_path(), and is_inside().

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

◆ position()

Vec3d Slic3r::sla::IndexedMesh::hit_result::position ( ) const
inline
100{ return m_source + m_dir * m_t; }
Vec3d m_source
Definition IndexedMesh.hpp:84

References m_dir, m_source, and m_t.

◆ source()

const Vec3d & Slic3r::sla::IndexedMesh::hit_result::source ( ) const
inline
99{ return m_source; }

References m_source.

◆ IndexedMesh

friend class IndexedMesh
friend

References IndexedMesh.

Referenced by hit_result(), and IndexedMesh.

Member Data Documentation

◆ m_dir

Vec3d Slic3r::sla::IndexedMesh::hit_result::m_dir
private

◆ m_face_id

int Slic3r::sla::IndexedMesh::hit_result::m_face_id = -1
private

◆ m_mesh

const IndexedMesh* Slic3r::sla::IndexedMesh::hit_result::m_mesh = nullptr
private

Referenced by hit_result(), and is_valid().

◆ m_normal

Vec3d Slic3r::sla::IndexedMesh::hit_result::m_normal
private

◆ m_source

Vec3d Slic3r::sla::IndexedMesh::hit_result::m_source
private

◆ m_t

double Slic3r::sla::IndexedMesh::hit_result::m_t = infty()
private

The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/IndexedMesh.hpp