ongoing renaming

This commit is contained in:
Sven Oesau 2023-11-15 14:46:59 +01:00
parent 2c87155449
commit 633e4e7b0c
10 changed files with 82 additions and 82 deletions

View File

@ -102,7 +102,7 @@
\package_listing{Scale_space_reconstruction_3}
\package_listing{Advancing_front_surface_reconstruction}
\package_listing{Polygonal_surface_reconstruction}
\package_listing{Kinetic_shape_reconstruction}
\package_listing{Kinetic_shape_partition}
\package_listing{Optimal_transportation_reconstruction_2}
\cgalPackageSection{PartGeometryProcessing,Geometry Processing}

View File

@ -20,7 +20,7 @@ if(Boost_FOUND)
message(STATUS "Found Eigen")
include(CGAL_Eigen_support)
set(targets kinetic_partition)
set(targets kinetic_partition kinetic_2d)
set(project_linked_libraries)
set(project_compilation_definitions)

View File

@ -10,22 +10,22 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_DATA_STRUCTURE_H
#define CGAL_KSR_2_DATA_STRUCTURE_H
#ifndef CGAL_KSP_2_DATA_STRUCTURE_H
#define CGAL_KSP_2_DATA_STRUCTURE_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSR_2/Support_line.h>
#include <CGAL/KSR_2/Segment.h>
#include <CGAL/KSR_2/Vertex.h>
#include <CGAL/KSP/utils.h>
#include <CGAL/KSP_2/Support_line.h>
#include <CGAL/KSP_2/Segment.h>
#include <CGAL/KSP_2/Vertex.h>
#include <CGAL/KSR_2/Meta_vertex.h>
#include <CGAL/KSP_2/Meta_vertex.h>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename GeomTraits>
@ -41,11 +41,11 @@ public:
typedef typename Kernel::Line_2 Line_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef KSR_2::Support_line<Kernel> Support_line;
typedef KSR_2::Segment Segment;
typedef KSR_2::Vertex<FT> Vertex;
typedef KSP_2::Support_line<Kernel> Support_line;
typedef KSP_2::Segment Segment;
typedef KSP_2::Vertex<FT> Vertex;
typedef KSR_2::Meta_vertex<Point_2> Meta_vertex;
typedef KSP_2::Meta_vertex<Point_2> Meta_vertex;
typedef std::vector<Support_line> Support_lines;
typedef std::vector<Segment> Segments;
@ -109,7 +109,7 @@ public:
std::string segment_str (std::size_t segment_idx) const
{
return "Segment[" + std::to_string(segment_idx)
+ " from " + (segment(segment_idx).input_idx() == KSR::no_element() ?
+ " from " + (segment(segment_idx).input_idx() == KSP::no_element() ?
"bbox" : std::to_string(segment(segment_idx).input_idx()))
+ "](v" + std::to_string(segment(segment_idx).source_idx())
+ "->v" + std::to_string(segment(segment_idx).target_idx())
@ -213,7 +213,7 @@ public:
{ return meta_vertex_of_vertex(m_vertices[vertex_idx]); }
bool has_meta_vertex (const Vertex& vertex) const
{ return vertex.meta_vertex_idx() != KSR::no_element(); }
{ return vertex.meta_vertex_idx() != KSP::no_element(); }
bool has_meta_vertex (std::size_t vertex_idx) const
{ return has_meta_vertex (m_vertices[vertex_idx]); }
@ -290,7 +290,7 @@ public:
bool is_bbox_meta_edge (std::size_t source_idx, std::size_t target_idx) const
{
std::size_t common_line_idx = KSR::no_element();
std::size_t common_line_idx = KSP::no_element();
for (std::size_t support_line_idx : meta_vertex(source_idx).support_lines_idx())
if (m_meta_vertices[target_idx].support_lines_idx().find(support_line_idx)
@ -300,7 +300,7 @@ public:
break;
}
CGAL_assertion (common_line_idx != KSR::no_element());
CGAL_assertion (common_line_idx != KSP::no_element());
return is_bbox_support_line (common_line_idx);
}
@ -363,11 +363,11 @@ public:
return std::size_t(m_support_lines.size() - 1);
}
Segment& add_segment (const Segment_2 segment, std::size_t input_idx = KSR::no_element())
Segment& add_segment (const Segment_2 segment, std::size_t input_idx = KSP::no_element())
{
// Check if support line exists first
Support_line new_support_line (segment);
std::size_t support_line_idx = KSR::no_element();
std::size_t support_line_idx = KSP::no_element();
for (std::size_t i = 0; i < number_of_support_lines(); ++ i)
if (new_support_line == support_line(i))
{
@ -375,12 +375,12 @@ public:
break;
}
if (support_line_idx == KSR::no_element())
if (support_line_idx == KSP::no_element())
{
support_line_idx = number_of_support_lines();
m_support_lines.push_back (new_support_line);
if (input_idx == KSR::no_element())
if (input_idx == KSP::no_element())
{
m_support_lines.back().minimum() = m_support_lines.back().to_1d (segment.source());
m_support_lines.back().maximum() = m_support_lines.back().to_1d (segment.target());
@ -393,7 +393,7 @@ public:
for (std::size_t i = 0; i < 4; ++ i)
{
Point_2 point;
if (!KSR::intersection(m_support_lines[i].line(), m_support_lines.back().line(), point))
if (!KSP::intersection(m_support_lines[i].line(), m_support_lines.back().line(), point))
continue;
FT position = m_support_lines.back().to_1d (point);
@ -436,7 +436,7 @@ public:
std::size_t add_meta_vertex (const Point_2& point,
std::size_t support_line_idx_0,
std::size_t support_line_idx_1 = KSR::no_element())
std::size_t support_line_idx_1 = KSP::no_element())
{
// Avoid several points almost equal
Point_2 p (1e-10 * std::floor(CGAL::to_double(point.x()) / 1e-10),
@ -452,7 +452,7 @@ public:
for (std::size_t support_line_idx : { support_line_idx_0, support_line_idx_1 })
{
if (support_line_idx != KSR::no_element())
if (support_line_idx != KSP::no_element())
{
meta_vertex(meta_vertex_idx).support_lines_idx().insert (support_line_idx);
@ -464,7 +464,7 @@ public:
}
// Special case = meta vertex is deadend of one line
if (support_line_idx_1 == KSR::no_element())
if (support_line_idx_1 == KSP::no_element())
{
meta_vertex(meta_vertex_idx).make_deadend_of (support_line_idx_0);
}
@ -585,7 +585,7 @@ public:
m_vertices[source_idx].freeze(m_current_time);
// Release other end
m_vertices[target_idx].meta_vertex_idx() = KSR::no_element();
m_vertices[target_idx].meta_vertex_idx() = KSP::no_element();
return target_idx;
}
@ -598,7 +598,7 @@ public:
};
}} // namespace CGAL::KSR_3
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_3_DATA_STRUCTURE_H
#endif // CGAL_KSP_2_DATA_STRUCTURE_H

View File

@ -10,17 +10,17 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_EVENT_H
#define CGAL_KSR_2_EVENT_H
#ifndef CGAL_KSP_2_EVENT_H
#define CGAL_KSP_2_EVENT_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSP/utils.h>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename GeomTraits>
@ -68,7 +68,7 @@ public:
};
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_EVENT_H
#endif // CGAL_KSP_2_EVENT_H

View File

@ -10,13 +10,13 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_EVENT_QUEUE_H
#define CGAL_KSR_2_EVENT_QUEUE_H
#ifndef CGAL_KSP_2_EVENT_QUEUE_H
#define CGAL_KSP_2_EVENT_QUEUE_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSR_2/Event.h>
#include <CGAL/KSP/utils.h>
#include <CGAL/KSP_2/Event.h>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
@ -26,7 +26,7 @@
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename GeomTraits>
@ -36,7 +36,7 @@ public:
typedef GeomTraits Kernel;
typedef typename Kernel::FT FT;
typedef KSR_2::Event<GeomTraits> Event;
typedef KSP_2::Event<GeomTraits> Event;
private:
@ -101,7 +101,7 @@ public:
};
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_EVENT_QUEUE_H
#endif // CGAL_KSP_2_EVENT_QUEUE_H

View File

@ -10,18 +10,18 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_META_VERTEX_H
#define CGAL_KSR_2_META_VERTEX_H
#ifndef CGAL_KSP_2_META_VERTEX_H
#define CGAL_KSP_2_META_VERTEX_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSP/utils.h>
#include <set>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename Point_2>
@ -58,7 +58,7 @@ public:
};
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_META_VERTEX_H
#endif // CGAL_KSP_2_META_VERTEX_H

