Oolite
Loading...
Searching...
No Matches
OOOpenGLMatrixManager Class Reference

#include <OOOpenGLMatrixManager.h>

Inheritance diagram for OOOpenGLMatrixManager:
Collaboration diagram for OOOpenGLMatrixManager:

Instance Methods

(id) - init
(void) - dealloc
(void) - loadModelView:
(void) - resetModelView
(void) - multModelView:
(void) - translateModelView:
(void) - rotateModelView:axis:
(void) - scaleModelView:
(void) - lookAtWithEye:center:up:
(void) - pushModelView
(OOMatrix) - popModelView
(OOMatrix) - getModelView
(NSUInteger) - countModelView
(void) - syncModelView
(void) - loadProjection:
(void) - multProjection:
(void) - translateProjection:
(void) - rotateProjection:axis:
(void) - scaleProjection:
(void) - frustumLeft:right:bottom:top:near:far:
(void) - orthoLeft:right:bottom:top:near:far:
(void) - perspectiveFovy:aspect:zNear:zFar:
(void) - resetProjection
(void) - pushProjection
(OOMatrix) - popProjection
(OOMatrix) - getProjection
(void) - syncProjection
(OOMatrix) - getMatrix:
(NSArray *) - standardMatrixUniformLocations:
(void) - updateModelView [implementation]
(void) - updateProjection [implementation]

Private Attributes

OOMatrix matrices [OOLITE_GL_MATRIX_END]
BOOL valid [OOLITE_GL_MATRIX_END]
OOOpenGLMatrixStack * modelViewStack
OOOpenGLMatrixStack * projectionStack

Detailed Description

Definition at line 61 of file OOOpenGLMatrixManager.h.

Method Documentation

◆ countModelView

- (NSUInteger) countModelView

Definition at line 226 of file OOOpenGLMatrixManager.m.

227{
228 return [modelViewStack stackCount];
229}

References countModelView, and OOOpenGLMatrixStack::stackCount.

Referenced by countModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dealloc

- (void) dealloc

Definition at line 150 of file OOOpenGLMatrixManager.m.

151{
152 [modelViewStack release];
153 [projectionStack release];
154 [super dealloc];
155}

References dealloc.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ frustumLeft:right:bottom:top:near:far:

- (void) frustumLeft: (double) l
right: (double) r
bottom: (double) b
top: (double) t
near: (double) n
far: (double) f 

Definition at line 271 of file OOOpenGLMatrixManager.m.

271 :(double)l right:(double)r bottom:(double)b top:(double)t near:(double)n far:(double)f
272{
273 if (l == r || t == b || n == f || n <= 0 || f <= 0)
274 return;
275 [self multProjection:OOMatrixConstruct(
276 2 * n / (r - l), 0.0, 0.0, 0.0,
277 0.0, 2 * n / (t - b), 0.0, 0.0,
278 (r + l) / (r - l), (t + b) / (t - b), -(f + n) / (f - n), -1.0,
279 0.0, 0.0, -2 * f * n / (f - n), 0.0)];
280}

References multProjection:.

Referenced by OOGLFrustum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMatrix:

- (OOMatrix) getMatrix: (int) which

Definition at line 336 of file OOOpenGLMatrixManager.m.

