#include <voronoi3d.h>
Voronoi3D provides functions for creating a 3D Voronoi representation of points.
Static Public Member Functions | |
static MAXON_METHOD Voronoi3DInterface * | Alloc (MAXON_SOURCE_LOCATION_DECLARATION) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (Voronoi3DInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.voronoi3d") | |
|
private |
|
static |
MAXON_METHOD Result<void> Init | ( | const Range< Vector > & | workSpace | ) |
MAXON_METHOD Result<void> CopyFrom | ( | const Voronoi3DInterface * | src, |
COLLECTION_RESIZE_FLAGS | resizeFlags = COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE |
||
) |
Copies the contents of src into this object.
[in] | src | The object to copy from. |
[in] | resizeFlags | Resize flag for collections. |
MAXON_METHOD Bool IsReadyButPendingChanges | ( | ) |
Checks if the Voronoi data structure is ready, even through the data might need recalculation.
MAXON_METHOD Bool IsReady | ( | ) |
Checks if the current object state is the finished data with no pending changes.
MAXON_METHOD Result<void> SetPoints | ( | const BaseArray< Vector > & | points | ) |
Sets a list of points as Voronoi sites. Only these will be used, and old points will be reset
[in] | points | Points to set for this Voronoi object. |
MAXON_METHOD Result<void> AddPoint | ( | const Vector & | pointIn | ) |
Add a single point to the current set of points.
[in] | pointIn | Point to add for this Voronoi object. |
MAXON_METHOD Result<void> AddPoints | ( | const BaseArray< Vector > & | points | ) |
Adds a list of points as Voronoi sites to the current set of points.
[in] | points | Points to add for this Voronoi object. |
MAXON_METHOD Result<void> CalcCells | ( | ) |
Performs a Voronoi calculation on the current set of points.
MAXON_METHOD Result<void> CalcTetrahedralization | ( | ) |
Performs the pre-step of calculating a Delaunay tetrahedralization. if CalcCells() is called after this, the calcualted tetrahedralization will be reused. If CalcCells() is called without this being called, it will perform it automatically.
MAXON_METHOD void SetForClipping | ( | Bool | clipping | ) |
Set a flag that will trigger some extra calculations in die Voronoi algorithm.
MAXON_METHOD Int GetCellCount | ( | ) |
Gets the amount of cells.
MAXON_METHOD const BaseArray<Vector>& GetVoronoiPointPositions | ( | ) | const |
Gets the point positions
MAXON_METHOD const BaseArray<Vector>& GetInputPoints | ( | ) | const |
Gets the point positions
MAXON_METHOD ResultRef<BaseArray<Bool> > GetBorderCellFlags | ( | ) |
Gets the flag list of that defines if a cell is a border cell. This is only set if the algorithm was set for clipping.
MAXON_METHOD ResultRef<BaseArray<CellData> > GetCellDataStructure | ( | ) |
Gets the final data structure of the Voronoi 3D diagram.
MAXON_METHOD ResultRef<BaseArray<Char> > GetCellHasVolume | ( | ) |
Gets a list of flags, that defines for every cell, if it still has a volume. This will be true for every start cell and can only be false if a cell got scaled.
MAXON_METHOD Result<void> ScaleCell | ( | Int | cellIndex, |
Float | scaleValue | ||
) |
Scales one cell (cellIndex) in the Voronoi data structure
[in] | cellIndex | The index of the cell to scale |
[in] | scaleValue | Scale amount |
MAXON_METHOD Result<void> ScaleAllCells | ( | Float | scaleValue | ) |
Scales all cells in the Voronoi data structure.
[in] | scaleValue | Scale amount. |
MAXON_METHOD ResultRef<Delaunay3DRef> GetDelaunayTetrizer | ( | ) |
Gets the internal Delaunay3D tetrahedralization class.
MAXON_METHOD void Flush | ( | ) |
Resets the object for a fresh calculation.
MAXON_METHOD Result<void> SetCellFuseGroup | ( | BaseArray< Int > & | fuseIndices | ) |
Sets a list of indices to be one group. These points will be fused to one cell in generation. If an index is set to fuse in an earlier call, it will be ignored. This needs to be called after points are set or it will not have any effect.
[in] | fuseIndices | The list of indices to be fused. |
Fuses the cells declared in a list of neighbor pairs into each other.
[in] | joinList | The neighbor pairs of cells that should be fused. |
MAXON_METHOD Result<void> CreateInvertedVoronoiCell | ( | ) |
Inverts the whole Voronoi data structure. this is done by inverting all faces of the cells and fusing all into one cell.