Revision 163b8d7d
Added by Leszek Koltunski over 5 years ago
- ID 163b8d7dbe36c50c0860151f5a6d84a020137e18
- Parent e6904678
src/main/java/org/distorted/library/main/MeshFlat.java | ||
---|---|---|
52 | 52 |
(mCols>=2 && mRows>=2 ? 2*mRows-2 : 1); |
53 | 53 |
} |
54 | 54 |
|
55 |
//android.util.Log.e("BITMAP","vertices="+numVertices+" rows="+mRows+" cols="+mCols);
|
|
55 |
//android.util.Log.e("MeshFlat","vertices="+numVertices+" rows="+mRows+" cols="+mCols);
|
|
56 | 56 |
|
57 | 57 |
remainingVert = numVertices; |
58 | 58 |
} |
... | ... | |
77 | 77 |
|
78 | 78 |
return vertex+1; |
79 | 79 |
} |
80 |
|
|
80 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
81 | 82 |
|
82 | 83 |
private int repeatLast(int vertex, float[] attribs) |
83 | 84 |
{ |
84 | 85 |
remainingVert--; |
85 | 86 |
|
86 |
//android.util.Log.e("BITMAP", "repeating last vertex!");
|
|
87 |
//android.util.Log.e("MeshFlat", "repeating last vertex!");
|
|
87 | 88 |
|
88 | 89 |
if( vertex>0 ) |
89 | 90 |
{ |
... | ... | |
114 | 115 |
final float X = 1.0f/mCols; |
115 | 116 |
final float Y = 1.0f/mRows; |
116 | 117 |
|
117 |
//android.util.Log.d("BITMAP", "buildGrid");
|
|
118 |
//android.util.Log.d("MeshFlat", "buildGrid");
|
|
118 | 119 |
|
119 | 120 |
y = 0.0f; |
120 | 121 |
|
... | ... | |
144 | 145 |
y+=Y; |
145 | 146 |
} |
146 | 147 |
|
147 |
//android.util.Log.d("BITMAP", "buildGrid done");
|
|
148 |
//android.util.Log.d("MeshFlat", "buildGrid done");
|
|
148 | 149 |
} |
149 | 150 |
|
150 | 151 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
185 | 186 |
//android.util.Log.d("MeshFlat", "attribs: "+debug(attribs,8) ); |
186 | 187 |
|
187 | 188 |
if( remainingVert!=0 ) |
188 |
android.util.Log.d("BITMAP", "remainingVert " +remainingVert );
|
|
189 |
android.util.Log.d("MeshFlat", "remainingVert " +remainingVert );
|
|
189 | 190 |
|
190 | 191 |
mVertAttribs = ByteBuffer.allocateDirect(numVertices*VERTSIZE).order(ByteOrder.nativeOrder()).asFloatBuffer(); |
191 | 192 |
mVertAttribs.put(attribs).position(0); |
193 |
|
|
194 |
setData(numVertices, mVertAttribs); |
|
192 | 195 |
} |
193 | 196 |
} |
Also available in: Unified diff
Progress with Effects3D app - merge Matrix effects