Main Page Class List Class Members

# Nv::Blast::VoronoiSitesGeneratorImpl Class Reference

`#include <NvBlastExtAuthoringFractureToolImpl.h>`

Inheritance diagram for Nv::Blast::VoronoiSitesGeneratorImpl:

List of all members.

## Public Member Functions
void | addSite (const NvcVec3 &site) override
void | clearStencil () override
void | clusteredSitesGeneration (uint32_t numberOfClusters, uint32_t sitesPerCluster, float clusterRadius) override
void | deleteInSphere (const float radius, const NvcVec3 &center, const float eraserProbability=1) override
void | generateInSphere (const uint32_t count, const float radius, const NvcVec3 &center) override
uint32_t | getVoronoiSites (const NvcVec3 *&sites) override
void | radialPattern (const NvcVec3 &center, const NvcVec3 &normal, float radius, int32_t angularSteps, int32_t radialSteps, float angleOffset=0.0f, float variability=0.0f) override
void | release () override
void | setBaseMesh (const Mesh *m) override
void | setStencil (const Mesh *stencil) override
void | uniformlyGenerateSitesInMesh (uint32_t numberOfSites) override
| VoronoiSitesGeneratorImpl (const Mesh *mesh, RandomGeneratorBase *rnd)
| ~VoronoiSitesGeneratorImpl ()

## Detailed Description

Class for voronoi sites generation inside supplied mesh.

## Constructor & Destructor Documentation

Nv::Blast::VoronoiSitesGeneratorImpl::VoronoiSitesGeneratorImpl | ( | const Mesh * | mesh,
|  | RandomGeneratorBase * | rnd |
| ) |  |  |

Voronoi sites should not be generated outside of the fractured mesh, so VoronoiSitesGenerator should be supplied with fracture mesh.

Parameters:

  `[in]` | mesh | Fracture mesh
  `[in]` | rnd | User supplied random value generator.

Returns:

Nv::Blast::VoronoiSitesGeneratorImpl::~VoronoiSitesGeneratorImpl | ( |  | ) |

## Member Function Documentation

void Nv::Blast::VoronoiSitesGeneratorImpl::addSite | ( | const NvcVec3 & | site | ) | `[override, virtual]`

Add site in particular point

Parameters:

  `[in]` | site | Site coordinates

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::clearStencil | ( |  | ) | `[override, virtual]`

Removes stencil mesh

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::clusteredSitesGeneration | ( | uint32_t | numberOfClusters,
|  | uint32_t | sitesPerCluster,
|  | float | clusterRadius |
| ) |  |  | `[override, virtual]`

Generate sites in clustered fashion

Parameters:

  `[in]` | numberOfClusters | Number of generated clusters
  `[in]` | sitesPerCluster | Number of sites in each cluster
  `[in]` | clusterRadius | Voronoi cells cluster radius

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::deleteInSphere | ( | const float | radius,
|  | const NvcVec3 & | center,
|  | const float | eraserProbability = `1` |
| ) |  |  | `[override, virtual]`

Deletes sites inside supplied sphere

Parameters:

  `[in]` | radius | Radius of sphere
  `[in]` | center | Center of sphere
  `[in]` | eraserProbability | Probability of removing some particular site

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::generateInSphere | ( | const uint32_t | count,
|  | const float | radius,
|  | const NvcVec3 & | center |
| ) |  |  | `[override, virtual]`

Generate sites inside sphere

Parameters:

  `[in]` | count | Count of generated sites
  `[in]` | radius | Radius of sphere
  `[in]` | center | Center of sphere

Implements Nv::Blast::VoronoiSitesGenerator.

uint32_t Nv::Blast::VoronoiSitesGeneratorImpl::getVoronoiSites | ( | const NvcVec3 *& | sites | ) | `[override, virtual]`

Access to generated voronoi sites.

Note:
  User should call NVBLAST_FREE for hulls and hullsOffset when it not needed anymore

Parameters:

  `[out]` | Pointer | to generated voronoi sites

Returns:
  Count of generated voronoi sites.

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::radialPattern | ( | const NvcVec3 & | center,
|  | const NvcVec3 & | normal,
|  | float | radius,
|  | int32_t | angularSteps,
|  | int32_t | radialSteps,
|  | float | angleOffset = `0.0f`,
|  | float | variability = `0.0f` |
| ) |  |  | `[override, virtual]`

Radial pattern of sites generation

Parameters:

  `[in]` | center | Center of generated pattern
  `[in]` | normal | Normal to plane in which sites are generated
  `[in]` | radius | Pattern radius
  `[in]` | angularSteps | Number of angular steps
  `[in]` | radialSteps | Number of radial steps
  `[in]` | angleOffset | Angle offset at each radial step
  `[in]` | variability | Randomness of sites distribution

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::release | ( |  | ) | `[override, virtual]`

Release VoronoiSitesGenerator memory

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::setBaseMesh | ( | const Mesh * | m | ) | `[override, virtual]`

Set base fracture mesh

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::setStencil | ( | const Mesh * | stencil | ) | `[override, virtual]`

Set stencil mesh. With stencil mesh sites are generated only inside both of fracture and stencil meshes.

Parameters:

  `[in]` | stencil | Stencil mesh.

Implements Nv::Blast::VoronoiSitesGenerator.

void Nv::Blast::VoronoiSitesGeneratorImpl::uniformlyGenerateSitesInMesh | ( | uint32_t | numberOfSites | ) | `[override, virtual]`

Uniformly generate sites inside the mesh

Parameters:

  `[in]` | numberOfSites | Number of generated sites

Implements Nv::Blast::VoronoiSitesGenerator.

The documentation for this class was generated from the following file:

- sdk/extensions/authoring/source/NvBlastExtAuthoringFractureToolImpl.h