Revision 8d10f7b8
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java | ||
---|---|---|
141 | 141 |
mCubits = new BandagedCubit[mNumCubits]; |
142 | 142 |
int c=0; |
143 | 143 |
|
144 |
float begX = 0.5f*(1-mX); |
|
145 |
float begY = 0.5f*(1-mY); |
|
146 |
float begZ = 0.5f*(1-mZ); |
|
147 |
|
|
144 | 148 |
for(int x=0; x<mX; x++) |
145 | 149 |
for(int y=0; y<mY; y++) |
146 | 150 |
for(int z=0; z<mZ; z++) |
147 | 151 |
if( x==0 || x==mX-1 || y==0 || y==mY-1 || z==0 || z==mZ-1 ) |
148 | 152 |
{ |
149 |
float[] pos = new float[] { 0.5f*(1-mX)+x,0.5f*(1-mY)+y,0.5f*(1-mZ)+z };
|
|
153 |
float[] pos = new float[] { begX+x,begY+y,begZ+z };
|
|
150 | 154 |
mCubits[c] = new BandagedCubit(pos,mX,mY,mZ,mQuatT,mQuatA,mScale,false); |
151 | 155 |
c++; |
152 | 156 |
} |
Also available in: Unified diff
Bandaged: progress.