Project

General

Profile

« Previous | Next » 

Revision ece89b28

Added by Leszek Koltunski almost 5 years ago

Adjustment to Static's API.

View differences:

src/main/java/org/distorted/library/main/DistortedScreen.java
107 107
      fpsCanvas.drawText(fpsString, 0.5f*FPS_W, 0.75f*FPS_H, mPaint);
108 108
      fpsTexture.setTexture(fpsBitmap);
109 109

  
110
      mMoveVector.set2(mHeight-FPS_H-5);
110
      mMoveVector.set1(mHeight-FPS_H-5);
111 111

  
112 112
      lastTime = time;
113 113
      }
src/main/java/org/distorted/library/mesh/MeshCubes.java
101 101
     if( mTexMappingW==null ) mTexMappingW = new float[6];
102 102
     if( mTexMappingH==null ) mTexMappingH = new float[6];
103 103

  
104
     mTexMappingX[FRONT]  = front.get1();
105
     mTexMappingY[FRONT]  = front.get2();
106
     mTexMappingW[FRONT]  = front.get3() - front.get1();
107
     mTexMappingH[FRONT]  = front.get4() - front.get2();
108

  
109
     mTexMappingX[BACK]   = back.get1();
110
     mTexMappingY[BACK]   = back.get2();
111
     mTexMappingW[BACK]   = back.get3() - back.get1();
112
     mTexMappingH[BACK]   = back.get4() - back.get2();
113

  
114
     mTexMappingX[LEFT]   = left.get1();
115
     mTexMappingY[LEFT]   = left.get2();
116
     mTexMappingW[LEFT]   = left.get3() - left.get1();
117
     mTexMappingH[LEFT]   = left.get4() - left.get2();
118

  
119
     mTexMappingX[RIGHT]  = right.get1();
120
     mTexMappingY[RIGHT]  = right.get2();
121
     mTexMappingW[RIGHT]  = right.get3() - right.get1();
122
     mTexMappingH[RIGHT]  = right.get4() - right.get2();
123

  
124
     mTexMappingX[TOP]    = top.get1();
125
     mTexMappingY[TOP]    = top.get2();
126
     mTexMappingW[TOP]    = top.get3() - top.get1();
127
     mTexMappingH[TOP]    = top.get4() - top.get2();
128

  
129
     mTexMappingX[BOTTOM] = bottom.get1();
130
     mTexMappingY[BOTTOM] = bottom.get2();
131
     mTexMappingW[BOTTOM] = bottom.get3() - bottom.get1();
132
     mTexMappingH[BOTTOM] = bottom.get4() - bottom.get2();
104
     mTexMappingX[FRONT]  = front.get0();
105
     mTexMappingY[FRONT]  = front.get1();
106
     mTexMappingW[FRONT]  = front.get2() - front.get0();
107
     mTexMappingH[FRONT]  = front.get3() - front.get1();
108

  
109
     mTexMappingX[BACK]   = back.get0();
110
     mTexMappingY[BACK]   = back.get1();
111
     mTexMappingW[BACK]   = back.get2() - back.get0();
112
     mTexMappingH[BACK]   = back.get3() - back.get1();
113

  
114
     mTexMappingX[LEFT]   = left.get0();
115
     mTexMappingY[LEFT]   = left.get1();
116
     mTexMappingW[LEFT]   = left.get2() - left.get0();
117
     mTexMappingH[LEFT]   = left.get3() - left.get1();
118

  
119
     mTexMappingX[RIGHT]  = right.get0();
120
     mTexMappingY[RIGHT]  = right.get1();
121
     mTexMappingW[RIGHT]  = right.get2() - right.get0();
122
     mTexMappingH[RIGHT]  = right.get3() - right.get1();
123

  
124
     mTexMappingX[TOP]    = top.get0();
125
     mTexMappingY[TOP]    = top.get1();
126
     mTexMappingW[TOP]    = top.get2() - top.get0();
127
     mTexMappingH[TOP]    = top.get3() - top.get1();
128

  
129
     mTexMappingX[BOTTOM] = bottom.get0();
130
     mTexMappingY[BOTTOM] = bottom.get1();
131
     mTexMappingW[BOTTOM] = bottom.get2() - bottom.get0();
132
     mTexMappingH[BOTTOM] = bottom.get3() - bottom.get1();
133 133
     }
134 134

  
135 135
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/library/type/Static1D.java
68 68
 *
69 69
 * @param ox new value of the first float.
70 70
 */
71
  public void set1(float ox)
71
  public void set0(float ox)
72 72
    {
73 73
    x = ox;
74 74
    }
......
79 79
 * 
80 80
 * @return The single float.
81 81
 */
82
  public float get1()
82
  public float get0()
83 83
    {
84 84
    return x;  
85 85
    }
src/main/java/org/distorted/library/type/Static2D.java
73 73
 *
74 74
 * @param ox new value of the first float.
75 75
 */
76
  public void set1(float ox)
76
  public void set0(float ox)
77 77
    {
78 78
    x = ox;
79 79
    }
......
84 84
 *
85 85
 * @param oy new value of the second float.
86 86
 */
87
  public void set2(float oy)
87
  public void set1(float oy)
88 88
    {
89 89
    y = oy;
90 90
    }
......
95 95
 *
96 96
 * @return The first float.
97 97
 */
