Revision 06ed13b5
Added by Leszek Koltunski about 4 years ago
| src/main/java/org/distorted/library/mesh/MeshBase.java | ||
|---|---|---|
| 1273 | 1273 | } | 
| 1274 | 1274 | } | 
| 1275 | 1275 |  | 
| 1276 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 1277 | /** | |
| 1278 | * Set the centers of a all components to the same value in one go. | |
| 1279 | */ | |
| 1280 | public void setAllComponentCenters(float centerX, float centerY, float centerZ) | |
| 1281 |      {
 | |
| 1282 | if( mJobNode[0]==null ) | |
| 1283 |        {
 | |
| 1284 | setComponentCenterNow(-1, centerX, centerY, centerZ); | |
| 1285 | } | |
| 1286 | else | |
| 1287 |        {
 | |
| 1288 | mJobNode[0] = DeferredJobs.componentCenter(this,-1,centerX, centerY, centerZ); | |
| 1289 | } | |
| 1290 | } | |
| 1291 |  | |
| 1276 | 1292 | /////////////////////////////////////////////////////////////////////////////////////////////////// | 
| 1277 | 1293 | /** | 
| 1278 | 1294 | * Adds an empty (no vertices) texture component to the end of the text component list. | 
| src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.java | ||
|---|---|---|
| 60 | 60 |  | 
| 61 | 61 | public void setEffectCenterNow(int comp, float x, float y, float z) | 
| 62 | 62 |     {
 | 
| 63 | mArray[4*comp ] = x; | |
| 64 | mArray[4*comp+1] = y; | |
| 65 | mArray[4*comp+2] = z; | |
| 63 | if( comp>=0 ) | |
| 64 |       {
 | |
| 65 | mArray[4*comp ] = x; | |
| 66 | mArray[4*comp+1] = y; | |
| 67 | mArray[4*comp+2] = z; | |
| 68 | } | |
| 69 | else | |
| 70 |       {
 | |
| 71 | for(int i=0; i<mMax; i++) | |
| 72 |         {
 | |
| 73 | mArray[4*i ] = x; | |
| 74 | mArray[4*i+1] = y; | |
| 75 | mArray[4*i+2] = z; | |
| 76 | } | |
| 77 | } | |
| 66 | 78 |  | 
| 67 | 79 | mUBO.invalidate(); | 
| 68 | 80 | } | 
Also available in: Unified diff
New API: set components centers of all components all in one go.