cheshirekow  v0.1.0
line_walker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
26 #ifndef EDELSBRUNNER96_LINE_WALKER_H_
27 #define EDELSBRUNNER96_LINE_WALKER_H_
28 
29 #include <list>
30 
31 namespace edelsbrunner96 {
32 
37 template <typename Traits>
38 typename Traits::SimplexRef LineWalk(typename Traits::Storage& storage,
39  typename Traits::SimplexRef s_0,
40  const typename Traits::Point& p);
41 
44 
59 template <typename Traits, typename InputIterator, typename OutputIterator>
60 void FeatureWalk(typename Traits::Storage& storage,
61  typename Traits::SimplexRef s_0,
62  InputIterator Vf_begin, InputIterator Vf_end,
63  OutputIterator out);
64 
66 template <typename Traits, class OutputIterator>
67 void FuzzyWalk_(typename Traits::Storage& storage,
68  const typename Traits::SimplexRef s_0,
69  const typename Traits::Point& x_q,
70  const typename Traits::Scalar epsilon,
71  std::list<typename Traits::SimplexRef>& search_queue,
72  OutputIterator out);
73 
77 
95 template <typename Traits, class OutputIterator>
96 void FuzzyWalk(typename Traits::Storage& storage,
97  const typename Traits::SimplexRef s_0,
98  const typename Traits::Point& x_q,
99  const typename Traits::Scalar epsilon,
100  OutputIterator out);
101 
103 template<class Traits>
104 bool IsVisible(
105  typename Traits::Storage& storage, typename Traits::SimplexRef s_ref,
106  const typename Traits::Point& x_q,
107  typename Traits::Scalar epsilon=0.0);
108 
111 template<class Traits, class OutputIterator>
112 void GetVisibleHull(
113  typename Traits::Storage& storage, typename Traits::SimplexRef s_0,
114  const typename Traits::Point& x_q,
115  OutputIterator out);
116 
119 template<class Traits, class OutputIterator>
120 void BreadthFirstSearch(typename Traits::Storage& storage,
121  typename Traits::SimplexRef simplex_ref,
122  OutputIterator out);
123 
124 } // namespace edelsbrunner96
125 
126 #endif // EDELSBRUNNER96_LINE_WALKER_H_
void FeatureWalk(typename Traits::Storage &storage, typename Traits::SimplexRef s_0, InputIterator Vf_begin, InputIterator Vf_end, OutputIterator out)
Given a sub-simplex feature and a simplex adjacent to that feature, enumerate all simplices that are ...
bool IsVisible(typename Traits::Storage &storage, typename Traits::SimplexRef s_ref, const typename Traits::Point &x_q, typename Traits::Scalar epsilon=0.0)
Given a hull simplex, return true if it is visible by the query point.
void FuzzyWalk_(typename Traits::Storage &storage, const typename Traits::SimplexRef s_0, const typename Traits::Point &x_q, const typename Traits::Scalar epsilon, std::list< typename Traits::SimplexRef > &search_queue, OutputIterator out)
Implementation, exposed so that the search_queue can be examined in tests.
Traits::SimplexRef LineWalk(typename Traits::Storage &storage, typename Traits::SimplexRef s_0, const typename Traits::Point &p)
Starting at the median point of simplex s_0, walk the triangulation in the direction of p until the s...
Definition: line_walker.hpp:42
void GetVisibleHull(typename Traits::Storage &storage, typename Traits::SimplexRef s_0, const typename Traits::Point &x_q, OutputIterator out)
Starting at some x-visible hull simplex, return a list of all x-visible hull simplices.
void FuzzyWalk(typename Traits::Storage &storage, const typename Traits::SimplexRef s_0, const typename Traits::Point &x_q, const typename Traits::Scalar epsilon, OutputIterator out)
Given a simplex in a triangulation and a query point, walk the triangulation in the direction of x_q ...
void BreadthFirstSearch(typename Traits::Storage &storage, typename Traits::SimplexRef simplex_ref, OutputIterator out)
Get a list of all simplices by breadth first search starting at simplex_ref.