Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Helpers.Computative.Random.Random3D Class Reference

A value instance of pure random numbers More...

Inheritance diagram for pluginbase.Helpers.Computative.Random.Random3D:
pluginbase.Helpers.Computative.ValuePoint3D

Public Member Functions

 Random3D (IPseudoRandom gen)
 Initializes an instance with a random number generator More...
 
 Random3D (int seed)
 Initialize an instance with the default random number generator More...
 
float Rand (int x)
 Returns 0-1 float More...
 
float Rand (int x, int y)
 returns 0-1 float More...
 
float Rand (int x, int y, int z)
 Returns 0-1 float More...
 
int Randi (int x, int min, int max)
 Returns int between (min, max) More...
 
int Randi (int x, int y, int min, int max)
 returns int between (min, max) More...
 
int Randi (int x, int y, int z, int min, int max)
 Returns int between (min, max) More...
 
override float GetValue (int x, int y, int z)
 Get the value at a coordinate x,y,z More...
 
override float GetValue (int x, int y)
 Get the value at the coordinate x,y More...
 
- Public Member Functions inherited from pluginbase.Helpers.Computative.ValuePoint3D
ValuePoint3D Mix (ValuePoint3D with, float sourceOpacity)
 Mix this value with another one at a certain ratio More...
 
ValuePoint3D Lighten (ValuePoint3D with)
 Lighten this value by another one More...
 
ValuePoint3D Darken (ValuePoint3D with)
 Darken this value by another one More...
 
ValuePoint3D CustomCombine (ValuePoint3D with, Combiner3D.CombinerOperator func)
 Combine two values using a custom combiner More...
 
ValuePoint3D CustomManipulator (Manip3D.ManipOperator func)
 Manipulate this value with a custom manipulator More...
 
ValuePoint3D Abs ()
 Absolute value More...
 
ValuePoint3D Invert ()
 Invert the value from a 0-1 range More...
 
ValuePoint3D Brightness (float amount)
 Adjust brightness. Takes in -1 to 1f More...
 
ValuePoint3D Contrast (float amount)
 Adjusts contract from -1 to 1 More...
 
ValuePoint3D Scale (float factor)
 Scale the specified factor and clamp More...
 
ValuePoint3D LinearBounds (float min, float max)
 Linearly interpolates to squish between the bounds More...
 
ValuePoint3D Threshold (float threshold)
 Threshold the specified threshold. Returns 0 if below, otherwise 1f More...
 
ValuePoint3D Gamma (float gamma)
 Gamma the specified gamma. Range 0f - 2f More...
 
ValuePoint3D Clamp ()
 Clamp this value between 0 and 1 More...
 
ValuePoint3D Clamp (float min, float max)
 Clamp this value between a min and max More...
 

Additional Inherited Members

- Static Public Member Functions inherited from pluginbase.Helpers.Computative.ValuePoint3D
static ValuePoint3D operator+ (ValuePoint3D a, ValuePoint3D b)
 Add two value points together More...
 
static ValuePoint3D operator- (ValuePoint3D a, ValuePoint3D b)
 Subtract two value points More...
 
static ValuePoint3D operator* (ValuePoint3D a, ValuePoint3D b)
 Multiply two value points More...
 
static ValuePoint3D operator/ (ValuePoint3D a, ValuePoint3D b)
 Divide one value by another More...
 

Detailed Description

A value instance of pure random numbers

Constructor & Destructor Documentation

pluginbase.Helpers.Computative.Random.Random3D.Random3D ( IPseudoRandom  gen)

Initializes an instance with a random number generator

Parameters
genGen.
18  {
19  generator = gen;
20  }
pluginbase.Helpers.Computative.Random.Random3D.Random3D ( int  seed)

Initialize an instance with the default random number generator

Parameters
seedSeed.
27  :this(new PseudoRandom(seed))
28  {
29  }
A basic implementation of a random number generator
Definition: PseudoRandom.cs:7

Member Function Documentation

override float pluginbase.Helpers.Computative.Random.Random3D.GetValue ( int  x,
int  y,
int  z 
)
virtual

Get the value at a coordinate x,y,z

Returns
The value.
Parameters
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.

Implements pluginbase.Helpers.Computative.ValuePoint3D.

163  {
164  return Rand(x,y,z);
165  }
float Rand(int x)
Returns 0-1 float
Definition: Random3D.cs:41
override float pluginbase.Helpers.Computative.Random.Random3D.GetValue ( int  x,
int  y 
)
virtual

Get the value at the coordinate x,y

Returns
The value.
Parameters
xThe x coordinate.
yThe y coordinate.

Implements pluginbase.Helpers.Computative.ValuePoint3D.

173  {
174  return Rand(x, y);
175  }
float Rand(int x)
Returns 0-1 float
Definition: Random3D.cs:41
float pluginbase.Helpers.Computative.Random.Random3D.Rand ( int  x)

Returns 0-1 float

Parameters
xA System.Int32
Returns
A System.Single
42  {
43  return generator.Rand(x);
44  }
float Rand(int val)
Random function expected to return between 0 and 1
float pluginbase.Helpers.Computative.Random.Random3D.Rand ( int  x,
int  y 
)

returns 0-1 float

Parameters
xA System.Int32
yA System.Int32
Returns
A System.Single
59  {
60  return generator.Rand(x*98429 + y*48937);
61  }
float Rand(int val)
Random function expected to return between 0 and 1
float pluginbase.Helpers.Computative.Random.Random3D.Rand ( int  x,
int  y,
int  z 
)

Returns 0-1 float

Parameters
xA System.Int32
yA System.Int32
zA System.Int32
Returns
A System.Single
79  {
80  return generator.Rand(x*98429 + y*48937 + z*532);
81  }
float Rand(int val)
Random function expected to return between 0 and 1
int pluginbase.Helpers.Computative.Random.Random3D.Randi ( int  x,
int  min,
int  max 
)

Returns int between (min, max)

Parameters
xA System.Int32
minA System.Int32
maxA System.Int32
Returns
A System.Int32
100  {
101  return (int)(Rand(x) * (max-min) + min);
102  }
float Rand(int x)
Returns 0-1 float
Definition: Random3D.cs:41
int pluginbase.Helpers.Computative.Random.Random3D.Randi ( int  x,
int  y,
int  min,
int  max 
)

returns int between (min, max)

Parameters
xA System.Int32
yA System.Int32
minA System.Int32
maxA System.Int32
Returns
A System.Int32
123  {
124  return (int)(Rand(x,y) * (max-min) + min);
125  }
float Rand(int x)
Returns 0-1 float
Definition: Random3D.cs:41
int pluginbase.Helpers.Computative.Random.Random3D.Randi ( int  x,
int  y,
int  z,
int  min,
int  max 
)

Returns int between (min, max)

Parameters
xA System.Int32
yA System.Int32
zA System.Int32
minA System.Int32
maxA System.Int32
Returns
A System.Int32
149  {
150  return (int)(Rand(x,y,z) * (max-min) + min);
151  }
float Rand(int x)
Returns 0-1 float
Definition: Random3D.cs:41

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