OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
AABBTreeIndirect.hpp File Reference
#include <Eigen/Core>
#include <algorithm>
#include <cstddef>
#include <cassert>
#include <limits>
#include <type_traits>
#include <utility>
#include <vector>
#include <Eigen/Geometry>
#include "BoundingBox.hpp"
#include "Utils.hpp"
#include "libslic3r.h"
#include <igl/Hit.h>
Include dependency graph for AABBTreeIndirect.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Slic3r::AABBTreeIndirect::Tree< ANumDimensions, ACoordType >
struct  Slic3r::AABBTreeIndirect::Tree< ANumDimensions, ACoordType >::Node
class  Slic3r::AABBTreeIndirect::BoundingBoxWrapper
struct  Slic3r::AABBTreeIndirect::detail::RayIntersector< AVertexType, AIndexedFaceType, ATreeType, AVectorType >
struct  Slic3r::AABBTreeIndirect::detail::RayIntersectorHits< VertexType, IndexedFaceType, TreeType, VectorType >
struct  Slic3r::AABBTreeIndirect::detail::IndexedTriangleSetDistancer< AVertexType, AIndexedFaceType, ATreeType, AVectorType >
struct  Slic3r::AABBTreeIndirect::Intersecting< G >
struct  Slic3r::AABBTreeIndirect::Intersecting< Eigen::AlignedBox< CoordType, NumD > >
struct  Slic3r::AABBTreeIndirect::Within< G >
struct  Slic3r::AABBTreeIndirect::Within< Eigen::AlignedBox< CoordType, NumD > >

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/
namespace  Slic3r::AABBTreeIndirect
namespace  Slic3r::AABBTreeIndirect::detail

Typedefs

using Slic3r::AABBTreeIndirect::Tree2f = Tree<2, float>
using Slic3r::AABBTreeIndirect::Tree3f = Tree<3, float>
using Slic3r::AABBTreeIndirect::Tree2d = Tree<2, double>
using Slic3r::AABBTreeIndirect::Tree3d = Tree<3, double>

Functions

