Show / Hide Table of Contents

Interface IDistortionTextureGenerator

Generate Textures suitable for use in distortion drawing (Rgba and Float32)

Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public interface IDistortionTextureGenerator

Methods

ConcentricSinusoidalFloat32(uint, uint, int, bool, bool, SineWavePoint, float)

Generates a texture of concentric, spherical sinusodial waves The texture's pixels are single component 32 floats

Declaration
ITexture ConcentricSinusoidalFloat32(uint textureWidth, uint textureHeight, int numQuarterWaves, bool taperInner, bool taperOuter, SineWavePoint centreWaveStartPoint = SineWavePoint.ZeroAscending, float maxAmplitude = 1)
Parameters
Type Name Description
uint textureWidth

Width in pixels

uint textureHeight

Height in pixels

int numQuarterWaves

A quarter wave is 90 degress / PI radians of a sinusodial curve

bool taperInner

Intensity will be scaled from 0 in the centre to 1.0 at the mid radius distance

bool taperOuter

Intensity will be scaled from 1.0 at the mid radius distance to 0 at the outer radius distance

SineWavePoint centreWaveStartPoint

Set where on the sinusodial curve the wave oscillations start

float maxAmplitude

Amplitude of sinusodial wave

Returns
Type Description
ITexture

ConcentricSinusoidalRgba(uint, uint, int, bool, bool, SineWavePoint, float)

Generates a texture of concentric, spherical sinusodial waves The texture's pixels are four component RGBA

Declaration
ITexture ConcentricSinusoidalRgba(uint textureWidth, uint textureHeight, int numQuarterWaves, bool taperInner, bool taperOuter, SineWavePoint centreWaveStartPoint = SineWavePoint.ZeroAscending, float maxAmplitude = 1)
Parameters
Type Name Description
uint textureWidth

Width in pixels

uint textureHeight

Height in pixels

int numQuarterWaves

A quarter wave is 90 degress / PI radians of a sinusodial curve

bool taperInner

Intensity will be scaled from 0 in the centre to 1.0 at the mid radius distance

bool taperOuter

Intensity will be scaled from 1.0 at the mid radius distance to 0 at the outer radius distance

SineWavePoint centreWaveStartPoint

Set where on the sinusodial curve the wave oscillations start

float maxAmplitude

Amplitude of sinusodial wave

Returns
Type Description
ITexture
In this article
Back to top yak2D - Alex Paterson