Voronoi3DInterface Class Reference

#include <voronoi3d.h>

详细描述

Voronoi3D provides functions for creating a 3D Voronoi representation of points.

公共成员函数

MAXON_METHOD Result < void >  Init (const Range < 向量 > &workSpace)
MAXON_METHOD Result < void >  CopyFrom (const Voronoi3DInterface * src , COLLECTION_RESIZE_FLAGS resizeFlags= COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE )
MAXON_METHOD Bool   IsReadyButPendingChanges ()
MAXON_METHOD Bool   IsReady ()
MAXON_METHOD Result < void >  SetPoints (const BaseArray < 向量 > &points)
MAXON_METHOD Result < void >  AddPoint (const 向量 &pointIn)
MAXON_METHOD Result < void >  AddPoints (const BaseArray < 向量 > &points)
MAXON_METHOD Result < void >  CalcCells ()
MAXON_METHOD Result < void >  CalcTetrahedralization ()
MAXON_METHOD void  SetForClipping ( Bool clipping)
MAXON_METHOD Int   GetCellCount ()
const MAXON_METHOD BaseArray < 向量 > &  GetVoronoiPointPositions () const
const MAXON_METHOD BaseArray < 向量 > &  GetInputPoints () const
MAXON_METHOD ResultRef < BaseArray < Bool > >  GetBorderCellFlags ()
MAXON_METHOD ResultRef < BaseArray < CellData > >  GetCellDataStructure ()
MAXON_METHOD ResultRef < BaseArray < Char > >  GetCellHasVolume ()
MAXON_METHOD Result < void >  ScaleCell ( Int cellIndex, Float scaleValue)
MAXON_METHOD Result < void >  ScaleAllCells ( Float scaleValue)
MAXON_METHOD ResultRef < Delaunay3DRef >  GetDelaunayTetrizer ()
MAXON_METHOD void  Flush ()
MAXON_METHOD Result < void >  SetCellFuseGroup ( BaseArray < Int > &fuseIndices)
MAXON_METHOD Result < void >  FuseCells ( BaseArray < Pair < Int , Int >> &joinList)
MAXON_METHOD Result < void >  CreateInvertedVoronoiCell ()

静态公共成员函数

static MAXON_METHOD Voronoi3DInterface Alloc ( MAXON_SOURCE_LOCATION_DECLARATION )

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( Voronoi3DInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.voronoi3d")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( Voronoi3DInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.voronoi3d"   
)
private

◆  Alloc()

static MAXON_METHOD Voronoi3DInterface * Alloc ( MAXON_SOURCE_LOCATION_DECLARATION   )
static

◆  Init()

MAXON_METHOD Result <void> Init ( const Range < 向量 > &  workSpace )

◆  CopyFrom()

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.
返回
OK on success.

◆  IsReadyButPendingChanges()

MAXON_METHOD Bool IsReadyButPendingChanges ( )

Checks if the Voronoi data structure is ready, even through the data might need recalculation.

返回
True if a Voronoi data structure is ready.

◆  IsReady()

MAXON_METHOD Bool IsReady ( )

Checks if the current object state is the finished data with no pending changes.

返回
True if all calculations were performed and no pending changes.

◆  SetPoints()

MAXON_METHOD Result <void> SetPoints ( const BaseArray < 向量 > &  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.
返回
OK on success.

◆  AddPoint()

MAXON_METHOD Result <void> AddPoint ( const 向量 pointIn )

Add a single point to the current set of points.

参数
[in] pointIn Point to add for this Voronoi object.
返回
OK on success.

◆  AddPoints()

MAXON_METHOD Result <void> AddPoints ( const BaseArray < 向量 > &  points )

Adds a list of points as Voronoi sites to the current set of points.

参数
[in] points Points to add for this Voronoi object.
返回
OK on success.

◆  CalcCells()

MAXON_METHOD Result <void> CalcCells ( )

Performs a Voronoi calculation on the current set of points.

返回
OK on success.

◆  CalcTetrahedralization()

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.

返回
OK on success.

◆  SetForClipping()

MAXON_METHOD void SetForClipping ( Bool   clipping )

Set a flag that will trigger some extra calculations in die Voronoi algorithm.

◆  GetCellCount()

MAXON_METHOD Int GetCellCount ( )

Gets the amount of cells.

返回
The amount of cells.

◆  GetVoronoiPointPositions()

const MAXON_METHOD BaseArray < 向量 >& GetVoronoiPointPositions ( ) const

Gets the point positions

返回
Reference to the list holding the site positions.

◆  GetInputPoints()

const MAXON_METHOD BaseArray < 向量 >& GetInputPoints ( ) const

Gets the point positions

返回
Reference to the list holding the site positions.

◆  GetBorderCellFlags()

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.

返回
Reference to the list holding the border flags.

◆  GetCellDataStructure()

MAXON_METHOD ResultRef < BaseArray < CellData > > GetCellDataStructure ( )

Gets the final data structure of the Voronoi 3D diagram.

返回
Reference to the list holding the full cell data.

◆  GetCellHasVolume()

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.

返回
Reference to the list holding the flag if a cell still has volume.

◆  ScaleCell()

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
返回
OK on success.

◆  ScaleAllCells()

MAXON_METHOD Result <void> ScaleAllCells ( Float   scaleValue )

Scales all cells in the Voronoi data structure.

参数
[in] scaleValue Scale amount.
返回
OK on success.

◆  GetDelaunayTetrizer()

MAXON_METHOD ResultRef <Delaunay3DRef> GetDelaunayTetrizer ( )

Gets the internal Delaunay3D tetrahedralization class.

返回
Reference to the internal Delaunay3D.

◆  Flush()

MAXON_METHOD void Flush ( )

Resets the object for a fresh calculation.

◆  SetCellFuseGroup()

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.
返回
OK on success.

◆  FuseCells()

MAXON_METHOD Result <void> FuseCells ( BaseArray < Pair < Int , Int >> &  joinList )

Fuses the cells declared in a list of neighbor pairs into each other.

参数
[in] joinList The neighbor pairs of cells that should be fused.
返回
OK on success.

◆  CreateInvertedVoronoiCell()

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.

返回
OK on success.