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;
29 {
30 public:
31 virtual Buffer<SlicePlane> slicePlanes(const Matrix<fltp08>& transform, const Bounds<3, fltp08>& bounds) = 0;
32 virtual void cleanupSlicePlanes(const Matrix<fltp08>&, Buffer<SlicePlane>&) { /*Do nothing*/ };
33 };
34 //Slices object into evenly spaced cross sections
42 //Slices object evenly along a specified polyline
67 {
68 public:
69 static void CreateActiveLinework(SlicerArgs& args);
70 static constexpr const char* SliceTypeName() { return "polyline_slice"; }
71 protected:
72 static void SliceIntoLineSegments(uint04 slice_index, PolylineSliceCache& args);
73 static void PrepareCache(const Matrix<fltp08>& transform, const Geometry& geo, PolylineSliceCache& params);
74 static void FinishSegmenting(const Matrix<fltp08>& transform, Model& model, uint04 slice_index, const PolylineSliceCache& params);
75 static void AddVertices(Geometry& geo, const SlicePlane& plane, const Matrix<fltp08>& mat);
76 };
77}
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Dictionary.h:48
Definition Geometry.h:64
Definition PolylineSlicer.h:36
Matrix< fltp08 > transform
Definition PolylineSlicer.h:39
Vector< 3, fltp08 > spacing
Definition PolylineSlicer.h:40
Definition Matrix.hpp:173
Definition Model.h:54
Definition PolylineSlicer.h:44
Matrix< fltp08 > transform
Definition PolylineSlicer.h:50
Vector< 2, fltp08 > max_hv_distance
Definition PolylineSlicer.h:53
bool include_main_line
Definition PolylineSlicer.h:54
fltp08 spacing
Definition PolylineSlicer.h:52
Polyline< 3, fltp08 > makeCenterlinePath(const Polyline< 3, fltp08 > &path)
Definition PolylineSlicer.cpp:318
Polyline< 3, fltp08 > path
Definition PolylineSlicer.h:51
Definition Geometry.h:41
A polyline which stores vertex information for many points along a given path.
Definition CoordinateProjectionManager.h:44
Definition PolylineSlicer.h:29
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:32
Definition PolylineSlicer.h:67
static void SliceIntoLineSegments(uint04 slice_index, PolylineSliceCache &args)
Definition PolylineSlicer.cpp:38
static constexpr const char * SliceTypeName()
Definition PolylineSlicer.h:70
static void PrepareCache(const Matrix< fltp08 > &transform, const Geometry &geo, PolylineSliceCache &params)
Definition PolylineSlicer.cpp:163
static void AddVertices(Geometry &geo, const SlicePlane &plane, const Matrix< fltp08 > &mat)
Definition PolylineSlicer.cpp:207
static void FinishSegmenting(const Matrix< fltp08 > &transform, Model &model, uint04 slice_index, const PolylineSliceCache &params)
Definition PolylineSlicer.cpp:178
static void CreateActiveLinework(SlicerArgs &args)
Definition PolylineSlicer.cpp:80
Definition ProgressInfo.hpp:43
Definition RTree.hpp:1014
Definition String.h:40
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
A vertex.
Definition Vertex.hpp:54
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:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition BaseValues.hpp:272
Definition PolylineSlicer.h:57
Bounds< 3, fltp08 > bounds
Definition PolylineSlicer.h:63
Buffer< Triangle< 3, fltp08 > > triangles
Definition PolylineSlicer.h:60
ProgressInfo * log
Definition PolylineSlicer.h:64
PolylineSliceIterator * slice_plane
Definition PolylineSlicer.h:62
Matrix< fltp08 > slice_transform
Definition PolylineSlicer.h:58
RTree< 3, fltp08 > tree
Definition PolylineSlicer.h:61
Buffer< SlicePlane > planes
Definition PolylineSlicer.h:59
Definition PolylineSlicer.h:19
Vertex< 3, fltp04 > center_point
Definition PolylineSlicer.h:24
String group
Definition PolylineSlicer.h:26
Buffer< Buffer< uint04 > > segments
Definition PolylineSlicer.h:20
Dictionary< String, Buffer< fltp04 > > properties
Definition PolylineSlicer.h:22
Plane< 3, fltp08 > plane
Definition PolylineSlicer.h:23
String name
Definition PolylineSlicer.h:25
Buffer< Vertex< 3, fltp04 > > polyline_vertices
Definition PolylineSlicer.h:21
Definition PolylineSlicer.h:11
Buffer< Model > models_to_slice
Definition PolylineSlicer.h:13
ProgressInfo * log
Definition PolylineSlicer.h:15
Model linework_root
Definition PolylineSlicer.h:12
const void * lock
Definition PolylineSlicer.h:16
PolylineSliceIterator * slicer
Definition PolylineSlicer.h:14