Project

General

Profile

« Previous | Next » 

Revision bcbd5b45

Added by Leszek Koltunski about 4 years ago

Adjustment to Static's API.

View differences:

src/main/java/org/distorted/examples/wind/WindEffectsManager.java
128 128
    mWind = wind;
129 129

  
130 130
    float tanAngle = (wind-50)/50.0f;
131
    shearFactor.set2(tanAngle);
132
    scaleFactor.set1(1/(float)Math.sqrt(1+tanAngle*tanAngle));
131
    shearFactor.set1(tanAngle);
132
    scaleFactor.set0(1/(float)Math.sqrt(1+tanAngle*tanAngle));
133 133

  
134 134
    windDynamic1.setDuration( wind > 0 ? 900 + 10000/wind : Long.MAX_VALUE);
135 135
    windDynamic2.setDuration( wind > 0 ? 720 +  8000/wind : Long.MAX_VALUE);
136 136
    windDynamic3.setDuration( wind > 0 ? 900 + 10000/wind : Long.MAX_VALUE);
137 137

  
138 138
    float wave2 = mHeight*( 0.05f + 0.002f*wind);
139
    windFactor21.set1(wave2);
140
    windFactor22.set1(wave2);
139
    windFactor21.set0(wave2);
140
    windFactor22.set0(wave2);
141 141

  
142 142
    float wave3 = (mHeight/(wind+5.0f));
143
    windFactor31.set1(wave3);
144
    windFactor32.set1(wave3);
143
    windFactor31.set0(wave3);
144
    windFactor32.set0(wave3);
145 145

  
146 146
    float wave4 = (mHeight*(wind*(100-wind)/50000.0f));
147
    windFactor41.set1(wave4);
148
    windFactor42.set1(wave4);
147
    windFactor41.set0(wave4);
148
    windFactor42.set0(wave4);
149 149
    }
150 150

  
151 151
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff