Project

General

Profile

« Previous | Next » 

Revision f988589e

Added by Leszek Koltunski almost 8 years ago

Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.

View differences:

src/main/java/org/distorted/examples/girl/GirlRenderer.java
74 74
      pLeft = new Static2D(132, 264);
75 75
      pRight= new Static2D(247, 264);
76 76
      
77
      // Make the boobs bigger
77
      // Size
78 78
      sinkRegion = new Static4D(0,0,60,60);
79 79
      
80 80
      s0 = new Static1D(boobsSink);
81 81
      
82
      diSink = new Dynamic1D();
83
      diSink.setCount(0.5f);
84
      diSink.setDuration(0);
82
      diSink = new Dynamic1D(0,0.5f);
85 83
      diSink.add(s0);
86 84
      
87
      // Boobs Movement
85
      // Upper Movement
88 86
      Region = new Static4D(0,0,45,45);
89 87
      
90
      diL = new Dynamic3D();
91
      diR = new Dynamic3D();
92
      
93
      diL.setCount(0.0f);
94
      diR.setCount(0.0f);
95
      diL.setDuration(1000);
96
      diR.setDuration(1000);
97
      
88
      diL = new Dynamic3D(1000,0.0f);
89
      diR = new Dynamic3D(1000,0.0f);
90

  
98 91
      v0 = new Static3D( 0,-boobsSwing, 0);
99 92
      v1 = new Static3D( boobsSwing, 0, 0);
100 93
      v2 = new Static3D( 0, boobsSwing, 0);
......
110 103
      diR.add(v2);
111 104
      diR.add(v1);
112 105
      
113
      // Movement of the hips
106
      // Lower Movement
114 107
      pHips = new Static2D(216,505);
115 108
      HipsRegion = new Static4D(0,0,120,120);
116
      diHips = new Dynamic1D();
109
      diHips = new Dynamic1D(1000,0.0f);
117 110
      
118 111
      d0 = new Static1D(-hipsSwirl);
119 112
      d1 = new Static1D(+hipsSwirl);
120 113
      
121 114
      diHips.add(d0);
122 115
      diHips.add(d1);
123
      diHips.setDuration(1000);
124
      diHips.setCount(0.0f);
125 116
      }
126 117

  
127 118
///////////////////////////////////////////////////////////////////////////////////////////////////
......
175 166
        float factor = (float)height/bmpHeight;
176 167

  
177 168
        mGirl.move( new Static3D((width-w)/2,0,0) );
178
        mGirl.scale( new Static3D(factor,factor,factor) );
169
        mGirl.scale(factor);
179 170
        }
180 171
      else
181 172
        {
......
183 174
        float factor = (float)width/bmpWidth;
184 175

  
185 176
        mGirl.move( new Static3D(0,(height-h)/2,0) );
186
        mGirl.scale( new Static3D(factor,factor,factor) );
177
        mGirl.scale(factor);
187 178
        }
188 179
      
189 180
      Distorted.onSurfaceChanged(width, height); 

Also available in: Unified diff