Loading...
Searching...
No Matches
Voronoi geometry

Cells and image-resolved faces of a 3D periodic tessellation. More...

Classes

struct  seams_voronoi_view
 Borrowed arrays from an immutable Voronoi result. More...

Typedefs

typedef struct seams_voronoi_view seams_voronoi_view
 Borrowed arrays from an immutable Voronoi result.

Functions

SEAMS_API seams_status seams_voronoi_find (seams_system *sys, double seed_radius, seams_voronoi **out)
 Build the ordinary Voronoi tessellation of a fully periodic frame.
SEAMS_API seams_status seams_voronoi_get_view (const seams_voronoi *cells, seams_voronoi_view *out)
 Borrow the arrays of a tessellation.
SEAMS_API void seams_voronoi_destroy (seams_voronoi *cells)
 Release a tessellation and its arrays.

Detailed Description

Cells and image-resolved faces of a 3D periodic tessellation.

Typedef Documentation

◆ seams_voronoi_view

typedef struct seams_voronoi_view seams_voronoi_view

Borrowed arrays from an immutable Voronoi result.

Function Documentation

◆ seams_voronoi_destroy()

SEAMS_API void seams_voronoi_destroy ( seams_voronoi * cells)

Release a tessellation and its arrays.

Parameters
cellsResult handle, or NULL.
Ownership
Releases the handle and invalidates its views.
Thread safety
Exclusive use of cells.

◆ seams_voronoi_find()

SEAMS_API seams_status seams_voronoi_find ( seams_system * sys,
double seed_radius,
seams_voronoi ** out )

Build the ordinary Voronoi tessellation of a fully periodic frame.

Parameters
sysFrame handle. Its selected sites are the generators.
seed_radiusPositive search radius in angstroms, or zero to choose from the site density.
outReceives an owned result. On failure *out is NULL.
Returns
SEAMS_OK, or an error for invalid input or a cell that cannot be certified.
Ownership
Free the result with seams_voronoi_destroy(). The frame may be freed independently.
Thread safety
Exclusive use of sys because the call writes the frame's error slot.

◆ seams_voronoi_get_view()

SEAMS_API seams_status seams_voronoi_get_view ( const seams_voronoi * cells,
seams_voronoi_view * out )

Borrow the arrays of a tessellation.

Parameters
cellsResult handle.
outReceives a view valid until cells is destroyed.
Returns
SEAMS_OK or SEAMS_ERR_NULL.
Ownership
The result owns the arrays. Do not modify or free them.
Thread safety
Read-only calls may share cells. Do not destroy a result while a reader uses its view.