API Documentation
Loading...
Searching...
No Matches
PolylineSlicer.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/RTree.h>
3#include <NDEVR/Model.h>
4namespace NDEVR
5{
6 class Model;
7 class Geometry;
8 class PolylineSliceIterator;
9 class ProgressInfo;
10 /**--------------------------------------------------------------------------------------------------
11 \brief Arguments for performing a Geometry slice operation
12 **/
21
22 /**--------------------------------------------------------------------------------------------------
23 \brief Represents a single plane to slice the data across
24 **/
35
36 /**--------------------------------------------------------------------------------------------------
37 \brief Arguments for performing a Geometry slice operation
38 **/
40 {
41 public:
42 virtual Buffer<SlicePlane> slicePlanes(const Matrix<fltp08>& transform, const Bounds<3, fltp08>& bounds) = 0;
43 virtual void cleanupSlicePlanes(const Matrix<fltp08>&, Buffer<SlicePlane>&) { /*Do nothing*/ };
44 };
45 /**--------------------------------------------------------------------------------------------------
46 \brief Slices object into evenly spaced cross sections
47 **/
55 /**--------------------------------------------------------------------------------------------------
56 \brief Slices object evenly along a specified polyline
57 **/
71 /**--------------------------------------------------------------------------------------------------
72 \brief Internal class for storing Polyline slice data
73 **/
84
85 /**--------------------------------------------------------------------------------------------------
86 \brief Logic for slicing one or more Model/Geometry objects into polyline Model/Geometry objects based
87 on set criteria
88 **/
90 {
91 public:
92 static void CreateActiveLinework(SlicerArgs& args);
93 static constexpr const char* SliceTypeName() { return "polyline_slice"; }
94 protected:
95 static void SliceIntoLineSegments(uint04 slice_index, PolylineSliceCache& args);
96 static void PrepareCache(const Matrix<fltp08>& transform, const Geometry& geo, PolylineSliceCache& params);
97 static void FinishSegmenting(const Matrix<fltp08>& transform, Model& model, uint04 slice_index, const PolylineSliceCache& params);
98 static void AddVertices(Geometry& geo, const SlicePlane& plane, const Matrix<fltp08>& mat);
99 };
100}
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
A core class within the model heirarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:64
Slices object into evenly spaced cross sections.
Definition PolylineSlicer.h:49
Matrix< fltp08 > transform
Definition PolylineSlicer.h:52
Vector< 3, fltp08 > spacing
Definition PolylineSlicer.h:53
Definition Matrix.hpp:176
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Slices object evenly along a specified polyline.
Definition PolylineSlicer.h:59
Matrix< fltp08 > transform
Definition PolylineSlicer.h:65
Vector< 2, fltp08 > max_hv_distance
Definition PolylineSlicer.h:68
bool include_main_line
Definition PolylineSlicer.h:69
fltp08 spacing
Definition PolylineSlicer.h:67
Polyline< 3, fltp08 > makeCenterlinePath(const Polyline< 3, fltp08 > &path)
Polyline< 3, fltp08 > path
Definition PolylineSlicer.h:66
Logic for a given plane or N-dimensions. Planes are coordinate systems of one less dimension than the...
Definition Geometry.h:41
A polyline which stores vertex information for many points along a given path.
Definition CoordinateProjectionManager.h:44
Arguments for performing a Geometry slice operation.
Definition PolylineSlicer.h:40
virtual Buffer< SlicePlane > slicePlanes(const Matrix< fltp08 > &transform, const Bounds< 3, fltp08 > &bounds)=0
virtual void cleanupSlicePlanes(const Matrix< fltp08 > &, Buffer< SlicePlane > &)
Definition PolylineSlicer.h:43
Logic for slicing one or more Model/Geometry objects into polyline Model/Geometry objects based on se...
Definition PolylineSlicer.h:90
static void SliceIntoLineSegments(uint04 slice_index, PolylineSliceCache &args)
static constexpr const char * SliceTypeName()
Definition PolylineSlicer.h:93
static void AddVertices(Geometry &geo, const SlicePlane &plane, const Matrix< fltp08 > &mat)
static void PrepareCache(const Matrix< fltp08 > &transform, const Geometry &geo, PolylineSliceCache &params)
static void FinishSegmenting(const Matrix< fltp08 > &transform, Model &model, uint04 slice_index, const PolylineSliceCache &params)
static void CreateActiveLinework(SlicerArgs &args)
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Definition GeometryVertices.h:11
The core String class for the NDEVR API.
Definition String.h:69
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Internal class for storing Polyline slice data.
Definition PolylineSlicer.h:75
Bounds< 3, fltp08 > bounds
Definition PolylineSlicer.h:81
Buffer< Triangle< 3, fltp08 > > triangles
Definition PolylineSlicer.h:78
ProgressInfo * log
Definition PolylineSlicer.h:82
PolylineSliceIterator * slice_plane
Definition PolylineSlicer.h:80
Matrix< fltp08 > slice_transform
Definition PolylineSlicer.h:76
RTree< 3, fltp08 > tree
Definition PolylineSlicer.h:79
Buffer< SlicePlane > planes
Definition PolylineSlicer.h:77
Represents a single plane to slice the data across.
Definition PolylineSlicer.h:26
Vertex< 3, fltp04 > center_point
Definition PolylineSlicer.h:31
String group
Definition PolylineSlicer.h:33
Buffer< Buffer< uint04 > > segments
Definition PolylineSlicer.h:27
Dictionary< String, Buffer< fltp04 > > properties
Definition PolylineSlicer.h:29
Plane< 3, fltp08 > plane
Definition PolylineSlicer.h:30
String name
Definition PolylineSlicer.h:32
Buffer< Vertex< 3, fltp04 > > polyline_vertices
Definition PolylineSlicer.h:28
Arguments for performing a Geometry slice operation.
Definition PolylineSlicer.h:14
Buffer< Model > models_to_slice
Definition PolylineSlicer.h:16
ProgressInfo * log
Definition PolylineSlicer.h:18
Model linework_root
Definition PolylineSlicer.h:15
const void * lock
Definition PolylineSlicer.h:19
PolylineSliceIterator * slicer
Definition PolylineSlicer.h:17