Revision 7bf107f7
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/fov/FOVRenderer.java | ||
---|---|---|
115 | 115 |
|
116 | 116 |
int min = w<h ? w:h; |
117 | 117 |
|
118 |
Static3D dp3D = new Static3D(0,0,min/5); |
|
119 |
Static4D dr = new Static4D(0,0,min/5,min/5); |
|
120 |
|
|
121 |
Static2D point1 = new Static2D( w/4, h/4); |
|
122 |
Static2D point2 = new Static2D(3*w/4, h/4); |
|
123 |
Static2D point3 = new Static2D( w/4, 3*h/4); |
|
124 |
Static2D point4 = new Static2D(3*w/4, 3*h/4); |
|
125 |
|
|
126 |
fov.distort(dp3D, dr, point1, 0, 0.5f); |
|
127 |
fov.distort(dp3D, dr, point2, 0, 0.5f); |
|
128 |
fov.distort(dp3D, dr, point3, 0, 0.5f); |
|
129 |
fov.distort(dp3D, dr, point4, 0, 0.5f); |
|
118 |
Static3D vector = new Static3D(0,0,min/5); |
|
119 |
Static4D region = new Static4D(0,0,min/5,min/5); |
|
120 |
|
|
121 |
fov.distort(vector, new Static2D( w/4, h/4), region); |
|
122 |
fov.distort(vector, new Static2D(3*w/4, h/4), region); |
|
123 |
fov.distort(vector, new Static2D( w/4, 3*h/4), region); |
|
124 |
fov.distort(vector, new Static2D(3*w/4, 3*h/4), region); |
|
130 | 125 |
} |
131 | 126 |
|
132 | 127 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Some more progress with porting apps to new VERTEX API.