Blender
V3.3
|
Public Member Functions | |
CDTArrangement ()=default | |
~CDTArrangement () | |
void | reserve (int verts_num, int edges_num, int faces_num) |
CDTVert< Arith_t > * | add_vert (const vec2< Arith_t > &pt) |
CDTEdge< Arith_t > * | add_edge (CDTVert< Arith_t > *v1, CDTVert< Arith_t > *v2, CDTFace< Arith_t > *fleft, CDTFace< Arith_t > *fright) |
CDTFace< Arith_t > * | add_face () |
CDTEdge< Arith_t > * | add_vert_to_symedge_edge (CDTVert< Arith_t > *v, SymEdge< Arith_t > *se) |
CDTEdge< Arith_t > * | add_diagonal (SymEdge< Arith_t > *s1, SymEdge< Arith_t > *s2) |
CDTEdge< Arith_t > * | connect_separate_parts (SymEdge< Arith_t > *se1, SymEdge< Arith_t > *se2) |
CDTEdge< Arith_t > * | split_edge (SymEdge< Arith_t > *se, Arith_t lambda) |
void | delete_edge (SymEdge< Arith_t > *se) |
CDTVert< Arith_t > * | get_vert_resolve_merge (int i) |
Public Attributes | |
Vector< CDTVert< Arith_t > * > | verts |
Vector< CDTEdge< Arith_t > * > | edges |
Vector< CDTFace< Arith_t > * > | faces |
CDTFace< Arith_t > * | outer_face {nullptr} |
Definition at line 229 of file delaunay_2d.cc.
|
default |
blender::meshintersect::CDTArrangement< T >::~CDTArrangement |
Definition at line 338 of file delaunay_2d.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), e, faces, blender::meshintersect::CDTFace< Arith_t >::input_ids, v, and verts.
CDTEdge<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::add_diagonal | ( | SymEdge< Arith_t > * | s1, |
SymEdge< Arith_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.
CDTEdge<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::add_edge | ( | CDTVert< Arith_t > * | v1, |
CDTVert< Arith_t > * | v2, | ||
CDTFace< Arith_t > * | fleft, | ||
CDTFace< Arith_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.
CDTFace<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::add_face | ( | ) |
Add a new face. It is disconnected until an add_edge makes it the left or right face of an edge.
CDTVert<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::add_vert | ( | const vec2< Arith_t > & | pt | ) |
Add a new vertex to the arrangement, with the given 2D coordinate. It will not be connected to anything yet.
CDTEdge<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::add_vert_to_symedge_edge | ( | CDTVert< Arith_t > * | v, |
SymEdge< Arith_t > * | se | ||
) |
Make a new edge from v to se->vert, splicing it in.
CDTEdge<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::connect_separate_parts | ( | SymEdge< Arith_t > * | se1, |
SymEdge< Arith_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.
void blender::meshintersect::CDTArrangement< Arith_t >::delete_edge | ( | SymEdge< Arith_t > * | se | ) |
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.
|
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 307 of file delaunay_2d.cc.
References v.
void blender::meshintersect::CDTArrangement< Arith_t >::reserve | ( | int | verts_num, |
int | edges_num, | ||
int | faces_num | ||
) |
Hint to how much space to reserve in the Vectors of the arrangement, based on these counts of input elements.
CDTEdge<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::split_edge | ( | SymEdge< Arith_t > * | se, |
Arith_t | lambda | ||
) |
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.
Vector<CDTEdge<Arith_t> *> blender::meshintersect::CDTArrangement< Arith_t >::edges |
The edges. Some may be deleted (SymEdge next and rot pointers are null).
Definition at line 237 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), and blender::meshintersect::operator<<().
Vector<CDTFace<Arith_t> *> blender::meshintersect::CDTArrangement< Arith_t >::faces |
The faces. Some may be deleted (see their delete member).
Definition at line 239 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), and blender::meshintersect::operator<<().
CDTFace<Arith_t>* blender::meshintersect::CDTArrangement< Arith_t >::outer_face {nullptr} |
Which CDTFace is the outer face.
Definition at line 241 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), and blender::meshintersect::operator<<().
Vector<CDTVert<Arith_t> *> blender::meshintersect::CDTArrangement< Arith_t >::verts |
The verts. Some may be merged to others (see their merge_to_index).
Definition at line 235 of file delaunay_2d.cc.
Referenced by blender::meshintersect::cdt_draw(), and blender::meshintersect::operator<<().