Revision ece89b28
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/library/mesh/MeshCubes.java | ||
---|---|---|
101 | 101 |
if( mTexMappingW==null ) mTexMappingW = new float[6]; |
102 | 102 |
if( mTexMappingH==null ) mTexMappingH = new float[6]; |
103 | 103 |
|
104 |
mTexMappingX[FRONT] = front.get1();
|
|
105 |
mTexMappingY[FRONT] = front.get2();
|
|
106 |
mTexMappingW[FRONT] = front.get3() - front.get1();
|
|
107 |
mTexMappingH[FRONT] = front.get4() - front.get2();
|
|
108 |
|
|
109 |
mTexMappingX[BACK] = back.get1();
|
|
110 |
mTexMappingY[BACK] = back.get2();
|
|
111 |
mTexMappingW[BACK] = back.get3() - back.get1();
|
|
112 |
mTexMappingH[BACK] = back.get4() - back.get2();
|
|
113 |
|
|
114 |
mTexMappingX[LEFT] = left.get1();
|
|
115 |
mTexMappingY[LEFT] = left.get2();
|
|
116 |
mTexMappingW[LEFT] = left.get3() - left.get1();
|
|
117 |
mTexMappingH[LEFT] = left.get4() - left.get2();
|
|
118 |
|
|
119 |
mTexMappingX[RIGHT] = right.get1();
|
|
120 |
mTexMappingY[RIGHT] = right.get2();
|
|
121 |
mTexMappingW[RIGHT] = right.get3() - right.get1();
|
|
122 |
mTexMappingH[RIGHT] = right.get4() - right.get2();
|
|
123 |
|
|
124 |
mTexMappingX[TOP] = top.get1();
|
|
125 |
mTexMappingY[TOP] = top.get2();
|
|
126 |
mTexMappingW[TOP] = top.get3() - top.get1();
|
|
127 |
mTexMappingH[TOP] = top.get4() - top.get2();
|
|
128 |
|
|
129 |
mTexMappingX[BOTTOM] = bottom.get1();
|
|
130 |
mTexMappingY[BOTTOM] = bottom.get2();
|
|
131 |
mTexMappingW[BOTTOM] = bottom.get3() - bottom.get1();
|
|
132 |
mTexMappingH[BOTTOM] = bottom.get4() - bottom.get2();
|
|
104 |
mTexMappingX[FRONT] = front.get0();
|
|
105 |
mTexMappingY[FRONT] = front.get1();
|
|
106 |
mTexMappingW[FRONT] = front.get2() - front.get0();
|
|
107 |
mTexMappingH[FRONT] = front.get3() - front.get1();
|
|
108 |
|
|
109 |
mTexMappingX[BACK] = back.get0();
|
|
110 |
mTexMappingY[BACK] = back.get1();
|
|
111 |
mTexMappingW[BACK] = back.get2() - back.get0();
|
|
112 |
mTexMappingH[BACK] = back.get3() - back.get1();
|
|
113 |
|
|
114 |
mTexMappingX[LEFT] = left.get0();
|
|
115 |
mTexMappingY[LEFT] = left.get1();
|
|
116 |
mTexMappingW[LEFT] = left.get2() - left.get0();
|
|
117 |
mTexMappingH[LEFT] = left.get3() - left.get1();
|
|
118 |
|
|
119 |
mTexMappingX[RIGHT] = right.get0();
|
|
120 |
mTexMappingY[RIGHT] = right.get1();
|
|
121 |
mTexMappingW[RIGHT] = right.get2() - right.get0();
|
|
122 |
mTexMappingH[RIGHT] = right.get3() - right.get1();
|
|
123 |
|
|
124 |
mTexMappingX[TOP] = top.get0();
|
|
125 |
mTexMappingY[TOP] = top.get1();
|
|
126 |
mTexMappingW[TOP] = top.get2() - top.get0();
|
|
127 |
mTexMappingH[TOP] = top.get3() - top.get1();
|
|
128 |
|
|
129 |
mTexMappingX[BOTTOM] = bottom.get0();
|
|
130 |
mTexMappingY[BOTTOM] = bottom.get1();
|
|
131 |
mTexMappingW[BOTTOM] = bottom.get2() - bottom.get0();
|
|
132 |
mTexMappingH[BOTTOM] = bottom.get3() - bottom.get1();
|
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Adjustment to Static's API.