Revision 1d811f85
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/matrix3d/Matrix3DRenderer.java | ||
---|---|---|
48 | 48 |
private static final int SIZE = 100; |
49 | 49 |
|
50 | 50 |
private GLSurfaceView mView; |
51 |
private static DistortedCubes mCube; |
|
52 |
|
|
53 |
private static EffectNames[] order; |
|
51 |
private DistortedCubes mCube; |
|
52 |
private EffectNames[] order; |
|
54 | 53 |
|
55 |
private static Dynamic3D mMoveInter, mScaleInter, mShearInter; |
|
56 |
private static Dynamic4D mDynamicRotate; |
|
57 |
|
|
58 |
private static Static3D mZeroPoint, mMovePoint, mScalePoint, mShearPoint; |
|
59 |
private static Static4D mRotatePoint; |
|
54 |
private Dynamic3D mMoveInter, mScaleInter, mShearInter; |
|
55 |
private Dynamic4D mDynamicRotate; |
|
56 |
private Static3D mZeroPoint, mMovePoint, mScalePoint, mShearPoint; |
|
57 |
private Static4D mRotatePoint; |
|
60 | 58 |
|
61 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
62 | 60 |
|
63 |
public static void setMove(float x, float y, float z)
|
|
61 |
void setMove(float x, float y, float z) |
|
64 | 62 |
{ |
65 | 63 |
mMovePoint.set(x, y, z); |
66 | 64 |
} |
67 | 65 |
|
68 | 66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
69 | 67 |
|
70 |
public static void setScale(float x, float y, float z)
|
|
68 |
void setScale(float x, float y, float z) |
|
71 | 69 |
{ |
72 | 70 |
mScalePoint.set(x, y, z); |
73 | 71 |
} |
74 | 72 |
|
75 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
76 | 74 |
|
77 |
public static void setRotate(float a, float x, float y, float z)
|
|
75 |
void setRotate(float a, float x, float y, float z) |
|
78 | 76 |
{ |
79 | 77 |
mRotatePoint.set(a,x,y,z); |
80 | 78 |
} |
81 | 79 |
|
82 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
83 | 81 |
|
84 |
public static void setShear(float x, float y, float z)
|
|
82 |
void setShear(float x, float y, float z) |
|
85 | 83 |
{ |
86 | 84 |
mShearPoint.set(x, y, z); |
87 | 85 |
} |
88 | 86 |
|
89 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
90 | 88 |
|
91 |
public static void setOrder(EffectNames[] effects)
|
|
89 |
void setOrder(EffectNames[] effects) |
|
92 | 90 |
{ |
93 | 91 |
order = effects; |
94 | 92 |
setMatrixEffects(); |
... | ... | |
96 | 94 |
|
97 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 96 |
|
99 |
public static void setMatrixEffects()
|
|
97 |
private void setMatrixEffects()
|
|
100 | 98 |
{ |
101 | 99 |
mCube.abortEffects(EffectTypes.MATRIX); |
102 | 100 |
|
... | ... | |
114 | 112 |
|
115 | 113 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
116 | 114 |
|
117 |
public Matrix3DRenderer(GLSurfaceView v)
|
|
115 |
Matrix3DRenderer(GLSurfaceView v) |
|
118 | 116 |
{ |
119 | 117 |
mView = v; |
120 | 118 |
mCube = new DistortedCubes( 1, "1", SIZE); |
Also available in: Unified diff
Tidy up 'Matrix3D'