Project

General

Profile

« Previous | Next » 

Revision 6155e738

Added by Leszek Koltunski 10 months ago

progress with FactoryBandagedMegaminx.

View differences:

src/main/java/org/distorted/objectlib/bandaged/FactoryBandagedCuboid.java
10 10
package org.distorted.objectlib.bandaged;
11 11

  
12 12
import org.distorted.library.type.Static3D;
13
import org.distorted.library.type.Static4D;
13 14
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
14 15

  
15 16
///////////////////////////////////////////////////////////////////////////////////////////////////
......
37 38

  
38 39
///////////////////////////////////////////////////////////////////////////////////////////////////
39 40

  
40
  public float[][] getVertices(int variant)
41
  public Static4D getElementQuat(int element, int[] numLayers)
42
    {
43
    return QUAT;
44
    }
45

  
46
///////////////////////////////////////////////////////////////////////////////////////////////////
47

  
48
  public float[][] getVertices(int[] numLayers, int variant)
41 49
    {
42 50
    if( mVertices==null )
43 51
      mVertices = new float[][]
......
57 65

  
58 66
///////////////////////////////////////////////////////////////////////////////////////////////////
59 67

  
60
  public int[][] getIndices(int variant)
68
  public int[][] getIndices(int[] numLayers, int variant)
61 69
    {
62 70
    if( mIndices==null )
63 71
      mIndices = new int[][]
......
75 83

  
76 84
///////////////////////////////////////////////////////////////////////////////////////////////////
77 85

  
78
  public int getElementVariant(float x, float y, float z)
86
  public int getElementVariant(int[] numLayers, float x, float y, float z)
79 87
     {
80 88
     return 0;
81 89
     }
......
87 95
    return TouchControlHexahedron.FACE_AXIS;
88 96
    }
89 97

  
90
///////////////////////////////////////////////////////////////////////////////////////////////////
91

  
92
  public int getNumAxis()
93
    {
94
    return 3;
95
    }
96

  
97 98
///////////////////////////////////////////////////////////////////////////////////////////////////
98 99

  
99 100
  public float[][] getDiameterAxis()
......
110 111

  
111 112
///////////////////////////////////////////////////////////////////////////////////////////////////
112 113

  
113
  public float[] getDist3D()
114
  public float[] getDist3D(int[] numLayers)
114 115
    {
115
    float dx = mNumLayers[0]/2.0f;
116
    float dy = mNumLayers[1]/2.0f;
117
    float dz = mNumLayers[2]/2.0f;
116
    float dx = numLayers[0]/2.0f;
117
    float dy = numLayers[1]/2.0f;
118
    float dz = numLayers[2]/2.0f;
118 119

  
119 120
    return new float[] {dx,dx,dy,dy,dz,dz};
120 121
    }
121 122

  
122 123
///////////////////////////////////////////////////////////////////////////////////////////////////
123 124

  
124
  public float[][] getBands(boolean iconMode)
125
  public float[][] getBands(boolean iconMode, int[] numLayers)
125 126
    {
126
    int sum = mNumLayers[0]+mNumLayers[1]+mNumLayers[2];
127
    int sum = numLayers[0]+numLayers[1]+numLayers[2];
127 128

  
128 129
    float height= iconMode ? 0.001f : 0.05f;
129 130
    int[] angle = {65,54,43,35,30,26,23,21};

Also available in: Unified diff