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(UInt32, UInt32, Int32, Boolean, Boolean, SineWavePoint, Single)
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 = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | textureWidth | Width in pixels |
| System.UInt32 | textureHeight | Height in pixels |
| System.Int32 | numQuarterWaves | A quarter wave is 90 degress / PI radians of a sinusodial curve |
| System.Boolean | taperInner | Intensity will be scaled from 0 in the centre to 1.0 at the mid radius distance |
| System.Boolean | 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 |
| System.Single | maxAmplitude | Amplitude of sinusodial wave |
Returns
| Type | Description |
|---|---|
| ITexture |
ConcentricSinusoidalRgba(UInt32, UInt32, Int32, Boolean, Boolean, SineWavePoint, Single)
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 = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | textureWidth | Width in pixels |
| System.UInt32 | textureHeight | Height in pixels |
| System.Int32 | numQuarterWaves | A quarter wave is 90 degress / PI radians of a sinusodial curve |
| System.Boolean | taperInner | Intensity will be scaled from 0 in the centre to 1.0 at the mid radius distance |
| System.Boolean | 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 |
| System.Single | maxAmplitude | Amplitude of sinusodial wave |
Returns
| Type | Description |
|---|---|
| ITexture |