C# Class Fusion.Build.ImageUtils.Image

Mostrar archivo Open project: demiurghg/FusionEngine

Public Methods

Method Description
Address ( int x, int y, bool wrap = true ) : int

Returns address of pixel with given coordinates and adressing mode

Clamp ( int x, int min, int max ) : int
ComputeGradient ( ) : Image

ComputeGradient

Copy ( int offsetX, int offsetY, Image img ) : void

CosLerp ( Color4 a, Color4 b, float x ) : Color4
CosLerp ( float a, float b, float x ) : float
Desaturate ( Color4 color ) : Color4
Fill ( Color4 color ) : void

Fills image with

FillUniformNoise ( bool monochrome ) : void

Fills image with

Frac ( float x ) : float
Gamma ( float gamma ) : void
GeneratePerlinNoise ( int kernelSize, int numHarmonics, float persistence = 0.5f ) : Image

Generate perline noise

GradientDistortion ( float amount ) : Image

Image ( int width, int height ) : System

Constructor

Image ( int width, int height, Color4 fillColor ) : System

Constructor

Lerp ( float a, float b, float x ) : float
LoadTga ( string path ) : Image
Luminance ( Color4 color ) : float
Normalize ( ) : void
ParticleDeposition ( int sizeX, int sizeY, int iterations, float displace ) : Image

http://www.lighthouse3d.com/opengl/terrain/index.php3?particle

PerpixelProcessing ( Color4>.Func procFunc, float amount = 1 ) : void

Does perpixel processing with given function

PerpixelProcessing ( Func procFunc ) : void

Does perpixel processing with given function

Quantize ( int numLevels, float amount = 1 ) : void
QuantizeValue ( float value, int levels ) : float
Sample ( float x, float y, bool wrap = true, bool useCosineInterpolation = false ) : Color4

Sample with filtering

Sample ( int x, int y, bool wrap = true ) : Color4

Samples image at given coordinates with wraping addressing mode

Saturate ( float saturation ) : void
SaveTga ( Image image, string path ) : void
Wrap ( int x, int wrapSize ) : int
Write ( int u, int v, Color4 value, bool wrap = true ) : void

Writes pixel to image

Method Details

Address() public method

Returns address of pixel with given coordinates and adressing mode
public Address ( int x, int y, bool wrap = true ) : int
x int
y int
wrap bool
return int

Clamp() public static method

public static Clamp ( int x, int min, int max ) : int
x int
min int
max int
return int

ComputeGradient() public method

ComputeGradient
public ComputeGradient ( ) : Image
return Image

Copy() public method

public Copy ( int offsetX, int offsetY, Image img ) : void
offsetX int
offsetY int
img Image
return void

CosLerp() public static method

public static CosLerp ( Color4 a, Color4 b, float x ) : Color4
a Color4
b Color4
x float
return Color4

CosLerp() public static method

public static CosLerp ( float a, float b, float x ) : float
a float
b float
x float
return float

Desaturate() public static method

public static Desaturate ( Color4 color ) : Color4
color Color4
return Color4

Fill() public method

Fills image with
public Fill ( Color4 color ) : void
color Color4
return void

FillUniformNoise() public method

Fills image with
public FillUniformNoise ( bool monochrome ) : void
monochrome bool
return void

Frac() public static method

public static Frac ( float x ) : float
x float
return float

Gamma() public method

public Gamma ( float gamma ) : void
gamma float
return void

GeneratePerlinNoise() static public method

Generate perline noise
static public GeneratePerlinNoise ( int kernelSize, int numHarmonics, float persistence = 0.5f ) : Image
kernelSize int
numHarmonics int
persistence float
return Image

GradientDistortion() public method

public GradientDistortion ( float amount ) : Image
amount float
return Image

Image() public method

Constructor
public Image ( int width, int height ) : System
width int Image width
height int Image height
return System

Image() public method

Constructor
public Image ( int width, int height, Color4 fillColor ) : System
width int Image width
height int Image height
fillColor Color4 Color to fill image
return System

Lerp() public static method

public static Lerp ( float a, float b, float x ) : float
a float
b float
x float
return float

LoadTga() public static method

public static LoadTga ( string path ) : Image
path string
return Image

Luminance() public static method

public static Luminance ( Color4 color ) : float
color Color4
return float

Normalize() public method

public Normalize ( ) : void
return void

ParticleDeposition() public static method

http://www.lighthouse3d.com/opengl/terrain/index.php3?particle
public static ParticleDeposition ( int sizeX, int sizeY, int iterations, float displace ) : Image
sizeX int
sizeY int
iterations int
displace float
return Image

PerpixelProcessing() public method

Does perpixel processing with given function
public PerpixelProcessing ( Color4>.Func procFunc, float amount = 1 ) : void
procFunc Color4>.Func
amount float
return void

PerpixelProcessing() public method

Does perpixel processing with given function
public PerpixelProcessing ( Func procFunc ) : void
procFunc Func
return void

Quantize() public method

public Quantize ( int numLevels, float amount = 1 ) : void
numLevels int
amount float
return void

QuantizeValue() public static method

public static QuantizeValue ( float value, int levels ) : float
value float
levels int
return float

Sample() public method

Sample with filtering
public Sample ( float x, float y, bool wrap = true, bool useCosineInterpolation = false ) : Color4
x float value within range 0..1
y float value within range 0..1
wrap bool
useCosineInterpolation bool
return Color4

Sample() public method

Samples image at given coordinates with wraping addressing mode
public Sample ( int x, int y, bool wrap = true ) : Color4
x int
y int
wrap bool
return Color4

Saturate() public method

public Saturate ( float saturation ) : void
saturation float
return void

SaveTga() public static method

public static SaveTga ( Image image, string path ) : void
image Image
path string
return void

Wrap() public static method

public static Wrap ( int x, int wrapSize ) : int
x int
wrapSize int
return int

Write() public method

Writes pixel to image
public Write ( int u, int v, Color4 value, bool wrap = true ) : void
u int
v int
value Color4
wrap bool
return void