336 :(int)which
337{
338 if (which < 0 || which >= OOLITE_GL_MATRIX_END)
339 return kIdentityMatrix;
340 if (valid[which])
341 return matrices[which];
342 OOScalar d;
343 switch (which) {
346 break;
348 matrices[which] = matrices[OOLITE_GL_MATRIX_MODELVIEW];
349 matrices[which].m[3][0] = 0.0;
350 matrices[which].m[3][1] = 0.0;
351 matrices[which].m[3][2] = 0.0;
352 matrices[which].m[0][3] = 0.0;
353 matrices[which].m[1][3] = 0.0;
354 matrices[which].m[2][3] = 0.0;
355 matrices[which].m[3][3] = 1.0;
357 if (d != 0.0) {
358 d = powf(fabsf(d), 1.0 / 3);
359 for (int i = 0; i < 3; i++) {
360 for (int j = 0; j < 3; j++) {
361 matrices[which].m[i][j] /= d;
362 }
363 }
364 }
365 break;
368 break;
371 break;
374 break;
377 break;
380 break;
383 break;
386 break;
389 break;
392 break;
393 }
394 valid[which] = YES;
395 return matrices[which];
396}
GLfloat OOScalar
Definition OOMaths.h:49
const OOMatrix kIdentityMatrix
Definition OOMatrix.m:28
OOMatrix OOMatrixInverseWithDeterminant(OOMatrix M, OOScalar *determinant)
Definition OOMatrix.m:364
OOMatrix OOMatrixInverse(OOMatrix M)
Definition OOMatrix.m:359
OOINLINE OOMatrix OOMatrixTranspose(OOMatrix m) INLINE_CONST_FUNC
Definition OOMatrix.h:327
OOMatrix OOMatrixMultiply(OOMatrix a, OOMatrix b) CONST_FUNC
Definition OOMatrix.m:105
@ OOLITE_GL_MATRIX_MODELVIEW
@ OOLITE_GL_MATRIX_MODELVIEW_PROJECTION
@ OOLITE_GL_MATRIX_MODELVIEW_INVERSE
@ OOLITE_GL_MATRIX_MODELVIEW_INVERSE_TRANSPOSE
@ OOLITE_GL_MATRIX_PROJECTION
@ OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE
@ OOLITE_GL_MATRIX_PROJECTION_INVERSE
@ OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE
@ OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE
@ OOLITE_GL_MATRIX_NORMAL
@ OOLITE_GL_MATRIX_END
@ OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE
@ OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE
@ OOLITE_GL_MATRIX_MODELVIEW_TRANSPOSE
OOMatrix matrices[OOLITE_GL_MATRIX_END]
BOOL valid[OOLITE_GL_MATRIX_END]
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

References kIdentityMatrix, matrices, OOLITE_GL_MATRIX_END, OOLITE_GL_MATRIX_MODELVIEW, OOLITE_GL_MATRIX_MODELVIEW_INVERSE, OOLITE_GL_MATRIX_MODELVIEW_INVERSE_TRANSPOSE, OOLITE_GL_MATRIX_MODELVIEW_PROJECTION, OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE, OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE, OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE, OOLITE_GL_MATRIX_MODELVIEW_TRANSPOSE, OOLITE_GL_MATRIX_NORMAL, OOLITE_GL_MATRIX_PROJECTION, OOLITE_GL_MATRIX_PROJECTION_INVERSE, OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE, OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE, OOMatrixInverse(), OOMatrixInverseWithDeterminant(), OOMatrixMultiply(), OOMatrixTranspose(), and valid.

Referenced by OOGLGetModelViewProjection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getModelView

- (OOMatrix) getModelView

Definition at line 221 of file OOOpenGLMatrixManager.m.

222{
223 return matrices[OOLITE_GL_MATRIX_MODELVIEW];
224}

References getModelView, and matrices.

Referenced by getModelView, OOGLGetModelView(), and syncModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProjection

- (OOMatrix) getProjection

Definition at line 323 of file OOOpenGLMatrixManager.m.

324{
325 return matrices[OOLITE_GL_MATRIX_PROJECTION];
326}

References getProjection, and matrices.

Referenced by getProjection, OOGLGetProjection(), and syncProjection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init

- (id) init

Definition at line 127 of file OOOpenGLMatrixManager.m.

128{
129 if ((self = [super init])) {
130 int i;
131 for (i = 0; i < OOLITE_GL_MATRIX_END; i++) {
132 switch (i) {
136 valid[i] = YES;
137 break;
138
139 default:
140 valid[i] = NO;
141 break;
142 }
143 }
144 modelViewStack = [[OOOpenGLMatrixStack alloc] init];
145 projectionStack = [[OOOpenGLMatrixStack alloc] init];
146 }
147 return self;
148}
OOOpenGLMatrixStack * projectionStack
OOOpenGLMatrixStack * modelViewStack

References init, kIdentityMatrix, matrices, modelViewStack, OOLITE_GL_MATRIX_END, OOLITE_GL_MATRIX_MODELVIEW, OOLITE_GL_MATRIX_PROJECTION, projectionStack, and valid.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadModelView:

- (void) loadModelView: (OOMatrix) matrix

Definition at line 157 of file OOOpenGLMatrixManager.m.

157 :(OOMatrix)matrix
158{
159 matrices[OOLITE_GL_MATRIX_MODELVIEW] = matrix;
160 [self updateModelView];
161 return;
162}
struct OOMatrix OOMatrix

References matrices, and updateModelView.

Referenced by OOGLLoadModelView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadProjection:

- (void) loadProjection: (OOMatrix) matrix

Definition at line 239 of file OOOpenGLMatrixManager.m.

239 :(OOMatrix)matrix
240{
241 matrices[OOLITE_GL_MATRIX_PROJECTION] = matrix;
242 [self updateProjection];
243 return;
244}

References matrices, and updateProjection.

Referenced by OOGLLoadProjection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookAtWithEye:center:up:

- (void) lookAtWithEye: (Vector) eye
center: (Vector) center
up: (Vector) up 

Definition at line 195 of file OOOpenGLMatrixManager.m.

195 :(Vector)eye center:(Vector)center up:(Vector)up
196{
197 Vector k = vector_normal(vector_subtract(eye, center));
198 Vector i = cross_product(up, k);
199 Vector j = cross_product(k, i);
201 i.x, j.x, k.x, 0.0,
202 i.y, j.y, k.y, 0.0,
203 i.z, j.z, k.z, 0.0,
204 -eye.x, -eye.y, -eye.z, 1.0);
205 [self multModelView:m1];
206 return;
207}
OOINLINE OOMatrix OOMatrixConstruct(OOScalar aa, OOScalar ab, OOScalar ac, OOScalar ad, OOScalar ba, OOScalar bb, OOScalar bc, OOScalar bd, OOScalar ca, OOScalar cb, OOScalar cc, OOScalar cd, OOScalar da, OOScalar db, OOScalar dc, OOScalar dd) INLINE_CONST_FUNC
Definition OOMatrix.h:158
OOINLINE Vector vector_subtract(Vector a, Vector b) INLINE_CONST_FUNC
Definition OOVector.h:218
struct Vector Vector
OOINLINE Vector cross_product(Vector first, Vector second) INLINE_CONST_FUNC
Definition OOVector.h:294
OOINLINE Vector vector_normal(Vector vec) INLINE_CONST_FUNC
Definition OOVector.h:270
OOScalar x
Definition OOVector.h:32
OOScalar y
Definition OOVector.h:33
OOScalar z
Definition OOVector.h:34

References cross_product(), multModelView:, OOMatrixConstruct(), vector_normal(), vector_subtract(), Vector::x, Vector::y, and Vector::z.

Referenced by OOGLLookAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multModelView:

- (void) multModelView: (OOMatrix) matrix

Definition at line 170 of file OOOpenGLMatrixManager.m.

170 :(OOMatrix)matrix
171{
172 matrices[OOLITE_GL_MATRIX_MODELVIEW] = OOMatrixMultiply(matrix, matrices[OOLITE_GL_MATRIX_MODELVIEW]);
173 [self updateModelView];
174}

References matrices, OOLITE_GL_MATRIX_MODELVIEW, OOMatrixMultiply(), and updateModelView.

Referenced by lookAtWithEye:center:up:, OOGLMultModelView(), rotateModelView:axis:, scaleModelView:, and translateModelView:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multProjection:

- (void) multProjection: (OOMatrix) matrix

Definition at line 246 of file OOOpenGLMatrixManager.m.

246 :(OOMatrix)matrix
247{
248 matrices[OOLITE_GL_MATRIX_PROJECTION] = OOMatrixMultiply(matrix, matrices[OOLITE_GL_MATRIX_PROJECTION]);
249 [self updateProjection];
250}

References matrices, OOLITE_GL_MATRIX_PROJECTION, OOMatrixMultiply(), and updateProjection.

