|
Blender V4.3
|
Public Member Functions | |
| CDTArrangement ()=default | |
| ~CDTArrangement () | |
| void | reserve (int verts_num, int edges_num, int faces_num) |
| CDTVert< T > * | add_vert (const VecBase< T, 2 > &pt) |
| CDTEdge< T > * | add_edge (CDTVert< T > *v1, CDTVert< T > *v2, CDTFace< T > *fleft, CDTFace< T > *fright) |
| CDTFace< T > * | add_face () |
| CDTEdge< T > * | add_vert_to_symedge_edge (CDTVert< T > *v, SymEdge< T > *se) |
| CDTEdge< T > * | add_diagonal (SymEdge< T > *s1, SymEdge< T > *s2) |
| CDTEdge< T > * | connect_separate_parts (SymEdge< T > *se1, SymEdge< T > *se2) |
| CDTEdge< T > * | split_edge (SymEdge< T > *se, T lambda) |
| void | delete_edge (SymEdge< T > *se) |
| CDTVert< T > * | get_vert_resolve_merge (int i) |
Public Attributes | |
| Vector< CDTVert< T > * > | verts |
| Vector< CDTEdge< T > * > | edges |
| Vector< CDTFace< T > * > | faces |
| CDTFace< T > * | outer_face {nullptr} |
Definition at line 226 of file delaunay_2d.cc.
|
default |
| blender::meshintersect::CDTArrangement< T >::~CDTArrangement | ( | ) |
Definition at line 332 of file delaunay_2d.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), e, blender::meshintersect::CDTFace< T >::input_ids, v, and verts.
| CDTEdge< T > * CDTArrangement::add_diagonal | ( | SymEdge< T > * | s1, |
| SymEdge< T > * | s2 ) |
Assuming s1 and s2 are both #SymEdge's in a face with > 3 sides and one is not the next of the other, Add an edge from s1->v to s2->v, splitting the face in two. The original face will be the one that s1 has as left face, and a new face will be added and made s2 and its next-cycle's left face.
Assume s1 and s2 are both #SymEdges in a face with > 3 sides, and one is not the next of the other. Add an edge from s1->v to s2->v, splitting the face in two. The original face will continue to be associated with the sub-face that has s1, and a new face will be made for s2's new face. Return the new diagonal's #CDTEdge pointer.
Definition at line 972 of file delaunay_2d.cc.
References add_list_to_input_ids(), blender::meshintersect::SymEdge< T >::face, blender::meshintersect::CDTFace< T >::input_ids, blender::meshintersect::SymEdge< T >::next, blender::meshintersect::prev(), blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::sym(), blender::meshintersect::CDTEdge< T >::symedges, and blender::meshintersect::SymEdge< T >::vert.
| CDTEdge< T > * CDTArrangement::add_edge | ( | CDTVert< T > * | v1, |
| CDTVert< T > * | v2, | ||
| CDTFace< T > * | fleft, | ||
| CDTFace< T > * | fright ) |
Add an edge from v1 to v2. The edge will have a left face and a right face, specified by fleft and fright. The edge will not be connected to anything yet. If the vertices do not yet have a #SymEdge pointer, their pointer is set to the #SymEdge in this new edge.
Definition at line 817 of file delaunay_2d.cc.
References e, blender::meshintersect::SymEdge< T >::edge, blender::meshintersect::SymEdge< T >::face, blender::meshintersect::SymEdge< T >::next, blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::CDTVert< T >::symedge, v2, and blender::meshintersect::SymEdge< T >::vert.
Add a new face. It is disconnected until an add_edge makes it the left or right face of an edge.
Definition at line 841 of file delaunay_2d.cc.
Referenced by blender::meshintersect::CDT_state< T >::CDT_state().
Add a new vertex to the arrangement, with the given 2D coordinate. It will not be connected to anything yet.
Definition at line 808 of file delaunay_2d.cc.
| CDTEdge< T > * CDTArrangement::add_vert_to_symedge_edge | ( | CDTVert< T > * | v, |
| SymEdge< T > * | se ) |
Make a new edge from v to se->vert, splicing it in.
Definition at line 999 of file delaunay_2d.cc.
References e, blender::meshintersect::SymEdge< T >::face, blender::meshintersect::SymEdge< T >::next, blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::sym(), v, and blender::meshintersect::SymEdge< T >::vert.
| CDTEdge< T > * CDTArrangement::connect_separate_parts | ( | SymEdge< T > * | se1, |
| SymEdge< T > * | se2 ) |
Connect the verts of se1 and se2, assuming that currently those two #SymEdge's are on the outer boundary (have face == outer_face) of two components that are isolated from each other.
Definition at line 1022 of file delaunay_2d.cc.
References BLI_assert, e, blender::meshintersect::SymEdge< T >::face, blender::meshintersect::SymEdge< T >::next, blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::sym(), and blender::meshintersect::SymEdge< T >::vert.
Delete an edge. The new combined face on either side of the deleted edge will be the one that was e's face. There will now be an unused face, which will be marked deleted, and an unused #CDTEdge, marked by setting the next and rot pointers of its #SymEdge's to #nullptr.
Delete an edge from the structure. The new combined face on either side of the deleted edge will be the one that was e's face. There will be now an unused face, marked by setting its deleted flag, and an unused #CDTEdge, marked by setting the next and rot pointers of its #SymEdges to #nullptr.
. v2 .
/ \ / \
/f|j\ / \
/ | \ / \
|
A | B A
\ e| / \ /
\ | / \ /
\h|i/ \ /
. v1 .
Also handle variant cases where one or both ends are attached only to e.
Definition at line 1098 of file delaunay_2d.cc.
References blender::meshintersect::CDTFace< T >::deleted, blender::meshintersect::SymEdge< T >::face, blender::meshintersect::SymEdge< T >::next, blender::meshintersect::prev(), blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::sym(), blender::meshintersect::CDTVert< T >::symedge, v2, and blender::meshintersect::SymEdge< T >::vert.
|
inline |
If the vertex with index i in the vert array has not been merge, return it. Else return the one that it has merged to.
Definition at line 301 of file delaunay_2d.cc.
References v.
Hint to how much space to reserve in the Vectors of the arrangement, based on these counts of input elements.
Definition at line 848 of file delaunay_2d.cc.
References verts.
Referenced by blender::meshintersect::CDT_state< T >::CDT_state().
Split se at fraction lambda, and return the new #CDTEdge that is the new second half. Copy the edge input_ids into the new one.
Definition at line 1048 of file delaunay_2d.cc.
References add_list_to_input_ids(), b, e, blender::meshintersect::SymEdge< T >::edge, blender::meshintersect::SymEdge< T >::face, blender::math::interpolate(), blender::meshintersect::SymEdge< T >::next, blender::meshintersect::prev(), blender::meshintersect::SymEdge< T >::rot, blender::meshintersect::sym(), v, and blender::meshintersect::SymEdge< T >::vert.
The edges. Some may be deleted (SymEdge next and rot pointers are null).
Definition at line 234 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), if(), and remove_non_constraint_edges_leave_valid_bmesh().
The faces. Some may be deleted (see their delete member).
Definition at line 236 of file delaunay_2d.cc.
Referenced by detect_holes(), if(), and remove_faces_in_holes().
| CDTFace<T>* blender::meshintersect::CDTArrangement< T >::outer_face {nullptr} |
Which CDTFace is the outer face.
Definition at line 238 of file delaunay_2d.cc.
Referenced by blender::meshintersect::CDT_state< T >::CDT_state(), and if().
The verts. Some may be merged to others (see their merge_to_index).
Definition at line 232 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), and get_cdt_output().