Project

General

Profile

« Previous | Next » 

Revision 347f6cc1

Added by Leszek Koltunski 12 months ago

correct face shapes (post-new MeshPolygon normal computation)

View differences:

src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
206 206

  
207 207
  public ObjectFaceShape getObjectFaceShape(int variant)
208 208
    {
209
    int angle1 = 25;
210
    int angle2 = 35;
211
    float R = 0.2f;
212
    float S = 0.8f;
213

  
209 214
    if( variant==0 )
210 215
      {
211 216
      float h1 = isInIconMode() ? 0.001f : 0.04f;
212 217
      float h2 = isInIconMode() ? 0.001f : 0.02f;
213
      float[][] bands = { {h1,35,0.2f,0.8f,5,2,1}, {h2,35,0.5f,1.0f,5,2,1}, {0.001f,35,0.3f,0.8f,5,2,1} };
218
      float[][] bands = { {h1,angle1,R,S,5,2,1}, {h2,angle1,R,S,5,2,1}, {0.001f,angle1,R,S,5,2,1} };
214 219
      int[] indices   = { 0,0,1,2,2,2 };
215 220
      return new ObjectFaceShape(bands,indices,null);
216 221
      }
217 222
    else if( variant==1 )
218 223
      {
219 224
      float height = isInIconMode() ? 0.001f : 0.038f;
220
      float[][] bands = { {height,35,0.5f,0.9f, 5,2,1}, {0.001f,35,0.5f,0.9f, 5,2,1} };
225
      float[][] bands = { {height,angle2,R,S, 5,2,1}, {0.001f,angle2,R,S, 5,2,1} };
221 226
      int[] indices   = { 0,0,0,1,1 };
222 227
      return new ObjectFaceShape(bands,indices,null);
223 228
      }
224 229
    else
225 230
      {
226 231
      float height = isInIconMode() ? 0.001f : 0.038f;
227
      float[][] bands = { {height,35,0.9f,1.0f, 5,2,1}, {0.001f,35,0.9f,1.0f, 5,2,1} };
232
      float[][] bands = { {height,angle2,R,S, 5,2,1}, {0.001f,angle2,R,S, 5,2,1} };
228 233
      int[] indices   = { 0,0,0,1,1,1 };
229 234
      return new ObjectFaceShape(bands,indices,null);
230 235
      }

Also available in: Unified diff