Referenced by frustumLeft:right:bottom:top:near:far:, OOGLMultProjection(), orthoLeft:right:bottom:top:near:far:, perspectiveFovy:aspect:zNear:zFar:, rotateProjection:axis:, scaleProjection:, and translateProjection:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orthoLeft:right:bottom:top:near:far:

- (void) orthoLeft: (double) l
right: (double) r
bottom: (double) b
top: (double) t
near: (double) n
far: (double) f 

Definition at line 282 of file OOOpenGLMatrixManager.m.

282 :(double)l right:(double)r bottom:(double)b top:(double)t near:(double)n far:(double)f
283{
284 if (l == r || t == b || n == f)
285 return;
286 [self multProjection:OOMatrixConstruct(
287 2 / (r - l), 0.0, 0.0, 0.0,
288 0.0, 2 / (t - b), 0.0, 0.0,
289 0.0, 0.0, 2 / (n - f), 0.0,
290 (l + r) / (l - r), (b + t) / (b - t), (n + f) / (n - f), 1.0)];
291}

References multProjection:.

Referenced by MyOpenGLView::initSplashScreen, and OOGLOrtho().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perspectiveFovy:aspect:zNear:zFar:

- (void) perspectiveFovy: (double) fovy
aspect: (double) aspect
zNear: (double) zNear
zFar: (double) zFar 

Definition at line 293 of file OOOpenGLMatrixManager.m.

293 :(double)fovy aspect:(double)aspect zNear:(double)zNear zFar:(double)zFar
294{
295 if (aspect == 0.0 || zNear == zFar)
296 return;
297 double f = 1.0 / tan(M_PI * fovy / 360);
298 [self multProjection:OOMatrixConstruct(
299 f / aspect, 0.0, 0.0, 0.0,
300 0.0, f, 0.0, 0.0,
301 0.0, 0.0, (zFar + zNear) / (zNear - zFar), -1.0,
302 0.0, 0.0, 2 * zFar * zNear / (zNear - zFar), 0.0)];
303}
#define M_PI
Definition OOMaths.h:54

References M_PI, and multProjection:.

Referenced by OOGLPerspective().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ popModelView

- (OOMatrix) popModelView

Definition at line 214 of file OOOpenGLMatrixManager.m.

215{
216 matrices[OOLITE_GL_MATRIX_MODELVIEW] = [modelViewStack pop];
217 [self updateModelView];
218 return matrices[OOLITE_GL_MATRIX_MODELVIEW];
219}

References matrices, OOOpenGLMatrixStack::pop, popModelView, and updateModelView.

Referenced by OOGLPopModelView(), and popModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ popProjection

- (OOMatrix) popProjection

Definition at line 316 of file OOOpenGLMatrixManager.m.

317{
318 matrices[OOLITE_GL_MATRIX_PROJECTION] = [projectionStack pop];
319 [self updateProjection];
320 return matrices[OOLITE_GL_MATRIX_PROJECTION];
321}

References matrices, OOOpenGLMatrixStack::pop, popProjection, and updateProjection.

Referenced by OOGLPopProjection(), and popProjection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pushModelView

- (void) pushModelView

Definition at line 209 of file OOOpenGLMatrixManager.m.

210{
211 [modelViewStack push:matrices[OOLITE_GL_MATRIX_MODELVIEW]];
212}

References OOOpenGLMatrixStack::push:, and pushModelView.

Referenced by OOGLPushModelView(), and pushModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pushProjection

- (void) pushProjection

Definition at line 311 of file OOOpenGLMatrixManager.m.

312{
313 [projectionStack push:matrices[OOLITE_GL_MATRIX_PROJECTION]];
314}

References OOOpenGLMatrixStack::push:, and pushProjection.

Referenced by OOGLPushProjection(), and pushProjection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetModelView

- (void) resetModelView

Definition at line 164 of file OOOpenGLMatrixManager.m.

165{
166 matrices[OOLITE_GL_MATRIX_MODELVIEW] = kIdentityMatrix;
167 [self updateModelView];
168}

References kIdentityMatrix, matrices, resetModelView, and updateModelView.

Referenced by MyOpenGLView::initSplashScreen, OOGLResetModelView(), and resetModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetProjection

