Revision 4e9f2df5
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java | ||
---|---|---|
160 | 160 |
{-0.5f*X,-0.5f*Y,-0.5f*Z} |
161 | 161 |
}; |
162 | 162 |
|
163 |
final int[][] vert_indices =
|
|
163 |
int[][] indices =
|
|
164 | 164 |
{ |
165 | 165 |
{2,3,1,0}, |
166 | 166 |
{7,6,4,5}, |
... | ... | |
170 | 170 |
{3,7,5,1}, |
171 | 171 |
}; |
172 | 172 |
|
173 |
return new ObjectShape(vertices, vert_indices, getNumCubitFaces(), 6);
|
|
173 |
return new ObjectShape(vertices, indices, getNumCubitFaces(), 6); |
|
174 | 174 |
} |
175 | 175 |
|
176 | 176 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
178 | 178 |
public ObjectFaceShape getObjectFaceShape(int variant) |
179 | 179 |
{ |
180 | 180 |
float defHeight = 0.048f; |
181 |
int[] bandIndices = new int[] { 0,0,1,1,2,2 };
|
|
182 |
float[][] corners = new float[][] { {0.04f,0.15f} };
|
|
183 |
int[] cornerIndices = new int[] { 0,0,0,0,0,0,0,0 };
|
|
184 |
int[] centerIndices = new int[] { 0,1,2,3,4,5,6,7 };
|
|
181 |
int[] bandIndices = { 0,0,1,1,2,2 };
|
|
182 |
float[][] corners = { {0.04f,0.15f} };
|
|
183 |
int[] cornerIndices = { 0,0,0,0,0,0,0,0 }; |
|
184 |
int[] centerIndices = { 0,1,2,3,4,5,6,7 }; |
|
185 | 185 |
|
186 | 186 |
int pointer = mDimPointers[variant]; |
187 | 187 |
int X = mDims[pointer][0]; |
... | ... | |
192 | 192 |
int maxXZ = Math.max(X,Z); |
193 | 193 |
int maxYZ = Math.max(Y,Z); |
194 | 194 |
|
195 |
float[][] bands= new float[][]
|
|
195 |
float[][] bands =
|
|
196 | 196 |
{ |
197 | 197 |
{defHeight/maxYZ,65,0.25f,0.5f,5,1,2}, |
198 | 198 |
{defHeight/maxXZ,65,0.25f,0.5f,5,1,2}, |
199 | 199 |
{defHeight/maxXY,65,0.25f,0.5f,5,1,2} |
200 | 200 |
}; |
201 | 201 |
|
202 |
float[][] centers = new float[][]
|
|
202 |
float[][] centers = |
|
203 | 203 |
{ |
204 | 204 |
{+0.5f*(X-1),+0.5f*(Y-1),+0.5f*(Z-1)}, |
205 | 205 |
{+0.5f*(X-1),+0.5f*(Y-1),-0.5f*(Z-1)}, |
Also available in: Unified diff
Simplify.