MeshLib
 
Loading...
Searching...
No Matches
MRAABBTreePolyline.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRAABBTreeBase.h"
4#include "MRVector.h"
5
6namespace MR
7{
8
11
12template<typename V>
14
15template<>
16struct PolylineTraits<Vector2f>
17{
18 using Polyline = MR::Polyline2;
19};
20
21template<>
23{
24 using Polyline = MR::Polyline3;
25};
26
28template<typename V>
29class AABBTreePolyline : public AABBTreeBase<LineTreeTraits<V>>
30{
32
33public:
34 using typename Base::Traits;
35 using typename Base::Node;
36 using typename Base::NodeVec;
37
38public:
40 MRMESH_API explicit AABBTreePolyline( const typename PolylineTraits<V>::Polyline & polyline );
41
43 MRMESH_API AABBTreePolyline( const Mesh& mesh, const UndirectedEdgeBitSet & edgeSet ) MR_REQUIRES_IF_SUPPORTED( V::elements == 3 );
44
45 AABBTreePolyline() = default;
46 AABBTreePolyline( AABBTreePolyline && ) noexcept = default;
47 AABBTreePolyline & operator =( AABBTreePolyline && ) noexcept = default;
48
49private:
51 AABBTreePolyline( const AABBTreePolyline & ) = default;
52
54 AABBTreePolyline & operator =( const AABBTreePolyline & ) = default;
55
57
58 using Base::nodes_;
59};
60
62
63} // namespace MR
#define MR_REQUIRES_IF_SUPPORTED(...)
Definition MRMacros.h:26
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
base class for most AABB-trees (except for AABBTreePoints)
Definition MRAABBTreeBase.h:12
NodeVec nodes_
Definition MRAABBTreeBase.h:60
AABBTreeNode< Traits > Node
Definition MRAABBTreeBase.h:15
LineTreeTraits< V > Traits
Definition MRAABBTreeBase.h:14
Vector< Node, NodeId > NodeVec
Definition MRAABBTreeBase.h:16
bounding volume hierarchy for line segments
Definition MRAABBTreePolyline.h:30
MRMESH_API AABBTreePolyline(const Mesh &mesh, const UndirectedEdgeBitSet &edgeSet) MR_REQUIRES_IF_SUPPORTED( AABBTreePolyline)()=default
creates tree for selected edges on the mesh (only for 3d tree)
Definition MRAABBTreePolyline.h:45
MRMESH_API AABBTreePolyline(const typename PolylineTraits< V >::Polyline &polyline)
creates tree for given polyline
AABBTreePolyline(AABBTreePolyline &&) noexcept=default
Definition MRUniqueThreadSafeOwner.h:20
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:7
Definition MRMesh/MRMesh.h:23
MR::Polyline2 Polyline
Definition MRAABBTreePolyline.h:18
MR::Polyline3 Polyline
Definition MRAABBTreePolyline.h:24
Definition MRAABBTreePolyline.h:13