- (void) resetProjection

Definition at line 305 of file OOOpenGLMatrixManager.m.

306{
307 matrices[OOLITE_GL_MATRIX_PROJECTION] = kIdentityMatrix;
308 [self updateProjection];
309}

References kIdentityMatrix, matrices, resetProjection, and updateProjection.

Referenced by MyOpenGLView::initSplashScreen, OOGLResetProjection(), and resetProjection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotateModelView:axis:

- (void) rotateModelView: (GLfloat) angle
axis: (Vector) axis 

Definition at line 185 of file OOOpenGLMatrixManager.m.

185 :(GLfloat)angle axis:(Vector)axis
186{
187 [self multModelView:OOMatrixForRotation(axis, angle)];
188}

References multModelView:.

Referenced by OOGLRotateModelView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotateProjection:axis:

- (void) rotateProjection: (GLfloat) angle
axis: (Vector) axis 

Definition at line 261 of file OOOpenGLMatrixManager.m.

261 :(GLfloat)angle axis:(Vector)axis
262{
263 [self multProjection:OOMatrixForRotation(axis, angle)];
264}

References multProjection:.

Referenced by OOGLRotateProjection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleModelView:

- (void) scaleModelView: (Vector) scale

Definition at line 190 of file OOOpenGLMatrixManager.m.

190 :(Vector)scale
191{
192 [self multModelView:OOMatrixForScale(scale.x, scale.y, scale.z)];
193}

References multModelView:.

Referenced by OOGLScaleModelView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleProjection:

- (void) scaleProjection: (Vector) scale

Definition at line 266 of file OOOpenGLMatrixManager.m.

266 :(Vector)scale
267{
268 [self multProjection:OOMatrixForScale(scale.x, scale.y, scale.z)];
269}

References multProjection:.

Referenced by OOGLScaleProjection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ standardMatrixUniformLocations:

- (NSArray *) standardMatrixUniformLocations: (GLhandleARB) program

Definition at line 398 of file OOOpenGLMatrixManager.m.

398 :(GLhandleARB)program
399{
400 GLint location;
401 NSUInteger i;
402 NSMutableArray* locationSet = [[[NSMutableArray alloc] init] autorelease];
403
405
406 for (i = 0; i < OOLITE_GL_MATRIX_END; i++) {
407 location = glGetUniformLocationARB(program, ooliteStandardMatrixUniforms[i]);
408 if (location >= 0) {
409 if (i == OOLITE_GL_MATRIX_NORMAL) {
410 [locationSet addObject:
411 [NSArray arrayWithObjects:
412 [NSNumber numberWithInt:location],
413 [NSNumber numberWithInteger:i],
414 @"mat3",
415 nil]];
416 } else {
417 [locationSet addObject:
418 [NSArray arrayWithObjects:
419 [NSNumber numberWithInt:location],
420 [NSNumber numberWithInteger:i],
421 @"mat4",
422 nil]];
423 }
424 }
425 }
426 return [[NSArray arrayWithArray:locationSet] retain];
427}
#define OO_ENTER_OPENGL()
const char * ooliteStandardMatrixUniforms[]

References OO_ENTER_OPENGL, OOLITE_GL_MATRIX_END, OOLITE_GL_MATRIX_NORMAL, and ooliteStandardMatrixUniforms.

◆ syncModelView

- (void) syncModelView

Definition at line 231 of file OOOpenGLMatrixManager.m.

232{
234 OOGL(glMatrixMode(GL_MODELVIEW));
236 return;
237}
#define GLLoadOOMatrix(M)
Definition OOMatrix.h:98
#define OOGL(statement)
Definition OOOpenGL.h:262

References getModelView, GLLoadOOMatrix, OO_ENTER_OPENGL, OOGL, and syncModelView.

Referenced by MyOpenGLView::initSplashScreen, OOGLLoadModelView(), OOGLLookAt(), OOGLMultModelView(), OOGLPopModelView(), OOGLPushModelView(), OOGLResetModelView(), OOGLRotateModelView(), OOGLScaleModelView(), OOGLTranslateModelView(), and syncModelView.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncProjection

