C# Class Procedurality.Channel

ファイルを表示 Open project: N3X15/VoxelSim Class Usage Examples

Public Properties

Property Type Description
height int
pixels ].float[
powerof2 bool
width int

Public Methods

Method Description
Channel ( int _Width, int _Height ) : System
HeightClamp ( float h ) : Channel
abs ( ) : Channel
add ( float a ) : Channel
addClip ( float add ) : Channel
average ( ) : float
averageConnected ( float value ) : float
boxFit ( float value, int width, int height ) : Channel
brightness ( float brightness ) : Channel
bump ( Channel bumpmap, float lx, float ly, float shadow, float light, float ambient ) : Channel
bumpSpecular ( Channel bumpmap, float lx, float ly, float lz, float shadow, float light, int specular ) : Channel
channelAdd ( Channel channel ) : Channel
channelAddNoClip ( Channel channel ) : Channel
channelAverage ( Channel channel ) : Channel
channelBlend ( Channel channel, Channel alpha ) : Channel
channelBlend ( Channel channel, float alpha ) : Channel
channelBrightest ( Channel channel ) : Channel
channelDarkest ( Channel channel ) : Channel
channelDifference ( Channel channel ) : Channel
channelDivide ( Channel channel ) : Channel
channelMultiply ( Channel channel ) : Channel
channelSubtract ( Channel channel ) : Channel
channelSubtractNoClip ( Channel channel ) : Channel
clip ( ) : Channel
contrast ( float contrast ) : Channel
convolution ( float filter, float divisor, float offset ) : Channel
copy ( ) : Channel
count ( float value ) : int
crop ( int x_lo, int y_lo, int x_hi, int y_hi ) : Channel
cropWrap ( int x_lo, int y_lo, int x_hi, int y_hi ) : Channel
erode ( float talus, int iterations ) : Channel
erodeThermal ( float talus, int iterations ) : Channel
fft ( ) : Procedurality.Channel[]
fftInv ( Channel magni, Channel phase ) : Channel
fill ( float value ) : Channel
fill ( float value, float min, float max ) : Channel
find ( int radius, int x_start, int y_start, float value ) : int[]
findFirst ( float value ) : int[]
findMax ( ) : float
findMin ( ) : float
findMinMax ( ) : float[]
findNoWrap ( int radius, int x_start, int y_start, float value ) : int[]
flipH ( ) : Channel
flipV ( ) : Channel
floodfill ( int init_x, int init_y, float value ) : Channel
gain ( float gain ) : Channel
gamma ( float gamma ) : Channel
gamma2 ( ) : Channel
gamma4 ( ) : Channel
gamma8 ( ) : Channel
getChecksum ( ) : long
getHeight ( ) : int
getMaxDelta ( ) : float

Returns the maximum land height changes.

getPixel ( int x, int y ) : float
getPixelSafe ( int x, int y ) : float
getPixelWrap ( int x, int y ) : float
getPixels ( ) : ].float[
getWidth ( ) : int
grow ( float value, int radius ) : Channel
invert ( ) : Channel
largestConnected ( float value ) : Channel
lineart ( ) : Channel
log ( ) : Channel
multiply ( float factor ) : Channel
normalize ( ) : Channel
normalize ( float new_min, float new_max ) : Channel
normalize ( float min, float max, float new_min, float new_max ) : Channel
normalizeSymmetric ( ) : Channel
offset ( int x_offset, int y_offset ) : Channel
perturb ( Channel channel1, Channel channel2 ) : Channel
perturb ( Channel perturb, float magnitude ) : Channel
place ( Channel sprite, Channel alpha, int x_offset, int y_offset ) : Channel
place ( Channel sprite, int x_offset, int y_offset ) : Channel
placeBrightest ( Channel sprite, int x_offset, int y_offset ) : Channel
placeDarkest ( Channel sprite, int x_offset, int y_offset ) : Channel
power ( float exponent ) : Channel
power2 ( ) : Channel
putPixel ( int x, int y, float value ) : void
putPixelClip ( int x, int y, float v ) : void
putPixelSafe ( int x, int y, float value ) : void
putPixelWrap ( int x, int y, float value ) : void
quadJoin ( Channel channel1, Channel channel2, Channel channel3, Channel channel4 ) : Channel
quadSplit ( ) : Channel[]
relativeIntensity ( int radius ) : Channel
relativeIntensityNormalized ( int radius ) : Channel
rotate ( int degrees ) : Channel
scale ( int new_width, int new_height ) : Channel
scaleCubic ( int new_width, int new_height ) : Channel
scaleDouble ( ) : Channel
scaleFast ( int new_width, int new_height ) : Channel
scaleLinear ( int new_width, int new_height ) : Channel
setMaxDelta ( float max ) : Channel

sharpen ( int radius ) : Channel
shear ( float offset ) : Channel
silt ( float waterlevel, bool beaches ) : Channel

Smooths below-water surfaces and, optionally, adds beaches.

sine ( int frequency ) : Channel
smooth ( int radius ) : Channel
smooth ( int radius, Channel mask ) : Channel
smoothFast ( ) : Channel
smoothGain ( ) : Channel
smoothWrap ( int radius ) : Channel
squareFit ( float value, int size ) : Channel
squareGrow ( float value, int size ) : Channel
sum ( ) : float
threshold ( float start, float end ) : Channel
tile ( int new_width, int new_height ) : Channel
tileDouble ( ) : Channel
toLayer ( ) : Layer
xsine ( int frequency ) : Channel

Private Methods

Method Description
fastFourierTransform ( float data, int size, int isign ) : void

Method Details

Channel() public method

public Channel ( int _Width, int _Height ) : System
_Width int
_Height int
return System

HeightClamp() public method

public HeightClamp ( float h ) : Channel
h float
return Channel

abs() public method

public abs ( ) : Channel
return Channel

add() public method

public add ( float a ) : Channel
a float
return Channel

addClip() public method

public addClip ( float add ) : Channel
add float
return Channel

average() public method

public average ( ) : float
return float

averageConnected() public method

public averageConnected ( float value ) : float
value float
return float

boxFit() public method

public boxFit ( float value, int width, int height ) : Channel
value float
width int
height int
return Channel

brightness() public method

public brightness ( float brightness ) : Channel
brightness float
return Channel

bump() public method

public bump ( Channel bumpmap, float lx, float ly, float shadow, float light, float ambient ) : Channel
bumpmap Channel
lx float
ly float
shadow float
light float
ambient float
return Channel

bumpSpecular() public method

public bumpSpecular ( Channel bumpmap, float lx, float ly, float lz, float shadow, float light, int specular ) : Channel
bumpmap Channel
lx float
ly float
lz float
shadow float
light float
specular int
return Channel

channelAdd() public method

public channelAdd ( Channel channel ) : Channel
channel Channel
return Channel

channelAddNoClip() public method

public channelAddNoClip ( Channel channel ) : Channel
channel Channel
return Channel

channelAverage() public method

public channelAverage ( Channel channel ) : Channel
channel Channel
return Channel

channelBlend() public method

public channelBlend ( Channel channel, Channel alpha ) : Channel
channel Channel
alpha Channel
return Channel

channelBlend() public method

public channelBlend ( Channel channel, float alpha ) : Channel
channel Channel
alpha float
return Channel

channelBrightest() public method

public channelBrightest ( Channel channel ) : Channel
channel Channel
return Channel

channelDarkest() public method

public channelDarkest ( Channel channel ) : Channel
channel Channel
return Channel

channelDifference() public method

public channelDifference ( Channel channel ) : Channel
channel Channel
return Channel

channelDivide() public method

public channelDivide ( Channel channel ) : Channel
channel Channel
return Channel

channelMultiply() public method

public channelMultiply ( Channel channel ) : Channel
channel Channel
return Channel

channelSubtract() public method

public channelSubtract ( Channel channel ) : Channel
channel Channel
return Channel

channelSubtractNoClip() public method

public channelSubtractNoClip ( Channel channel ) : Channel
channel Channel
return Channel

clip() public method

public clip ( ) : Channel
return Channel

contrast() public method

public contrast ( float contrast ) : Channel
contrast float
return Channel

convolution() public method

public convolution ( float filter, float divisor, float offset ) : Channel
filter float
divisor float
offset float
return Channel

copy() public method

public copy ( ) : Channel
return Channel

count() public method

public count ( float value ) : int
value float
return int

crop() public method

public crop ( int x_lo, int y_lo, int x_hi, int y_hi ) : Channel
x_lo int
y_lo int
x_hi int
y_hi int
return Channel

cropWrap() public method

public cropWrap ( int x_lo, int y_lo, int x_hi, int y_hi ) : Channel
x_lo int
y_lo int
x_hi int
y_hi int
return Channel

erode() public method

public erode ( float talus, int iterations ) : Channel
talus float
iterations int
return Channel

erodeThermal() public method

public erodeThermal ( float talus, int iterations ) : Channel
talus float
iterations int
return Channel

fft() public method

public fft ( ) : Procedurality.Channel[]
return Procedurality.Channel[]

fftInv() public method

public fftInv ( Channel magni, Channel phase ) : Channel
magni Channel
phase Channel
return Channel

fill() public method

public fill ( float value ) : Channel
value float
return Channel

fill() public method

public fill ( float value, float min, float max ) : Channel
value float
min float
max float
return Channel

find() public method

public find ( int radius, int x_start, int y_start, float value ) : int[]
radius int
x_start int
y_start int
value float
return int[]

findFirst() public method

public findFirst ( float value ) : int[]
value float
return int[]

findMax() public method

public findMax ( ) : float
return float

findMin() public method

public findMin ( ) : float
return float

findMinMax() public method

public findMinMax ( ) : float[]
return float[]

findNoWrap() public method

public findNoWrap ( int radius, int x_start, int y_start, float value ) : int[]
radius int
x_start int
y_start int
value float
return int[]

flipH() public method

public flipH ( ) : Channel
return Channel

flipV() public method

public flipV ( ) : Channel
return Channel

floodfill() public method

public floodfill ( int init_x, int init_y, float value ) : Channel
init_x int
init_y int
value float
return Channel

gain() public method

public gain ( float gain ) : Channel
gain float
return Channel

gamma() public method

public gamma ( float gamma ) : Channel
gamma float
return Channel

gamma2() public method

public gamma2 ( ) : Channel
return Channel

gamma4() public method

public gamma4 ( ) : Channel
return Channel

gamma8() public method

public gamma8 ( ) : Channel
return Channel

getChecksum() public method

public getChecksum ( ) : long
return long

getHeight() public method

public getHeight ( ) : int
return int

getMaxDelta() public method

Returns the maximum land height changes.
public getMaxDelta ( ) : float
return float

getPixel() public method

public getPixel ( int x, int y ) : float
x int
y int
return float

getPixelSafe() public method

public getPixelSafe ( int x, int y ) : float
x int
y int
return float

getPixelWrap() public method

public getPixelWrap ( int x, int y ) : float
x int
y int
return float

getPixels() public method

public getPixels ( ) : ].float[
return ].float[

getWidth() public method

public getWidth ( ) : int
return int

grow() public method

public grow ( float value, int radius ) : Channel
value float
radius int
return Channel

invert() public method

public invert ( ) : Channel
return Channel

largestConnected() public method

public largestConnected ( float value ) : Channel
value float
return Channel

lineart() public method

public lineart ( ) : Channel
return Channel

log() public method

public log ( ) : Channel
return Channel

multiply() public method

public multiply ( float factor ) : Channel
factor float
return Channel

normalize() public method

public normalize ( ) : Channel
return Channel

normalize() public method

public normalize ( float new_min, float new_max ) : Channel
new_min float
new_max float
return Channel

normalize() public method

public normalize ( float min, float max, float new_min, float new_max ) : Channel
min float
max float
new_min float
new_max float
return Channel

normalizeSymmetric() public method

public normalizeSymmetric ( ) : Channel
return Channel

offset() public method

public offset ( int x_offset, int y_offset ) : Channel
x_offset int
y_offset int
return Channel

perturb() public method

public perturb ( Channel channel1, Channel channel2 ) : Channel
channel1 Channel
channel2 Channel
return Channel

perturb() public method

public perturb ( Channel perturb, float magnitude ) : Channel
perturb Channel
magnitude float
return Channel

place() public method

public place ( Channel sprite, Channel alpha, int x_offset, int y_offset ) : Channel
sprite Channel
alpha Channel
x_offset int
y_offset int
return Channel

place() public method

public place ( Channel sprite, int x_offset, int y_offset ) : Channel
sprite Channel
x_offset int
y_offset int
return Channel

placeBrightest() public method

public placeBrightest ( Channel sprite, int x_offset, int y_offset ) : Channel
sprite Channel
x_offset int
y_offset int
return Channel

placeDarkest() public method

public placeDarkest ( Channel sprite, int x_offset, int y_offset ) : Channel
sprite Channel
x_offset int
y_offset int
return Channel

power() public method

public power ( float exponent ) : Channel
exponent float
return Channel

power2() public method

public power2 ( ) : Channel
return Channel

putPixel() public method

public putPixel ( int x, int y, float value ) : void
x int
y int
value float
return void

putPixelClip() public method

public putPixelClip ( int x, int y, float v ) : void
x int
y int
v float
return void

putPixelSafe() public method

public putPixelSafe ( int x, int y, float value ) : void
x int
y int
value float
return void

putPixelWrap() public method

public putPixelWrap ( int x, int y, float value ) : void
x int
y int
value float
return void

quadJoin() public method

public quadJoin ( Channel channel1, Channel channel2, Channel channel3, Channel channel4 ) : Channel
channel1 Channel
channel2 Channel
channel3 Channel
channel4 Channel
return Channel

quadSplit() public method

public quadSplit ( ) : Channel[]
return Channel[]

relativeIntensity() public method

public relativeIntensity ( int radius ) : Channel
radius int
return Channel

relativeIntensityNormalized() public method

public relativeIntensityNormalized ( int radius ) : Channel
radius int
return Channel

rotate() public method

public rotate ( int degrees ) : Channel
degrees int
return Channel

scale() public method

public scale ( int new_width, int new_height ) : Channel
new_width int
new_height int
return Channel

scaleCubic() public method

public scaleCubic ( int new_width, int new_height ) : Channel
new_width int
new_height int
return Channel

scaleDouble() public method

public scaleDouble ( ) : Channel
return Channel

scaleFast() public method

public scaleFast ( int new_width, int new_height ) : Channel
new_width int
new_height int
return Channel

scaleLinear() public method

public scaleLinear ( int new_width, int new_height ) : Channel
new_width int
new_height int
return Channel

setMaxDelta() public method

public setMaxDelta ( float max ) : Channel
max float /// A ///
return Channel

sharpen() public method

public sharpen ( int radius ) : Channel
radius int
return Channel

shear() public method

public shear ( float offset ) : Channel
offset float
return Channel

silt() public method

Smooths below-water surfaces and, optionally, adds beaches.
public silt ( float waterlevel, bool beaches ) : Channel
waterlevel float /// A ///
beaches bool /// A ///
return Channel

sine() public method

public sine ( int frequency ) : Channel
frequency int
return Channel

smooth() public method

public smooth ( int radius ) : Channel
radius int
return Channel

smooth() public method

public smooth ( int radius, Channel mask ) : Channel
radius int
mask Channel
return Channel

smoothFast() public method

public smoothFast ( ) : Channel
return Channel

smoothGain() public method

public smoothGain ( ) : Channel
return Channel

smoothWrap() public method

public smoothWrap ( int radius ) : Channel
radius int
return Channel

squareFit() public method

public squareFit ( float value, int size ) : Channel
value float
size int
return Channel

squareGrow() public method

public squareGrow ( float value, int size ) : Channel
value float
size int
return Channel

sum() public method

public sum ( ) : float
return float

threshold() public method

public threshold ( float start, float end ) : Channel
start float
end float
return Channel

tile() public method

public tile ( int new_width, int new_height ) : Channel
new_width int
new_height int
return Channel

tileDouble() public method

public tileDouble ( ) : Channel
return Channel

toLayer() public method

public toLayer ( ) : Layer
return Layer

xsine() public method

public xsine ( int frequency ) : Channel
frequency int
return Channel

Property Details

height public_oe property

public int height
return int

pixels public_oe property

public float[,] pixels
return ].float[

powerof2 public_oe property

public bool powerof2
return bool

width public_oe property

public int width
return int