Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Helpers.Computative.ValuePoint3D Class Referenceabstract

Base class to build a system of complex, deferred, equations Mostly to help with construction of worlds More...

Inheritance diagram for pluginbase.Helpers.Computative.ValuePoint3D:
pluginbase.Helpers.Computative.Algorithms.CellNoise pluginbase.Helpers.Computative.Algorithms.Noise pluginbase.Helpers.Computative.Algorithms.Perlin pluginbase.Helpers.Computative.Algorithms.Simplex pluginbase.Helpers.Computative.Algorithms.SmoothPerlin pluginbase.Helpers.Computative.Combiners.Combiner3D pluginbase.Helpers.Computative.Combiners.Manip3D pluginbase.Helpers.Computative.Combiners.ScalarValue pluginbase.Helpers.Computative.Random.Random3D

Public Member Functions

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...
 
abstract float GetValue (int x, int y, int z)
 Get number from 0-1 More...
 
abstract float GetValue (int x, int y)
 Get a value at a given x,y coordinate More...
 

Static Public Member Functions

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

Base class to build a system of complex, deferred, equations Mostly to help with construction of worlds

Member Function Documentation

ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Abs ( )

Absolute value

Returns
A ValuePoint3D
106  {
107  return new Manip3D(this, delegate(float x){return Math.Abs(x);});
108  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Brightness ( float  amount)

Adjust brightness. Takes in -1 to 1f

Parameters
amountAmount.
125  {
126  return new Manip3D(this, delegate(float x)
127  {
128  return MExt.Clamp(x + amount, 0f, 1f);
129  });
130  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Clamp ( )

Clamp this value between 0 and 1

214  {
215  return new Manip3D(this, delegate(float v) {
216  return MExt.Clamp(v, 0f, 1f);
217  });
218  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Clamp ( float  min,
float  max 
)

Clamp this value between a min and max

Parameters
minMinimum.
maxMax.
226  {
227  return new Manip3D(this, delegate(float v) {
228  return MExt.Clamp(v, min, max);
229  });
230  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Contrast ( float  amount)

Adjusts contract from -1 to 1

Parameters
amountAmount.
139  {
140  float factor = amount + 1f;
141  factor *= factor;
142  return new Manip3D(this, delegate(float x)
143  {
144  return MExt.Clamp((x - 0.5f) * factor + 0.5f, 0f, 1f);
145  });
146  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.CustomCombine ( ValuePoint3D  with,
Combiner3D.CombinerOperator  func 
)

Combine two values using a custom combiner

Returns
The combine.
Parameters
withWith.
funcFunc.
85  {
86  return new Combiner3D(this, with, func);
87  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.CustomManipulator ( Manip3D.ManipOperator  func)

Manipulate this value with a custom manipulator

Returns
The manipulator.
Parameters
funcFunc.
95  {
96  return new Manip3D(this, func);
97  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Darken ( ValuePoint3D  with)

Darken this value by another one

Parameters
withWith.
72  {
73  return new Combiner3D(this, with, delegate(float a, float b) {
74  return a < b ? a : b;
75  });
76  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Gamma ( float  gamma)

Gamma the specified gamma. Range 0f - 2f

Parameters
gammaGamma.
204  {
205  return new Manip3D(this, delegate(float v) {
206  return MExt.Clamp((float)Math.Pow(v, 1f / gamma), 0f, 1f);
207  });
208  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Invert ( )

Invert the value from a 0-1 range

114  {
115  return new Manip3D(this, delegate(float x){return 1f - x;});
116  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Lighten ( ValuePoint3D  with)

Lighten this value by another one

Parameters
withWith.
61  {
62  return new Combiner3D(this, with, delegate(float a, float b) {
63  return a > b ? a : b;
64  });
65  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.LinearBounds ( float  min,
float  max 
)

Linearly interpolates to squish between the bounds

Returns
The bounds.
Parameters
minMinimum.
maxMax.
175  {
176  float mf = 1f / (max - min);
177  return new Manip3D(this, delegate(float v)
178  {
179  return MExt.Clamp((v - min) * mf, 0f, 1f);
180  });
181  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Mix ( ValuePoint3D  with,
float  sourceOpacity 
)

Mix this value with another one at a certain ratio

Parameters
withWith.
sourceOpacitySource opacity.
50  {
51  return new Combiner3D(this, with, delegate(float a, float b) {
52  return a * sourceOpacity + b * (1f - sourceOpacity);
53  });
54  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
static ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.operator* ( ValuePoint3D  a,
ValuePoint3D  b 
)
static

Multiply two value points

32  {
33  return new Combiner3D(a, b, delegate(float v1, float v2){return v1*v2;});
34  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
static ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.operator+ ( ValuePoint3D  a,
ValuePoint3D  b 
)
static

Add two value points together

16  {
17  return new Combiner3D(a, b, delegate(float v1, float v2){return v1+v2;});
18  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
static ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.operator- ( ValuePoint3D  a,
ValuePoint3D  b 
)
static

Subtract two value points

24  {
25  return new Combiner3D(a, b, delegate(float v1, float v2){return v1-v2;});
26  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
static ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.operator/ ( ValuePoint3D  a,
ValuePoint3D  b 
)
static

Divide one value by another

40  {
41  return new Combiner3D(a, b, delegate(float v1, float v2){return v1/v2;});
42  }
Combine by delegate. Auto-generated from ValuePoint3D
Definition: Combiner3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Scale ( float  factor)

Scale the specified factor and clamp

Parameters
factorFactor.
155  {
156  return new Manip3D(this, delegate(float v)
157  {
158  return MExt.Clamp(v * factor, 0f, 1f);
159  });
160  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7
ValuePoint3D pluginbase.Helpers.Computative.ValuePoint3D.Threshold ( float  threshold)

Threshold the specified threshold. Returns 0 if below, otherwise 1f

Parameters
thresholdThreshold.
191  {
192  return new Manip3D(this, delegate(float v) {
193  return v < threshold ? 0f : 1f;
194  });
195  }
Singular manipulator such as Absolute value
Definition: Manip3D.cs:7

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