- (void) syncProjection

Definition at line 328 of file OOOpenGLMatrixManager.m.

329{
331 OOGL(glMatrixMode(GL_PROJECTION));
333 return;
334}

References getProjection, GLLoadOOMatrix, OO_ENTER_OPENGL, OOGL, and syncProjection.

Referenced by MyOpenGLView::initSplashScreen, OOGLFrustum(), OOGLLoadProjection(), OOGLMultProjection(), OOGLOrtho(), OOGLPerspective(), OOGLPopProjection(), OOGLPushProjection(), OOGLResetProjection(), OOGLRotateProjection(), OOGLScaleProjection(), OOGLTranslateProjection(), and syncProjection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translateModelView:

- (void) translateModelView: (Vector) vector

Definition at line 176 of file OOOpenGLMatrixManager.m.

176 :(Vector)vector
177{
178 OOMatrix matrix = kIdentityMatrix;
179 matrix.m[3][0] = vector.x;
180 matrix.m[3][1] = vector.y;
181 matrix.m[3][2] = vector.z;
182 [self multModelView:matrix];
183}
OOScalar m[4][4]
Definition OOMatrix.h:31

References kIdentityMatrix, OOMatrix::m, multModelView:, Vector::x, Vector::y, and Vector::z.

Referenced by OOGLTranslateModelView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translateProjection:

- (void) translateProjection: (Vector) vector

Definition at line 252 of file OOOpenGLMatrixManager.m.

252 :(Vector)vector
253{
254 OOMatrix matrix = kIdentityMatrix;
255 matrix.m[0][3] = vector.x;
256 matrix.m[1][3] = vector.y;
257 matrix.m[2][3] = vector.z;
258 [self multProjection:matrix];
259}

References kIdentityMatrix, OOMatrix::m, multProjection:, Vector::x, Vector::y, and Vector::z.

Referenced by OOGLTranslateProjection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateModelView

- (void) updateModelView
implementation

Provided by category OOOpenGLMatrixManager(Private).

Definition at line 97 of file OOOpenGLMatrixManager.m.

98{
99 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION] = NO;
100 valid[OOLITE_GL_MATRIX_NORMAL] = NO;
101 valid[OOLITE_GL_MATRIX_MODELVIEW_INVERSE] = NO;
102 valid[OOLITE_GL_MATRIX_PROJECTION_INVERSE] = NO;
103 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE] = NO;
104 valid[OOLITE_GL_MATRIX_MODELVIEW_TRANSPOSE] = NO;
105 valid[OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE] = NO;
106 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE] = NO;
107 valid[OOLITE_GL_MATRIX_MODELVIEW_INVERSE_TRANSPOSE] = NO;
108 valid[OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE] = NO;
109 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE] = NO;
110}

Referenced by loadModelView:, multModelView:, popModelView, and resetModelView.

Here is the caller graph for this function:

◆ updateProjection

- (void) updateProjection
implementation

Provided by category OOOpenGLMatrixManager(Private).

Definition at line 112 of file OOOpenGLMatrixManager.m.

113{
114 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION] = NO;
115 valid[OOLITE_GL_MATRIX_PROJECTION_INVERSE] = NO;
116 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE] = NO;
117 valid[OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE] = NO;
118 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE] = NO;
119 valid[OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE] = NO;
120 valid[OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE] = NO;
121}

Referenced by loadProjection:, multProjection:, popProjection, and resetProjection.

Here is the caller graph for this function:

Member Data Documentation

◆ matrices

◆ modelViewStack

- (OOOpenGLMatrixStack*) modelViewStack
private

Definition at line 65 of file OOOpenGLMatrixManager.h.

Referenced by init.

◆ projectionStack

- (OOOpenGLMatrixStack*) projectionStack
private

Definition at line 66 of file OOOpenGLMatrixManager.h.

Referenced by init.

◆ valid

- (BOOL valid[OOLITE_GL_MATRIX_END])
private

Definition at line 64 of file OOOpenGLMatrixManager.h.

Referenced by getMatrix:, and init.


The documentation for this class was generated from the following files: