2#include "RasterPointScanner/Headers/ViewportPointSmoother.hpp"
3#include "BlockModel/Headers/BlockModelRaster.h"
6 template<
class t_po
int_type,
class t_smooth_type>
10 PointSmootherBlockFilter(ViewportPointSmoother<t_smooth_type>* smoother)
11 : m_smoother(smoother)
13 bool shouldFilter(
const Vertex<3, uint04>& location,
const t_point_type& node,
uint04)
const final override
15 return m_smoother->contains(location.as<3,
fltp04>(), node);
17 void onFiltered(
const Vertex<3, uint04>& location,
const t_point_type& node,
uint04 weight)
const final override
19 Vector<3, fltp04> flocation = location.as<3,
fltp04>();
20 if constexpr (t_point_type::HasOffset())
21 flocation += node.offset();
22 m_filtered_locations.add(flocation);
23 m_filtered_colors.add(node.template getAs<t_smooth_type>());
24 m_filtered_weights.add(weight);
26 void setSmoother(ViewportPointSmoother<t_smooth_type>* smoother)
28 m_smoother = smoother;
32 return m_smoother->classifyBlock(value.as<3,
fltp04>());
34 void* gridLocationLockPtr()
36 return &m_filtered_locations;
38 void transferActiveLocations()
40 WLock lock(gridLocationLockPtr());
41 m_smoother->addBlockPoints(m_filtered_locations, m_filtered_colors, m_filtered_weights);
42 m_filtered_locations.clear();
43 m_filtered_colors.clear();
44 m_filtered_weights.clear();
48 WLock lock(gridLocationLockPtr());
49 m_filtered_locations.clear();
50 m_filtered_colors.clear();
51 m_filtered_weights.clear();
53 mutable Buffer<Vertex<3, fltp04>> m_filtered_locations;
54 mutable Buffer<t_smooth_type> m_filtered_colors;
55 mutable Buffer<uint04> m_filtered_weights;
56 ViewportPointSmoother<t_smooth_type>* m_smoother;
Abstract cache interface for filtering block model raster data based on spatial criteria.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
IntersectionTypes
Used for classifying shape intersections.