template<typename Derivedsource, typename Deriveddir, typename Scalar>
bool Slic3r::AABBTreeIndirect::detail::ray_box_intersect_invdir (const Eigen::MatrixBase< Derivedsource > &origin, const Eigen::MatrixBase< Deriveddir > &inv_dir, Eigen::AlignedBox< Scalar, 3 > box, const Scalar &t0, const Scalar &t1)
template<typename V, typename W>
std::enable_if_t< std::is_same< typename V::Scalar, double >::value &&std::is_same< typename W::Scalar, double >::value, bool > Slic3r::AABBTreeIndirect::detail::intersect_triangle (const V &orig, const V &dir, const W &vert0, const W &vert1, const W &vert2, double &t, double &u, double &v, double eps)
template<typename V, typename W>
std::enable_if_t< std::is_same< typename V::Scalar, double >::value &&!std::is_same< typename W::Scalar, double >::value, bool > Slic3r::AABBTreeIndirect::detail::intersect_triangle (const V &origin, const V &dir, const W &v0, const W &v1, const W &v2, double &t, double &u, double &v, double eps)
template<typename V, typename W>
std::enable_if_t<! std::is_same< typename V::Scalar, double >::value &&std::is_same< typename W::Scalar, double >::value, bool > Slic3r::AABBTreeIndirect::detail::intersect_triangle (const V &origin, const V &dir, const W &v0, const W &v1, const W &v2, double &t, double &u, double &v, double eps)
template<typename V, typename W>
std::enable_if_t<! std::is_same< typename V::Scalar, double >::value &&! std::is_same< typename W::Scalar, double >::value, bool > Slic3r::AABBTreeIndirect::detail::intersect_triangle (const V &origin, const V &dir, const W &v0, const W &v1, const W &v2, double &t, double &u, double &v, double eps)
template<typename Tree>
double Slic3r::AABBTreeIndirect::detail::intersect_triangle_epsilon (const Tree &tree)
template<typename RayIntersectorType, typename Scalar>
static bool Slic3r::AABBTreeIndirect::detail::intersect_ray_recursive_first_hit (RayIntersectorType &ray_intersector, size_t node_idx, Scalar min_t, igl::Hit< float > &hit)
template<typename RayIntersectorType>
static void Slic3r::AABBTreeIndirect::detail::intersect_ray_recursive_all_hits (RayIntersectorType &ray_intersector, size_t node_idx)
template<typename Vector>
static Vector Slic3r::AABBTreeIndirect::detail::closest_point_to_triangle (const Vector &p, const Vector &a, const Vector &b, const Vector &c)
template<typename IndexedPrimitivesDistancerType, typename Scalar>
static Scalar Slic3r::AABBTreeIndirect::detail::squared_distance_to_indexed_primitives_recursive (IndexedPrimitivesDistancerType &distancer, size_t node_idx, Scalar low_sqr_d, Scalar up_sqr_d, size_t &i, Eigen::PlainObjectBase< typename IndexedPrimitivesDistancerType::VectorType > &c)
template<typename IndexedPrimitivesDistancerType, typename Scalar>
static void Slic3r::AABBTreeIndirect::detail::indexed_primitives_within_distance_squared_recurisve (const IndexedPrimitivesDistancerType &distancer, size_t node_idx, Scalar squared_distance_limit, std::vector< size_t > &found_primitives_indices)
template<typename VertexType, typename IndexedFaceType>
Tree< 3, typename VertexType::Scalar > Slic3r::AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const typename VertexType::Scalar eps=0)
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
bool Slic3r::AABBTreeIndirect::intersect_ray_first_hit (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const TreeType &tree, const VectorType &origin, const VectorType &dir, igl::Hit< float > &hit, const double eps=0.000001)
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
bool Slic3r::AABBTreeIndirect::intersect_ray_all_hits (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const TreeType &tree, const VectorType &origin, const VectorType &dir, std::vector< igl::Hit< float > > &hits, const double eps=0.000001)
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
VectorType::Scalar Slic3r::AABBTreeIndirect::squared_distance_to_indexed_triangle_set (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const TreeType &tree, const VectorType &point, size_t &hit_idx_out, Eigen::PlainObjectBase< VectorType > &hit_point_out)
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
bool Slic3r::AABBTreeIndirect::is_any_triangle_in_radius (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const TreeType &tree, const VectorType &point, typename VectorType::Scalar &max_distance_squared)
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
std::vector< size_t > Slic3r::AABBTreeIndirect::all_triangles_in_radius (const std::vector< VertexType > &vertices, const std::vector< IndexedFaceType > &faces, const TreeType &tree, const VectorType &point, typename VectorType::Scalar max_distance_squared)
template<typename TreeType, typename VectorType>
void Slic3r::AABBTreeIndirect::get_candidate_idxs (const TreeType &tree, const VectorType &v, std::vector< size_t > &candidates, size_t node_idx=0)
template<class G>
auto Slic3r::AABBTreeIndirect::intersecting (const G &g)
template<class G>
auto Slic3r::AABBTreeIndirect::within (const G &g)
template<int Dims, typename T, typename Pred, typename Fn>
bool Slic3r::AABBTreeIndirect::detail::traverse_recurse (const Tree< Dims, T > &tree, size_t idx, Pred &&pred, Fn &&callback)
template<int Dims, typename T, typename Predicate, typename Fn>
void Slic3r::AABBTreeIndirect::traverse (const Tree< Dims, T > &tree, Predicate &&pred, Fn &&callback)

Class Documentation

◆ Slic3r::AABBTreeIndirect::detail::RayIntersector

struct Slic3r::AABBTreeIndirect::detail::RayIntersector
template<typename AVertexType, typename AIndexedFaceType, typename ATreeType, typename AVectorType>
struct Slic3r::AABBTreeIndirect::detail::RayIntersector< AVertexType, AIndexedFaceType, ATreeType, AVectorType >
Inheritance diagram for Slic3r::AABBTreeIndirect::detail::RayIntersector< AVertexType, AIndexedFaceType, ATreeType, AVectorType >:
Collaboration diagram for Slic3r::AABBTreeIndirect::detail::RayIntersector< AVertexType, AIndexedFaceType, ATreeType, AVectorType >:
Class Members
typedef AIndexedFaceType IndexedFaceType AIndexedFaceType
typedef ATreeType TreeType ATreeType
typedef AVectorType VectorType AVectorType
typedef AVertexType VertexType AVertexType
Class Members
const VectorType dir
const double eps
const vector< IndexedFaceType > & faces
const VectorType invdir
const VectorType origin
const TreeType & tree
const vector< VertexType > & vertices

◆ Slic3r::AABBTreeIndirect::Intersecting

struct Slic3r::AABBTreeIndirect::Intersecting
template<class G>
struct Slic3r::AABBTreeIndirect::Intersecting< G >
Inheritance diagram for Slic3r::AABBTreeIndirect::Intersecting< G >:

◆ Slic3r::AABBTreeIndirect::Within

struct Slic3r::AABBTreeIndirect::Within
template<class G>
struct Slic3r::AABBTreeIndirect::Within< G >
Inheritance diagram for Slic3r::AABBTreeIndirect::Within< G >: