Revision 7d755851
Added by Leszek Koltunski almost 9 years ago
| src/main/java/org/distorted/library/DistortedEffects.java | ||
|---|---|---|
| 291 | 291 |
} |
| 292 | 292 |
|
| 293 | 293 |
/// DEBUG ONLY ////// |
| 294 |
// displayBoundingRect(halfInputH, halfInputW, halfZ, df, mM.getMVP(), mesh.getBoundingVertices() );
|
|
| 294 |
// displayBoundingRect(halfInputW, halfInputH, halfZ, df, mM.getMVP(), mesh.getBoundingVertices() );
|
|
| 295 | 295 |
/// END DEBUG /////// |
| 296 | 296 |
} |
| 297 | 297 |
|
| src/main/java/org/distorted/library/MeshCubes.java | ||
|---|---|---|
| 74 | 74 |
|
| 75 | 75 |
private float[] mBoundingVert; |
| 76 | 76 |
|
| 77 |
private static float[] mBoundingVert1 = new float[] { -0.5f,-0.5f, FRONTZ,
|
|
| 78 |
+0.5f,-0.5f, FRONTZ,
|
|
| 79 |
-0.5f,+0.5f, FRONTZ,
|
|
| 80 |
+0.5f,+0.5f, FRONTZ };
|
|
| 77 |
private static float[] mBoundingVert1 = new float[] { -0.5f,+0.5f, FRONTZ,
|
|
| 78 |
-0.5f,-0.5f, FRONTZ,
|
|
| 79 |
+0.5f,+0.5f, FRONTZ,
|
|
| 80 |
+0.5f,-0.5f, FRONTZ };
|
|
| 81 | 81 |
|
| 82 |
private static float[] mBoundingVert2 = new float[] { -0.5f,-0.5f, FRONTZ,
|
|
| 83 |
+0.5f,-0.5f, FRONTZ, |
|
| 84 |
-0.5f,+0.5f, FRONTZ, |
|
| 82 |
private static float[] mBoundingVert2 = new float[] { -0.5f,+0.5f, FRONTZ,
|
|
| 83 |
-0.5f,-0.5f, FRONTZ, |
|
| 85 | 84 |
+0.5f,+0.5f, FRONTZ, |
| 86 |
-0.5f,-0.5f, BACKZ , |
|
| 87 |
+0.5f,-0.5f, BACKZ , |
|
| 85 |
+0.5f,-0.5f, FRONTZ, |
|
| 88 | 86 |
-0.5f,+0.5f, BACKZ , |
| 89 |
+0.5f,+0.5f, BACKZ }; |
|
| 87 |
-0.5f,-0.5f, BACKZ , |
|
| 88 |
+0.5f,+0.5f, BACKZ , |
|
| 89 |
+0.5f,-0.5f, BACKZ }; |
|
| 90 | 90 |
|
| 91 | 91 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 92 | 92 |
// a Block is split into two triangles along the NE-SW line iff it is in the top-right |
| ... | ... | |
| 202 | 202 |
|
| 203 | 203 |
buildBoundingVert(frontOnly); |
| 204 | 204 |
|
| 205 |
//android.util.Log.d("cubes", "VERT STRING:"+debug(mBoundingVert,3));
|
|
| 206 |
|
|
| 205 | 207 |
markRegions(); |
| 206 | 208 |
dataLength = computeDataLength(frontOnly); |
| 207 | 209 |
|
| ... | ... | |
| 226 | 228 |
for(int i=0; i<mRows; i++) |
| 227 | 229 |
mCubes[i][j] = 1; |
| 228 | 230 |
|
| 231 |
mBoundingVert = frontOnly ? mBoundingVert1 : mBoundingVert2; |
|
| 232 |
|
|
| 233 |
//android.util.Log.d("cubes", "VERT FULL:"+debug(mBoundingVert,3));
|
|
| 234 |
|
|
| 229 | 235 |
markRegions(); |
| 230 | 236 |
dataLength = computeDataLength(frontOnly); |
| 231 | 237 |
|
| 232 | 238 |
remainingVert = dataLength; |
| 233 | 239 |
} |
| 234 |
|
|
| 235 |
mBoundingVert = frontOnly ? mBoundingVert1 : mBoundingVert2; |
|
| 236 | 240 |
} |
| 237 | 241 |
|
| 238 | 242 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 421 | 425 |
mBoundingVert[3*(i+numVert)+2] = BACKZ; |
| 422 | 426 |
} |
| 423 | 427 |
} |
| 424 |
|
|
| 425 |
//android.util.Log.d("cubes", "VERT:"+debug(mBoundingVert,3));
|
|
| 426 | 428 |
} |
| 427 | 429 |
|
| 428 | 430 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/library/MeshFlat.java | ||
|---|---|---|
| 34 | 34 |
private int mCols, mRows; |
| 35 | 35 |
private int remainingVert; |
| 36 | 36 |
|
| 37 |
private static float[] mBoundingVert = new float[] { -0.5f,-0.5f,0.0f,
|
|
| 38 |
+0.5f,-0.5f,0.0f,
|
|
| 39 |
-0.5f,+0.5f,0.0f,
|
|
| 40 |
+0.5f,+0.5f,0.0f };
|
|
| 37 |
private static float[] mBoundingVert = new float[] { -0.5f,+0.5f,0.0f,
|
|
| 38 |
-0.5f,-0.5f,0.0f,
|
|
| 39 |
+0.5f,+0.5f,0.0f,
|
|
| 40 |
+0.5f,-0.5f,0.0f };
|
|
| 41 | 41 |
|
| 42 | 42 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 43 | 43 |
// Create a flat, full grid. |
Also available in: Unified diff
Still one more problem in boundingVertices.