98
  public float get1()
98
  public float get0()
99 99
    {
100 100
    return x;
101 101
    }
......
106 106
 * 
107 107
 * @return The second float.
108 108
 */
109
  public float get2()
109
  public float get1()
110 110
    {
111 111
    return y;  
112 112
    }
src/main/java/org/distorted/library/type/Static3D.java
78 78
 *
79 79
 * @param ox new value of the first float.
80 80
 */
81
  public void set1(float ox)
81
  public void set0(float ox)
82 82
    {
83 83
    x = ox;
84 84
    }
......
89 89
 *
90 90
 * @param oy new value of the second float.
91 91
 */
92
  public void set2(float oy)
92
  public void set1(float oy)
93 93
    {
94 94
    y = oy;
95 95
    }
......
100 100
 *
101 101
 * @param oz new value of the third float.
102 102
 */
103
  public void set3(float oz)
103
  public void set2(float oz)
104 104
    {
105 105
    z = oz;
106 106
    }
......
111 111
 *
112 112
 * @return The first float.
113 113
 */
114
  public float get1()
114
  public float get0()
115 115
    {
116 116
    return x;
117 117
    }
......
122 122
 *
123 123
 * @return The second float.
124 124
 */
125
  public float get2()
125
  public float get1()
126 126
    {
127 127
    return y;
128 128
    }
......
133 133
 * 
134 134
 * @return The third float.
135 135
 */
136
  public float get3()
136
  public float get2()
137 137
    {
138 138
    return z;  
139 139
    }
src/main/java/org/distorted/library/type/Static4D.java
83 83
 *
84 84
 * @param ox new value of the first float.
85 85
 */
86
  public void set1(float ox)
86
  public void set0(float ox)
87 87
    {
88 88
    x = ox;
89 89
    }
......
94 94
 *
95 95
 * @param oy new value of the second float.
96 96
 */
97
  public void set2(float oy)
97
  public void set1(float oy)
98 98
    {
99 99
    y = oy;
100 100
    }
......
105 105
 *
106 106
 * @param oz new value of the third float.
107 107
 */
108
  public void set3(float oz)
108
  public void set2(float oz)
109 109
    {
110 110
    z = oz;
111 111
    }
......
116 116
 *
117 117
 * @param ow new value of the fourth float.
118 118
 */
119
  public void set4(float ow)
119
  public void set3(float ow)
120 120
    {
121 121
    w = ow;
122 122
    }
......
127 127
 *
128 128
 * @return The first float.
129 129
 */
130
  public float get1()
130
  public float get0()
131 131
    {
132 132
    return x;
133 133
    }
......
138 138
 *
139 139
 * @return The second float.
140 140
 */
141
  public float get2()
141
  public float get1()
142 142
    {
143 143
    return y;
144 144
    }
......
149 149
 *
150 150
 * @return The third float.
151 151
 */
152
  public float get3()
152
  public float get2()
153 153
    {
154 154
    return z;
155 155
    }
......
160 160
 *
161 161
 * @return The fourth float.
162 162
 */
163
  public float get4()
163
  public float get3()
164 164
    {
165 165
    return w;
166 166
    }
src/main/java/org/distorted/library/type/Static5D.java
88 88
 *
89 89
 * @param ox new value of the first float.
90 90
 */
91
  public void set1(float ox)
91
  public void set0(float ox)
92 92
    {
93 93
    x = ox;
94 94
    }
......
99 99
 *
100 100
 * @param oy new value of the second float.
101 101
 */
102
  public void set2(float oy)
102
  public void set1(float oy)
103 103
    {
104 104
    y = oy;
105 105
    }
......
110 110
 *
111 111
 * @param oz new value of the third float.
112 112
 */
113
  public void set3(float oz)
113
  public void set2(float oz)
114 114
    {
115 115
    z = oz;
116 116
    }
......
121 121
 *
122 122
 * @param ow new value of the fourth float.
123 123
 */
124
  public void set4(float ow)
124
  public void set3(float ow)
125 125
    {
126 126
    w = ow;
127 127
    }
......
132 132
 *
133 133
 * @param ov new value of the fifth float.
134 134
 */
135
  public void set5(float ov)
135
  public void set4(float ov)
136 136
    {
137 137
    v = ov;
138 138
    }
......
143 143
 *
144 144
 * @return The first float.
145 145
 */
146
  public float get1()
146
  public float get0()
147 147
    {
148 148
    return x;
149 149
    }
......
154 154
 *
155 155
 * @return The second float.
156 156
 */
157
  public float get2()
157
  public float get1()
158 158
    {
159 159
    return y;
160 160
    }
161 161

  
162

  
163 162
///////////////////////////////////////////////////////////////////////////////////////////////////
164 163
/**
165 164
 * Return the value of the third float contained.
166 165
 *
167 166
 * @return The third float.
168 167
 */
169
  public float get3()
168
  public float get2()
170 169
    {
171 170
    return z;
172 171
    }
......
177 176
 *
178 177
 * @return The fourth float.
179 178
 */
180
  public float get4()
179
  public float get3()
181 180
    {
182 181
    return w;
183 182
    }
......
188 187
 * 
189 188
 * @return The fifth float.
190 189
 */
191
  public float get5()
190
  public float get4()
192 191
    {
193 192
    return v;
194 193
    }

Also available in: Unified diff