816 |
816 |
/**
|
817 |
817 |
* Directional, sinusoidal wave effect.
|
818 |
818 |
*
|
819 |
|
* @param wave A 3-dimensional data structure describing the wave: first member is the amplitude,
|
820 |
|
* second is the angle (in degrees, as always) the direction of the wave forms with
|
821 |
|
* the X-axis, and the third is the wave length.
|
|
819 |
* @param wave A 4-dimensional data structure describing the wave: first member is the amplitude,
|
|
820 |
* second is the wave length, and the next two describe the 'direction' of the wave.
|
|
821 |
* Wave direction is defined to be a 3D vector of length 1. To define such vectors, we
|
|
822 |
* need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector
|
|
823 |
* forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which
|
|
824 |
* the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
|
|
825 |
*
|
|
826 |
* Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically'
|
|
827 |
* in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane
|
|
828 |
* will be sine shapes.
|
|
829 |
* Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical',
|
|
830 |
* but this time it waves in the Y-direction, i.e. cross sections of the surface and the
|
|
831 |
* YZ-plane with be sine shapes.
|
|
832 |
* Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
|
|
833 |
* is entirely 'horizontal' and moves point (x,y,0) in direction V.
|
822 |
834 |
* @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
|
823 |
835 |
* @return ID of the effect added, or -1 if we failed to add one.
|
824 |
836 |
*/
|
... | ... | |
831 |
843 |
/**
|
832 |
844 |
* Directional, sinusoidal wave effect.
|
833 |
845 |
*
|
834 |
|
* @param wave A 3-dimensional data structure describing the wave: first member is the amplitude,
|
835 |
|
* second is the angle (in degrees, as always) the direction of the wave forms with
|
836 |
|
* the X-axis, and the third is the wave length.
|
|
846 |
* @param wave A 4-dimensional data structure describing the wave: first member is the amplitude,
|
|
847 |
* second is the wave length, and the next two describe the 'direction' of the wave.
|
|
848 |
* Wave direction is defined to be a 3D vector of length 1. To define such vectors, we
|
|
849 |
* need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector
|
|
850 |
* forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which
|
|
851 |
* the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
|
|
852 |
*
|
|
853 |
* Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically'
|
|
854 |
* in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane
|
|
855 |
* will be sine shapes.
|
|
856 |
* Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical',
|
|
857 |
* but this time it waves in the Y-direction, i.e. cross sections of the surface and the
|
|
858 |
* YZ-plane with be sine shapes.
|
|
859 |
* Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
|
|
860 |
* is entirely 'horizontal' and moves point (x,y,0) in direction V.
|
837 |
861 |
* @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
|
838 |
862 |
* @param region Region that masks the Effect.
|
839 |
863 |
* @return ID of the effect added, or -1 if we failed to add one.
|
swap the 2nd and the 3rd parameters in the WAVE effect and improve comments for the WAVE user API.