Revision 38b31baa
Added by Leszek Koltunski about 5 years ago
| src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java | ||
|---|---|---|
| 28 | 28 |
import org.distorted.library.effect.MatrixEffectMove; |
| 29 | 29 |
import org.distorted.library.effect.MatrixEffectQuaternion; |
| 30 | 30 |
import org.distorted.library.effect.MatrixEffectScale; |
| 31 |
import org.distorted.library.effect.VertexEffectMove; |
|
| 31 | 32 |
import org.distorted.library.effect.VertexEffectRotate; |
| 32 | 33 |
import org.distorted.library.main.DistortedEffects; |
| 33 | 34 |
import org.distorted.library.main.DistortedLibrary; |
| ... | ... | |
| 160 | 161 |
final int MESHES=4; |
| 161 | 162 |
|
| 162 | 163 |
MeshBase[] meshes = new MeshTriangles[MESHES]; |
| 163 |
MatrixEffectMove[] moveEffect = new MatrixEffectMove[MESHES];
|
|
| 164 |
VertexEffectMove[] moveEffect = new VertexEffectMove[MESHES];
|
|
| 164 | 165 |
|
| 165 | 166 |
meshes[0] = new MeshTriangles(1); |
| 166 | 167 |
meshes[0].setEffectAssociation(0,1,0); |
| ... | ... | |
| 184 | 185 |
|
| 185 | 186 |
for(int i=0; i<MESHES; i++) |
| 186 | 187 |
{
|
| 187 |
moveEffect[i] = new MatrixEffectMove( new Static3D(0,0,0.5f-i/(MESHES-1.0f)) ); |
|
| 188 |
tmp[0].apply(moveEffect[i],0,i); |
|
| 188 |
moveEffect[i] = new VertexEffectMove( new Static3D(0,0,0.5f-i/(MESHES-1.0f)) ); |
|
| 189 |
moveEffect[i].setMeshAssociation(0,i); |
|
| 190 |
tmp[0].apply(moveEffect[i]); |
|
| 189 | 191 |
} |
| 190 | 192 |
|
| 191 | 193 |
tmp[1] = tmp[0].copy(true); |
| ... | ... | |
| 207 | 209 |
combined.setTextureMap(textureMaps,0); |
| 208 | 210 |
combined.setTextureMap(textureMaps,MESHES); |
| 209 | 211 |
|
| 212 |
combined.setComponentCenter(0,-0.6f,0,0); |
|
| 213 |
combined.setComponentCenter(1,+0.6f,0,0); |
|
| 210 | 214 |
|
| 211 | 215 |
return combined; |
| 212 | 216 |
} |
Also available in: Unified diff
Add component centers to dmesh version 2.