Revision 0dee575b
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
|---|---|---|
| 44 | 44 |
import org.distorted.library.type.Static4D; |
| 45 | 45 |
|
| 46 | 46 |
import org.distorted.objectlib.helpers.FactoryCubit; |
| 47 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
|
| 48 |
import org.distorted.objectlib.helpers.ObjectShape; |
|
| 47 | 49 |
|
| 48 | 50 |
import java.io.DataInputStream; |
| 49 | 51 |
import java.io.IOException; |
| ... | ... | |
| 63 | 65 |
private static final float SQ2 = (float)Math.sqrt(2); |
| 64 | 66 |
private static final float SQ3 = (float)Math.sqrt(3); |
| 65 | 67 |
private static final float SQ5 = (float)Math.sqrt(5); |
| 66 |
private static final float SQ6 = (float)Math.sqrt(6); |
|
| 67 | 68 |
private final float DEFAULT_SCALE = 0.3f; |
| 68 | 69 |
|
| 69 | 70 |
private final GLSurfaceView mView; |
| ... | ... | |
| 1425 | 1426 |
///// END DEFINITIONS ///////////////////////////////////////////////////////////////// |
| 1426 | 1427 |
|
| 1427 | 1428 |
FactoryCubit factory = FactoryCubit.getInstance(); |
| 1428 |
|
|
| 1429 | 1429 |
factory.clear(); |
| 1430 |
factory.createNewFaceTransform(vertices,vertIndexes,vertIndexes.length); |
|
| 1431 |
mMesh = factory.createRoundedSolid(vertices, vertIndexes,
|
|
| 1432 |
bands, bandIndexes,
|
|
| 1433 |
corners, cornerIndexes, |
|
| 1434 |
centers, centerIndexes,
|
|
| 1435 |
numComponents, convexCenter, MESH_NICE );
|
|
| 1430 |
|
|
| 1431 |
ObjectShape shape = new ObjectShape(vertices,vertIndexes,vertIndexes.length);
|
|
| 1432 |
ObjectFaceShape face= new ObjectFaceShape(bands,bandIndexes,corners,cornerIndexes,centers,centerIndexes,convexCenter);
|
|
| 1433 |
|
|
| 1434 |
factory.createNewFaceTransform(shape);
|
|
| 1435 |
mMesh = factory.createRoundedSolid(shape,face,numComponents, MESH_NICE );
|
|
| 1436 | 1436 |
|
| 1437 | 1437 |
int numEff = mMesh.getNumEffComponents(); |
| 1438 | 1438 |
|
Also available in: Unified diff
cleaning up.