|
static void | create_dataset_to_point_mapping (const rt_t &rtree, cc_t &ccplx, const val_src_lst_t &rt_dil) |
| Create approprate inputs for ccplx.create_dataset_to_point_mapping() from tree data.
|
|
static cc_node_idx_t | add_node (cc_t &ccplx, const rt_t &rtree, rt_diti_t diti) |
| Given rt coordinates, extract point/scalar/vector data, and add point/data to cc.
|
|
static cc_node_idx_t | add_node (cc_t &ccplx, rt_drpt_t dom_pnt, rt_rrpt_t rng_pnt) |
| Given rt coordinates, extract point/scalar/vector data, and add point/data to cc.
|
|
static cc_node_data_t | rt_pnt_to_cc_pnt (rt_drpt_t dom_pnt, rt_rrpt_t rng_pnt) |
| Given rt_t domain & range points, produce a cc_t point data vector.
|
|
static rt_drpt_t | node_data_to_drpt (const cc_node_data_t &pd) |
| Transform a MR_cell_cplx::node_data_t value into MR_rect_tree::drpt_t.
|
|
static int | rt_rng_idx_to_pd_idx (int tree_range_index) |
| Convert a MR_rect_tree range index into an index for a point data array.
|
|
static cc_node_idx_t | nan_edge_solver (cc_t &ccplx, const rt_t &rtree, cc_node_idx_t good_point_ccplx_index, rt_diti_t good_point_rtree_index, rt_diti_t sick_point_rtree_index, rt_drpt2rrpt_func_t func, cc_uft_t solver_epsilon=cc_t::epsilon/100) |
| Given an edge with one good point and one NaN point, find the longest segment from the good point toward the NaN point.
|
|
|
static int | construct_geometry_fans (cc_t &ccplx, const rt_t &rtree, rt_diti_list_t cells, int output_dimension, val_src_lst_t point_src, rt_drpt2rrpt_func_t func=nullptr) |
| Populate attached MR_cell_cplx object from data in attached MR_rect_tree object.
|
|
static int | construct_geometry_fans (cc_t &ccplx, const rt_t &rtree, int output_dimension, val_src_lst_t point_src, rt_drpt2rrpt_func_t func=nullptr) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
static int | construct_geometry_points (cc_t &ccplx, const rt_t &rtree, rt_diti_list_t cells, val_src_lst_t point_src, bool output_centers, bool output_corners) |
| Populate attached MR_cell_cplx object from data in attached MR_rect_tree object.
|
|
static int | construct_geometry_points (cc_t &ccplx, const rt_t &rtree, val_src_lst_t point_src, bool output_centers, bool output_corners) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
static int | construct_geometry_rects (cc_t &ccplx, const rt_t &rtree, rt_diti_list_t cells, int output_dimension, val_src_lst_t point_src, bool degenerate_fallback=true) |
| Populate a MR_cell_cplx object from data in a MR_rect_tree object.
|
|
static int | construct_geometry_rects (cc_t &ccplx, const rt_t &rtree, int output_dimension, val_src_lst_t point_src, bool degenerate_fallback=true) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<class rt_t, class cc_t>
requires (std::is_same<typename rt_t::src_t, typename cc_t::uft_t>::value)
class mjr::MR_rt_to_cc< rt_t, cc_t >
Tessellates a MR_rect_tree object, and places the result into an MR_cell_cplx object.
From a structural perspective this class simply a templated collection of types and static methods all designed to work with pairs of MR_rect_tree and MR_cell_cplx objects. From a functional, or pattern, perspective this class might classified as a MR_cell_cplx pseudo-constructor or proto-factory. I think of it as a bridge between MR_rect_tree and MR_cell_cplx objects. A collection of helper types that ease working with pairs of MR_rect_tree and MR_cell_cplx objects containing data derived from the same sampled function.
- Template Parameters
-
rt_t | The type of supported MR_rect_tree objects |
cc_t | The type of supported MR_cell_cplx objects |
Definition at line 58 of file MR_rt_to_cc.hpp.
template<class rt_t , class cc_t >
Populate attached MR_cell_cplx object from data in attached MR_rect_tree object.
construct_geometry_fans(), unlike the other geometry construction methods, is capable of "healing" some broken edges – edges with one good point and one NaN point. It uses the origional sampling function to solve along the edge to produce the longest non-NaN edge possible. Then it constructs cells using the new piont(s). If func is nullptr, then no edge healing is preformed. This feature works for segments & triangles only.
| Geom | Dom Dim | Out Dim | Result |
|------------+---------+---------+--------------------|
| FANS | 2 | 1 | Triangle Edges |
| FANS | 2 | 2 | Triangles |
| FANS | 3 | 1 | Pyramid Edges |
| FANS | 3 | 2 | Pyramid Faces |
| FANS | 3 | 3 | Solid Pyramids |
- Parameters
-
ccplx | The MR_cell_cplx to populate with geometry |
rtree | The MR_rect_tree with source data |
cells | List of cells to output from rtree |
output_dimension | Parts of cells to output |
point_src | Point sources |
func | The function was used to sample the tree |
Definition at line 265 of file MR_rt_to_cc.hpp.
template<class rt_t , class cc_t >
Populate attached MR_cell_cplx object from data in attached MR_rect_tree object.
Only 0D vertex cells are produced. While similar results may be obtained by setting the output_dimension to zero and calling construct_geometry_fan() or construct_geometry_rects(), this method is much faster. This method also provides the option of only outputting centers without corners.
| Geom | output_centers | output_corners | Result | output_dimension=0 equivalent |
|--------+----------------+----------------+---------------+-------------------------------|
| POINTS | true | true | cell vertexes | construct_geometry_fans |
| POINTS | true | false | cell centers | |
| POINTS | false | true | cell corners | construct_geometry_rects |
| POINTS | false | false | No Points | |
- Parameters
-
ccplx | The MR_cell_cplx to populate with geometry |
rtree | The MR_rect_tree with source data |
cells | List of tree cells from which to construct geometry |
point_src | Point sources |
output_centers | Create vertexes for cell centers |
output_corners | Create vertexes for cell corners |
Definition at line 451 of file MR_rt_to_cc.hpp.
template<class rt_t , class cc_t >
Populate a MR_cell_cplx object from data in a MR_rect_tree object.
The resulting geometric structure in the MR_cell_cplx object will consist of 'rectangular' cell types (points, segments, rectangles, & hexahedra).
| Geom | Dom Dim | Out Dim | Result |
|------------+---------+---------+--------------------|
| RECTANGLES | 1-3 | 0 | Cell Corner Points |
| RECTANGLES | 2-3 | 1 | Cell Edges |
| RECTANGLES | 2 | 2 | 2D Rectangles |
| RECTANGLES | 3 | 2 | Cell Faces |
| RECTANGLES | 3 | 3 | Solid Hexahedra |
- Parameters
-
ccplx | The MR_cell_cplx to populate with geometry |
rtree | The MR_rect_tree with source data |
cells | List of tree cells from which to construct geometry |
output_dimension | Parts of cells to output |
point_src | Point sources |
degenerate_fallback | If the rectangle is degenerate, try and make a triangle. (only works for cc_t::cell_kind_t::QUAD) |
Definition at line 507 of file MR_rt_to_cc.hpp.
template<class rt_t , class cc_t >
Given an edge with one good point and one NaN point, find the longest segment from the good point toward the NaN point.
Note we normally use this function when we detect a NaN in a geometric point (i.e. the things with a node_idx_t). This solver solves until the return of func has no NaNs. Those two criteria might not be the same thing, but it's OK.
- Parameters
-
ccplx | The MR_cell_cplx to populate with geometry |
rtree | The MR_rect_tree with source data |
good_point_ccplx_index | Good point index in the ccplx object |
good_point_rtree_index | Good point index in the rtree object |
sick_point_rtree_index | Bad point index in the rtree object |
func | The function to use for the solver |
solver_epsilon | Used as a distance threshold between sick point and solved endpoint in the tree domain space. |
Definition at line 194 of file MR_rt_to_cc.hpp.