Revision 9099e567
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/library/mesh/MeshBase.java | ||
---|---|---|
79 | 79 |
{ |
80 | 80 |
mTextureMap = new float[8]; |
81 | 81 |
|
82 |
mTextureMap[ 0] = 0.0f; // LLX
|
|
83 |
mTextureMap[ 1] = 0.0f; // LLY
|
|
84 |
mTextureMap[ 2] = 0.0f; // ULX
|
|
85 |
mTextureMap[ 3] = 1.0f; // ULY
|
|
86 |
mTextureMap[ 4] = 1.0f; // URX
|
|
87 |
mTextureMap[ 5] = 1.0f; // URY
|
|
88 |
mTextureMap[ 6] = 1.0f; // LRX
|
|
89 |
mTextureMap[ 7] = 0.0f; // LRY
|
|
82 |
mTextureMap[ 0] = 0.0f; // LD_X
|
|
83 |
mTextureMap[ 1] = 0.0f; // LD_Y
|
|
84 |
mTextureMap[ 2] = 0.0f; // LU_X
|
|
85 |
mTextureMap[ 3] = 1.0f; // LU_Y
|
|
86 |
mTextureMap[ 4] = 1.0f; // RU_X
|
|
87 |
mTextureMap[ 5] = 1.0f; // RU_Y
|
|
88 |
mTextureMap[ 6] = 1.0f; // RD_X
|
|
89 |
mTextureMap[ 7] = 0.0f; // RD_Y
|
|
90 | 90 |
} |
91 | 91 |
Component(Component original) |
92 | 92 |
{ |
... | ... | |
101 | 101 |
|
102 | 102 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
103 | 103 |
|
104 |
MeshBase(float width, float height, float depth)
|
|
104 |
MeshBase(float sx, float sy, float sz)
|
|
105 | 105 |
{ |
106 |
mStretchX = width;
|
|
107 |
mStretchY = height;
|
|
108 |
mStretchZ = depth;
|
|
106 |
mStretchX = sx;
|
|
107 |
mStretchY = sy;
|
|
108 |
mStretchZ = sz;
|
|
109 | 109 |
|
110 | 110 |
mShowNormals = false; |
111 | 111 |
mInflate = 0.0f; |
... | ... | |
390 | 390 |
{ |
391 | 391 |
|
392 | 392 |
} |
393 |
|
|
394 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
395 |
/** |
|
396 |
* Sets texture maps for all components of this mesh. |
|
397 |
* <p> |
|
398 |
* Please note that calling this once with the complete list of Maps will be much faster than |
|
399 |
* calling it repeatedly with one Maps at a time, as we have to reallocate the array of vertices |
|
400 |
* each time. |
|
401 |
*/ |
|
402 |
public void setTextureMap(float[][] maps) |
|
403 |
{ |
|
404 |
int components = mComponent.size(); |
|
405 |
|
|
406 |
for(int comp=0; comp<components; comp++) |
|
407 |
{ |
|
408 |
|
|
409 |
} |
|
410 |
} |
|
393 | 411 |
} |
394 | 412 |
|
395 | 413 |
|
Also available in: Unified diff
New Mesh 'Triangles' and updated Inflate & Generic apps to test it.