40 |
40 |
import org.distorted.library.effect.PostprocessEffectBlur;
|
41 |
41 |
import org.distorted.library.effect.PostprocessEffectGlow;
|
42 |
42 |
import org.distorted.library.effect.VertexEffectDeform;
|
|
43 |
import org.distorted.library.effect.VertexEffectDisappear;
|
43 |
44 |
import org.distorted.library.effect.VertexEffectDistort;
|
44 |
45 |
import org.distorted.library.effect.VertexEffectMove;
|
45 |
46 |
import org.distorted.library.effect.VertexEffectPinch;
|
... | ... | |
124 |
125 |
case PINCH : effect = new VertexEffectPinch (mDyn3, mCenterDyn, mRegion4Dyn) ; break;
|
125 |
126 |
case SWIRL : effect = new VertexEffectSwirl (mDyn1, mCenterDyn, mRegion4Dyn) ; break;
|
126 |
127 |
case WAVE : effect = new VertexEffectWave (mDyn5, mCenterDyn, mRegion4Dyn) ; break;
|
|
128 |
case DISAPPEAR : effect = new VertexEffectDisappear () ; break;
|
|
129 |
|
127 |
130 |
case VERTEX_MOVE : effect = new VertexEffectMove (mDyn3) ; break;
|
128 |
131 |
case VERTEX_QUATERNION: effect = new VertexEffectQuaternion (mDyn4, mCenterDyn) ; break;
|
129 |
132 |
case VERTEX_ROTATE : effect = new VertexEffectRotate (mDyn1, mDyn3, mCenterDyn) ; break;
|
... | ... | |
238 |
241 |
float bp = (mInter[2]-50)*180 / 50.0f;
|
239 |
242 |
mSta3.set(dp,ap,bp);
|
240 |
243 |
break;
|
|
244 |
case DISAPPEAR : break;
|
241 |
245 |
|
242 |
246 |
///////////////////////////////////////////////////////////////////////////////////////
|
243 |
247 |
// FRAGMENT
|
... | ... | |
490 |
494 |
|
491 |
495 |
switch(mDimension)
|
492 |
496 |
{
|
|
497 |
case 0 : break;
|
493 |
498 |
case 1 : mDyn1 = new Dynamic1D();
|
494 |
499 |
mSta1 = new Static1D(0);
|
495 |
500 |
mDyn1.add(mSta1);
|
... | ... | |
544 |
549 |
default: throw new RuntimeException("unsupported effect");
|
545 |
550 |
}
|
546 |
551 |
|
547 |
|
mInter = new int[mDimension];
|
548 |
|
mSeekID= new int[mDimension];
|
549 |
|
|
550 |
|
mInterRegion = new int[4];
|
551 |
|
mSeekRegionID= new int[4];
|
552 |
|
mRegion4Dyn = new Dynamic4D();
|
553 |
|
mRegion4Sta = new Static4D(0,0,0,0);
|
554 |
|
mRegion4Dyn.add(mRegion4Sta);
|
555 |
|
mRegion3Dyn = new Dynamic3D();
|
556 |
|
mRegion3Sta = new Static3D(0,0,0);
|
557 |
|
mRegion3Dyn.add(mRegion3Sta);
|
558 |
|
|
559 |
|
mInterCenter = new int[3];
|
560 |
|
mSeekCenterID= new int[3];
|
561 |
|
mCenterDyn = new Dynamic3D();
|
562 |
|
mCenterSta = new Static3D(0,0,0);
|
563 |
|
mCenterDyn.add(mCenterSta);
|
|
552 |
if( mDimension>0 )
|
|
553 |
{
|
|
554 |
mInter = new int[mDimension];
|
|
555 |
mSeekID= new int[mDimension];
|
|
556 |
|
|
557 |
mInterRegion = new int[4];
|
|
558 |
mSeekRegionID= new int[4];
|
|
559 |
mRegion4Dyn = new Dynamic4D();
|
|
560 |
mRegion4Sta = new Static4D(0,0,0,0);
|
|
561 |
mRegion4Dyn.add(mRegion4Sta);
|
|
562 |
mRegion3Dyn = new Dynamic3D();
|
|
563 |
mRegion3Sta = new Static3D(0,0,0);
|
|
564 |
mRegion3Dyn.add(mRegion3Sta);
|
|
565 |
|
|
566 |
mInterCenter = new int[3];
|
|
567 |
mSeekCenterID= new int[3];
|
|
568 |
mCenterDyn = new Dynamic3D();
|
|
569 |
mCenterSta = new Static3D(0,0,0);
|
|
570 |
mCenterDyn.add(mCenterSta);
|
|
571 |
}
|
564 |
572 |
|
565 |
573 |
mButton = null;
|
566 |
574 |
mEffect = null;
|
... | ... | |
572 |
580 |
|
573 |
581 |
View createView(int num)
|
574 |
582 |
{
|
575 |
|
SeekBar[] seek = new SeekBar[mDimension];
|
|
583 |
SeekBar[] seek = null;
|
|
584 |
|
|
585 |
if( mDimension>0 )
|
|
586 |
{
|
|
587 |
seek = new SeekBar[mDimension];
|
|
588 |
}
|
576 |
589 |
|
577 |
590 |
GenericActivity2 act = mAct.get();
|
578 |
591 |
|
579 |
592 |
switch(mDimension)
|
580 |
593 |
{
|
|
594 |
case 0 : mEffect = act.getLayoutInflater().inflate(R.layout.effect0d, null);
|
|
595 |
mText = mEffect.findViewById(R.id.effect0dText);
|
|
596 |
mButton = mEffect.findViewById(R.id.button0dRemove);
|
|
597 |
setText();
|
|
598 |
break;
|
581 |
599 |
case 1 : mEffect = act.getLayoutInflater().inflate(R.layout.effect1d, null);
|
582 |
600 |
mText = mEffect.findViewById(R.id.effect1dText);
|
583 |
601 |
seek[0] = mEffect.findViewById(R.id.effect1dbar1);
|
New effect VertexEffectDisappear