Project

General

Profile

« Previous | Next » 

Revision f969f51d

Added by Leszek Koltunski over 8 years ago

Make the hips movement more realistic

View differences:

src/main/java/org/distorted/examples/girl/GirlRenderer.java
53 53
    private static Dynamic3D diL, diR;
54 54
    private static Dynamic1D diHips, diSink;
55 55
    private static Static3D v0,v1,v2,v3;
56
    private static Static1D d0, d1, s0;
56
    private static Static1D dBegin, dMiddle, dEnd, s0;
57 57
    
58 58
    private int bmpHeight, bmpWidth;
59 59
    
......
106 106
      // Lower Movement
107 107
      pHips = new Static2D(216,505);
108 108
      HipsRegion = new Static4D(0,0,120,120);
109
      diHips = new Dynamic1D(1000,0.0f);
110
      
111
      d0 = new Static1D(-hipsSwirl);
112
      d1 = new Static1D(+hipsSwirl);
113
      
114
      diHips.add(d0);
115
      diHips.add(d1);
109
      diHips = new Dynamic1D(1500,0.0f);
110
      
111
      dBegin = new Static1D(-hipsSwirl);
112
      dMiddle= new Static1D(0);
113
      dEnd   = new Static1D(+hipsSwirl);
114
      
115
      diHips.add(dBegin);
116
      diHips.add(dMiddle);
117
      diHips.add(dEnd);
118
      diHips.add(dEnd);
119
      diHips.add(dMiddle);
120
      diHips.add(dBegin);
116 121
      }
117 122

  
118 123
///////////////////////////////////////////////////////////////////////////////////////////////////
......
120 125
   public static void setHips(int s)
121 126
     {      
122 127
     hipsSwirl = s;
123
     d0.set(-hipsSwirl);
124
     d1.set(+hipsSwirl);
128
     dBegin.set(-hipsSwirl);
129
     dEnd.set(+hipsSwirl);
125 130
     }
126 131
   
127 132
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff