Revision aac5c562
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
53 | 53 |
private DistortedEffects mObjectEffects, mBackgroundEffects, mCenterEffects, mRegionEffects; |
54 | 54 |
private DistortedScreen mScreen; |
55 | 55 |
private DistortedNode mCenterNode, mRegionNode; |
56 |
private MeshFlat mQuad; |
|
57 |
private MeshObject mObjectMesh; |
|
58 | 56 |
private int mObjWidth, mObjHeight, mObjDepth; |
59 | 57 |
private DynamicQuat mQuatInt1, mQuatInt2; |
60 | 58 |
|
... | ... | |
67 | 65 |
|
68 | 66 |
Static4D mQuat1, mQuat2; |
69 | 67 |
int mScreenMin; |
70 |
boolean mShowing=false; |
|
68 |
private boolean mShowing=false;
|
|
71 | 69 |
|
72 | 70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 | 71 |
|
... | ... | |
78 | 76 |
Effects3DActivity act = (Effects3DActivity)v.getContext(); |
79 | 77 |
|
80 | 78 |
mObjectTexture = act.getTexture(); |
81 |
mObjectMesh = act.getMesh(); |
|
82 | 79 |
mObjectEffects = act.getEffects(); |
83 | 80 |
mBackgroundTexture = new DistortedTexture(100,100); |
84 | 81 |
mCenterTexture = new DistortedTexture(100,100); |
85 | 82 |
mRegionTexture = new DistortedTexture(100,100); |
86 |
mQuad = new MeshFlat(1,1); |
|
87 | 83 |
mBackgroundEffects = new DistortedEffects(); |
88 | 84 |
mCenterEffects = new DistortedEffects(); |
89 | 85 |
mRegionEffects = new DistortedEffects(); |
90 | 86 |
|
87 |
MeshObject meshO = act.getMesh(); |
|
88 |
MeshFlat quad = new MeshFlat(1,1); |
|
89 |
|
|
90 |
|
|
91 | 91 |
mObjWidth = mObjectTexture.getWidth(); |
92 | 92 |
mObjHeight= mObjectTexture.getHeight(); |
93 |
mObjDepth = mObjectTexture.getDepth(mObjectMesh);
|
|
93 |
mObjDepth = mObjectTexture.getDepth(meshO);
|
|
94 | 94 |
|
95 | 95 |
mQuat1 = new Static4D(0,0,0,1); // unity |
96 | 96 |
mQuat2 = new Static4D(0,0,0,1); // quaternions |
... | ... | |
113 | 113 |
mRegionScalePoint = new Static3D(0,0,0); |
114 | 114 |
mRegionScaleInter.add(mRegionScalePoint); |
115 | 115 |
|
116 |
mCenterNode = new DistortedNode(mCenterTexture, mCenterEffects, mQuad);
|
|
117 |
mRegionNode = new DistortedNode(mRegionTexture, mRegionEffects, mQuad);
|
|
116 |
mCenterNode = new DistortedNode(mCenterTexture, mCenterEffects, quad);
|
|
117 |
mRegionNode = new DistortedNode(mRegionTexture, mRegionEffects, quad);
|
|
118 | 118 |
|
119 | 119 |
mScreen = new DistortedScreen(); |
120 |
mScreen.attach(mBackgroundTexture, mBackgroundEffects, mQuad );
|
|
121 |
mScreen.attach(mObjectTexture , mObjectEffects , mObjectMesh);
|
|
120 |
mScreen.attach(mBackgroundTexture, mBackgroundEffects, quad );
|
|
121 |
mScreen.attach(mObjectTexture , mObjectEffects , meshO);
|
|
122 | 122 |
} |
123 | 123 |
|
124 | 124 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Minor.