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

I generate random 0 and 1's with a density frequency More...

Inheritance diagram for pluginbase.Helpers.Computative.Algorithms.Noise:
pluginbase.Helpers.Computative.ValuePoint3D

Public Member Functions

 Noise (IPseudoRandom provider, float density)
 Initialize an instance of noise generator More...
 
 Noise (int seed, float density)
 Initialize an instance of noise generator More...
 
override float GetValue (int x, int y, int z)
 Get 0 or 1 of position More...
 
bool GetState (int x, int y, int z)
 Get state of position More...
 
override float GetValue (int x, int y)
 Get the value at the coordinate x,y More...
 
bool GetState (int x, int y)
 Get state 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

I generate random 0 and 1's with a density frequency

Constructor & Destructor Documentation

pluginbase.Helpers.Computative.Algorithms.Noise.Noise ( IPseudoRandom  provider,
float  density 
)

Initialize an instance of noise generator

Parameters
providerRandom number provider
densityDensity of the noise 1.0=white
19  {
20  _random = new Random3D(provider);
21  _density = density;
22  }
A value instance of pure random numbers
Definition: Random3D.cs:9
pluginbase.Helpers.Computative.Algorithms.Noise.Noise ( int  seed,
float  density 
)

Initialize an instance of noise generator

Parameters
seedSeed for random number provider
densityDensity of the noise. 1.0=white
30  :this(new PseudoRandom(seed), density)
31  {}
A basic implementation of a random number generator
Definition: PseudoRandom.cs:7

Member Function Documentation

bool pluginbase.Helpers.Computative.Algorithms.Noise.GetState ( int  x,
int  y,
int  z 
)

Get state of position

Parameters
xA System.Int32
yA System.Int32
zA System.Int32
Returns
A System.Boolean
69  {
70  return _random.GetValue(x,y,z) <= _density;
71  }
override float GetValue(int x, int y, int z)
Get the value at a coordinate x,y,z
Definition: Random3D.cs:162
bool pluginbase.Helpers.Computative.Algorithms.Noise.GetState ( int  x,
int  y 
)

Get state at the coordinate x,y

Returns
true, if state was gotten, false otherwise.
Parameters
xThe x coordinate.
yThe y coordinate.
91  {
92  return _random.GetValue(x,y) <= _density;
93  }
override float GetValue(int x, int y, int z)
Get the value at a coordinate x,y,z
Definition: Random3D.cs:162
override float pluginbase.Helpers.Computative.Algorithms.Noise.GetValue ( int  x,
int  y,
int  z 
)
virtual

Get 0 or 1 of position

Parameters
xA System.Int32
yA System.Int32
zA System.Int32
Returns
A System.Single

Implements pluginbase.Helpers.Computative.ValuePoint3D.

49  {
50  return _random.GetValue(x,y,z) <= _density ? 1f : 0f;
51  }
override float GetValue(int x, int y, int z)
Get the value at a coordinate x,y,z
Definition: Random3D.cs:162
override float pluginbase.Helpers.Computative.Algorithms.Noise.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.

80  {
81  return _random.GetValue(x,y) <= _density ? 1f : 0f;
82  }
override float GetValue(int x, int y, int z)
Get the value at a coordinate x,y,z
Definition: Random3D.cs:162

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