Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SpherePointGenerator Interface Reference

Static Public Member Functions

static vector GetPointOnUnitSphereFromEquator (int amount, int index)
 Generates almost uniformly spaced points on a unit sphere using a standard Fibonacci lattice.
 
static vector GetPointOnUnitSphere (int amount, int index)
 Generates almost uniformly spaced points on a unit sphere using a standard Fibonacci lattice.
 
static int EstimatePointsFromSpacingOnUnitSphere (float spacing)
 Estimates points on unit sphere from straight-line spacing.
 
static float EstimateSpacingFromPointsOnUnitSphere (int amount)
 Estimates straight-line spacing between points on a unit sphere.
 

Static Public Attributes

const float GOLDEN_RATIO = 1.618033988749895
 
const float INV_GOLDEN_RADIO_RAD = 3.883222077450933
 
const float PI4 = 12.56637061435917
 
const float POINT_DIST_SPHERE_EXP = 2.231
 
const float INV_POINT_DIST_SPHERE_EXP = 0.4482294935006723
 

Member Function Documentation

◆ EstimatePointsFromSpacingOnUnitSphere()

static int SCR_SpherePointGenerator.EstimatePointsFromSpacingOnUnitSphere ( float spacing)
static

Estimates points on unit sphere from straight-line spacing.

Parameters
[in]spacingSpacing represents the desired distance between points on a unit sphere.
Returns
Estimates the number of points required on a unit sphere to achieve a given spacing between points. Returns float.INFINITY for zero spacing.

◆ EstimateSpacingFromPointsOnUnitSphere()

static float SCR_SpherePointGenerator.EstimateSpacingFromPointsOnUnitSphere ( int amount)
static

Estimates straight-line spacing between points on a unit sphere.

Parameters
[in]amountAmount represents the number of points on a unit sphere.
Returns
Represents the estimated straight-line spacing between points on a unit sphere. Returns -1 for undefined case when amount is 0 or negative.

◆ GetPointOnUnitSphere()

static vector SCR_SpherePointGenerator.GetPointOnUnitSphere ( int amount,
int index )
static

Generates almost uniformly spaced points on a unit sphere using a standard Fibonacci lattice.

Parameters
[in]amountAmount represents the total number of points on the unit sphere.
[in]indexIndex is used to fetch a specific point on the sphere, it must be smaller than amount.
Returns
a point on unit sphere based on given index and amount. Vector.Zero is returned for invalid parameters.

◆ GetPointOnUnitSphereFromEquator()

static vector SCR_SpherePointGenerator.GetPointOnUnitSphereFromEquator ( int amount,
int index )
static

Generates almost uniformly spaced points on a unit sphere using a standard Fibonacci lattice.

Odd and Even numbers alternate between above and bellow the equator.

Parameters
[in]amountAmount represents the total number of points on the unit sphere.
[in]indexIndex is used to fetch a specific point on the sphere, it must be smaller than amount.
Returns
a point on unit sphere from equator based on given amount and index, with centered index calculation. Vector.Zero is returned for invalid parameters.

Member Data Documentation

◆ GOLDEN_RATIO

const float SCR_SpherePointGenerator.GOLDEN_RATIO = 1.618033988749895
static

◆ INV_GOLDEN_RADIO_RAD

const float SCR_SpherePointGenerator.INV_GOLDEN_RADIO_RAD = 3.883222077450933
static

◆ INV_POINT_DIST_SPHERE_EXP

const float SCR_SpherePointGenerator.INV_POINT_DIST_SPHERE_EXP = 0.4482294935006723
static

◆ PI4

const float SCR_SpherePointGenerator.PI4 = 12.56637061435917
static

◆ POINT_DIST_SPHERE_EXP

const float SCR_SpherePointGenerator.POINT_DIST_SPHERE_EXP = 2.231
static

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