public class VertexEffectWave extends VertexEffect
NUM_FLOAT_UNIFORMS, NUM_INT_UNIFORMS
Constructor and Description |
---|
VertexEffectWave(Data5D wave,
Data3D center)
Directional, sinusoidal wave effect.
|
VertexEffectWave(Data5D wave,
Data3D center,
Data4D region)
Directional, sinusoidal wave effect.
|
Modifier and Type | Method and Description |
---|---|
static void |
enable()
Have to call this before the shaders get compiled (i.e before DistortedLibrary.onCreate()) for the Effect to work.
|
getNumEnabled, setMeshAssociation
addQueue, enableEffects, getCenterDimension, getEffectDimension, getID, getName, getRegionDimension, getString, getType, isUnity, notifyWhenFinished, remQueue
public VertexEffectWave(Data5D wave, Data3D center, Data4D region)
wave
- A 5-dimensional data structure describing the wave: first member is the amplitude,
second is the wave length, third is the phase (i.e. when phase = PI/2, the sine
wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two
describe the 'direction' of the wave.
Wave direction is defined to be a 3D vector of length 1. To define such vectors, we need 2 floats: thus the fourth member is the angle Alpha (in degrees) which the vector forms with the XY-plane, and the fifth is the angle Beta (again in degrees) which the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically' in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane will be sine shapes.
Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical', but this time it waves in the Y-direction, i.e. cross sections of the surface and the YZ-plane with be sine shapes.
Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, sqrt(2)/2, 0) and the wave is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the value if sin at this point.
center
- 3-dimensional Data that, at any given time, returns the Center of the Effect.region
- Region that masks the Effect.public VertexEffectWave(Data5D wave, Data3D center)
wave
- see VertexEffectWave(Data5D,Data3D,Data4D)
center
- 3-dimensional Data that, at any given time, returns the Center of the Effect.