68 glEnable( GL_TEXTURE_2D );
83 glGetFloatv( GL_MODELVIEW_MATRIX, &m[0][0] );
87 float vectResult[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
93 for(
int j =0; j<4; j++ ) {
95 for(
int i = 0; i<4; i++) {
96 val+= m[i][j] * vectStart[i];
100 Vector3 a =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
102 vectStart[0] = bnt.
x;
103 vectStart[1] = bnt.
y;
104 vectStart[2] = bnt.
z;
106 for(
int j =0; j<4; j++ ) {
108 for(
int i = 0; i<4; i++) {
109 val+= m[i][j] * vectStart[i];
113 Vector3 b =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
115 vectStart[0] = cnt.
x;
116 vectStart[1] = cnt.
y;
117 vectStart[2] = cnt.
z;
119 for(
int j =0; j<4; j++ ) {
121 for(
int i = 0; i<4; i++) {
122 val+= m[i][j] * vectStart[i];
126 Vector3 c =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
144 glGetFloatv( GL_MODELVIEW_MATRIX, &m[0][0] );
148 float vectResult[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
150 vectStart[0] = cnt.
x;
151 vectStart[1] = cnt.
y;
152 vectStart[2] = cnt.
z;
154 for(
int j =0; j<4; j++ ) {
156 for(
int i = 0; i<4; i++) {
157 val+= m[i][j] * vectStart[i];
161 Vector3 c =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
184 glGetFloatv( GL_MODELVIEW_MATRIX, &m[0][0] );
188 float vectResult[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
190 vectStart[0] = ant.
x;
191 vectStart[1] = ant.
y;
192 vectStart[2] = ant.
z;
194 for(
int j =0; j<4; j++ ) {
196 for(
int i = 0; i<4; i++) {
197 val+= m[i][j] * vectStart[i];
201 Vector3 a =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
203 vectStart[0] = bnt.
x;
204 vectStart[1] = bnt.
y;
205 vectStart[2] = bnt.
z;
207 for(
int j =0; j<4; j++ ) {
209 for(
int i = 0; i<4; i++) {
210 val+= m[i][j] * vectStart[i];
214 Vector3 b =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
216 vectStart[0] = cnt.
x;
217 vectStart[1] = cnt.
y;
218 vectStart[2] = cnt.
z;
220 for(
int j =0; j<4; j++ ) {
222 for(
int i = 0; i<4; i++) {
223 val+= m[i][j] * vectStart[i];
227 Vector3 c =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
229 vectStart[0] = dnt.
x;
230 vectStart[1] = dnt.
y;
231 vectStart[2] = dnt.
z;
233 for(
int j =0; j<4; j++ ) {
235 for(
int i = 0; i<4; i++) {
236 val+= m[i][j] * vectStart[i];
240 Vector3 d =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
245 vectStart[0] = ant2.
x;
246 vectStart[1] = ant2.
y;
247 vectStart[2] = ant2.
z;
249 for(
int j =0; j<4; j++ ) {
251 for(
int i = 0; i<4; i++) {
252 val+= m[i][j] * vectStart[i];
256 Vector3 a2 =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
258 vectStart[0] = bnt2.
x;
259 vectStart[1] = bnt2.
y;
260 vectStart[2] = bnt2.
z;
262 for(
int j =0; j<4; j++ ) {
264 for(
int i = 0; i<4; i++) {
265 val+= m[i][j] * vectStart[i];
269 Vector3 b2 =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
271 vectStart[0] = cnt2.
x;
272 vectStart[1] = cnt2.
y;
273 vectStart[2] = cnt2.
z;
275 for(
int j =0; j<4; j++ ) {
277 for(
int i = 0; i<4; i++) {
278 val+= m[i][j] * vectStart[i];
282 Vector3 c2 =
Vector3( vectResult[0], vectResult[1], vectResult[2] );
297 distance = plinks.
distance( position );
303 distance = plinks.
distance( position );
309 distance = plinks.
distance( position );
315 distance = plinks.
distance( position );
322 distance = pfront.
distance( position);
328 distance = pfront.
distance( position);