Revision f42f2a92
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/examples/generic/GenericEffect.java | ||
---|---|---|
91 | 91 |
case SWIRL : effect = new VertexEffectSwirl (mDyn1, mCenterDyn, mRegion4Dyn) ; break; |
92 | 92 |
case WAVE : effect = new VertexEffectWave (mDyn5, mCenterDyn, mRegion4Dyn) ; break; |
93 | 93 |
case DISAPPEAR : effect = new VertexEffectDisappear () ; break; |
94 |
case PIPE : effect = new VertexEffectPipe (mDyn5, mCenterDyn) ; break; |
|
94 | 95 |
|
95 | 96 |
case VERTEX_MOVE : effect = new VertexEffectMove (mDyn3) ; break; |
96 | 97 |
case VERTEX_QUATERNION: effect = new VertexEffectQuaternion (mDyn4, mCenterDyn) ; break; |
... | ... | |
205 | 206 |
mSta3.set(dp,ap,bp); |
206 | 207 |
break; |
207 | 208 |
case DISAPPEAR : break; |
209 |
case PIPE : float strength = (mInter[0] > 50 ? 50.0f/(100.01f-mInter[0]) : mInter[0] / 50.0f); |
|
210 |
float px = mInter[1]; |
|
211 |
float py = mInter[2]; |
|
212 |
float pz = mInter[3]; |
|
213 |
float radius = mInter[4]/10.0f; |
|
214 |
|
|
215 |
float plen = (float)Math.sqrt(px*px + py*py + pz*pz); |
|
216 |
px /= plen; |
|
217 |
py /= plen; |
|
218 |
pz /= plen; |
|
219 |
|
|
220 |
mSta5.set(strength,px,py,pz,radius); |
|
221 |
break; |
|
208 | 222 |
|
209 | 223 |
/////////////////////////////////////////////////////////////////////////////////////// |
210 | 224 |
// FRAGMENT |
... | ... | |
492 | 506 |
mDyn1.add(mSta1); |
493 | 507 |
} |
494 | 508 |
break; |
495 |
case 5 : if( mName == EffectName.WAVE ) |
|
509 |
case 5 : if( mName == EffectName.WAVE || mName == EffectName.PIPE )
|
|
496 | 510 |
{ |
497 | 511 |
mDyn5 = new Dynamic5D(); |
498 | 512 |
mSta5 = new Static5D(0, 0, 0, 0, 0); |
Also available in: Unified diff
New 'PIPE' vertex effect.