View File

@ -10,15 +10,15 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_SEGMENT_H
#define CGAL_KSR_2_SEGMENT_H
#ifndef CGAL_KSP_2_SEGMENT_H
#define CGAL_KSP_2_SEGMENT_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
class Segment
@ -48,7 +48,7 @@ public:
};
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_POLYGON_H
#endif // CGAL_KSP_2_POLYGON_H

View File

@ -10,18 +10,18 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_SUPPORT_LINE_H
#define CGAL_KSR_2_SUPPORT_LINE_H
#ifndef CGAL_KSP_2_SUPPORT_LINE_H
#define CGAL_KSP_2_SUPPORT_LINE_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSR_2/Vertex.h>
#include <CGAL/KSP/utils.h>
#include <CGAL/KSP_2/Vertex.h>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename GeomTraits>
@ -55,7 +55,7 @@ public:
, m_connected_components(1)
{
m_origin = CGAL::midpoint (segment.source(), segment.target());
m_vector = KSR::normalize (Vector_2 (segment.source(), segment.target()));
m_vector = KSP::normalize (Vector_2 (segment.source(), segment.target()));
}
Line_2 line() const { return Line_2 (m_origin, m_vector); }
@ -121,7 +121,7 @@ bool operator==<CGAL::Exact_predicates_exact_constructions_kernel>
}
#endif
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_SUPPORT_LINE_H
#endif // CGAL_KSP_2_SUPPORT_LINE_H

View File

@ -10,17 +10,17 @@
//
// Author(s) : Simon Giraudot
#ifndef CGAL_KSR_2_VERTEX_H
#define CGAL_KSR_2_VERTEX_H
#ifndef CGAL_KSP_2_VERTEX_H
#define CGAL_KSP_2_VERTEX_H
//#include <CGAL/license/Kinetic_shape_reconstruction.h>
#include <CGAL/KSR/utils.h>
#include <CGAL/KSP/utils.h>
namespace CGAL
{
namespace KSR_2
namespace KSP_2
{
template <typename FT>
@ -39,13 +39,13 @@ public:
Vertex () { }
Vertex (FT point,
std::size_t segment_idx = KSR::no_element(),
std::size_t segment_idx = KSP::no_element(),
unsigned int remaining_intersections = 0)
: m_point (point)
, m_direction (0)
, m_segment_idx (segment_idx)
, m_remaining_intersections(remaining_intersections)
, m_meta_vertex_idx (KSR::no_element())
, m_meta_vertex_idx (KSP::no_element())
{
}
@ -82,7 +82,7 @@ public:
};
}} // namespace CGAL::KSR_2
}} // namespace CGAL::KSP_2
#endif // CGAL_KSR_2_VERTEX_H
#endif // CGAL_KSP_2_VERTEX_H

View File

@ -43,15 +43,15 @@ public:
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Vector_2 Vector_2;
typedef KSR_2::Data_structure<Kernel> Data;
typedef KSP_2::Data_structure<Kernel> Data;
typedef typename Data::Support_line Support_line;
typedef typename Data::Segment Segment;
typedef typename Data::Vertex Vertex;
typedef typename Data::Meta_vertex Meta_vertex;
typedef KSR_2::Event<Kernel> Event;
typedef KSR_2::Event_queue<Kernel> Event_queue;
typedef KSP_2::Event<Kernel> Event;
typedef KSP_2::Event_queue<Kernel> Event_queue;
private:
@ -124,7 +124,7 @@ public:
const Support_line& support_line = m_data.support_line(i);
for (std::size_t s : support_line.segments_idx())
{
if (s == KSR::no_element())
if (s == KSP::no_element())
{
if (verbose)
std::cerr << "ERROR: Support_line[" << i
@ -268,7 +268,7 @@ public:
<< "] is on Segment[-1]" << std::endl;
return false;
}
// if (vertex.meta_vertex_idx() == KSR::no_element())
// if (vertex.meta_vertex_idx() == KSP::no_element())
// {
// if (verbose)
// std::cerr << "ERROR: Vertex[" << i
@ -618,7 +618,7 @@ private:
!= m_data.segment(segment_idx_b).support_line_idx());
Point_2 point;
if (!KSR::intersection(segments_2[segment_idx_a], segments_2[segment_idx_b], point))
if (!KSP::intersection(segments_2[segment_idx_a], segments_2[segment_idx_b], point))
return;
todo.push_back (std::make_tuple (point,
@ -712,7 +712,7 @@ private:
continue;
Point_2 point;
if (!KSR::intersection(si, segments_2[segment_idx], point))
if (!KSP::intersection(si, segments_2[segment_idx], point))
continue;
Support_line& sli = m_data.support_line_of_vertex(vertex);
@ -896,7 +896,7 @@ private:
m_data.vertex(ev.vertex_idx()).remaining_intersections() --;
// If there are still intersections to be made, propagate
std::size_t new_vertex_idx = KSR::no_element();
std::size_t new_vertex_idx = KSP::no_element();
if (m_data.vertex(ev.vertex_idx()).remaining_intersections() != 0)
new_vertex_idx = m_data.propagate_segment (ev.vertex_idx());
else
@ -912,7 +912,7 @@ private:
std::vector<Event> events;
m_queue.erase_vertex_events (old_vertex, events);
if (new_vertex != KSR::no_element())
if (new_vertex != KSP::no_element())
for (Event& ev : events)
{
ev.vertex_idx() = new_vertex;
@ -934,13 +934,13 @@ private:
CGAL_assertion (support_line.meta_vertices_idx().size() > 1);
std::size_t beginning = KSR::no_element();
std::size_t end = KSR::no_element();
std::size_t beginning = KSP::no_element();
std::size_t end = KSP::no_element();
for (std::size_t segment_idx : support_line.segments_idx())
{
// New segment
if (beginning == KSR::no_element())
if (beginning == KSP::no_element())
{
beginning = m_data.source_of_segment(segment_idx).meta_vertex_idx();
end = m_data.target_of_segment(segment_idx).meta_vertex_idx();