Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
OOOpenGLMatrixManager.h File Reference
import "OOMaths.h"
+ Include dependency graph for OOOpenGLMatrixManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OOOpenGLMatrixStack
 
class  OOOpenGLMatrixManager
 

Enumerations

enum  {
  OOLITE_GL_MATRIX_MODELVIEW , OOLITE_GL_MATRIX_PROJECTION , OOLITE_GL_MATRIX_MODELVIEW_PROJECTION , OOLITE_GL_MATRIX_NORMAL ,
  OOLITE_GL_MATRIX_MODELVIEW_INVERSE , OOLITE_GL_MATRIX_PROJECTION_INVERSE , OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE , OOLITE_GL_MATRIX_MODELVIEW_TRANSPOSE ,
  OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE , OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE , OOLITE_GL_MATRIX_MODELVIEW_INVERSE_TRANSPOSE , OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE ,
  OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE , OOLITE_GL_MATRIX_END
}
 

Functions

void OOGLPushModelView (void)
 
OOMatrix OOGLPopModelView (void)
 
OOMatrix OOGLGetModelView (void)
 
void OOGLResetModelView (void)
 
void OOGLLoadModelView (OOMatrix matrix)
 
void OOGLMultModelView (OOMatrix matrix)
 
void OOGLTranslateModelView (Vector vector)
 
void OOGLRotateModelView (GLfloat angle, Vector axis)
 
void OOGLScaleModelView (Vector scale)
 
void OOGLLookAt (Vector eye, Vector center, Vector up)
 
void OOGLResetProjection (void)
 
void OOGLPushProjection (void)
 
OOMatrix OOGLPopProjection (void)
 
OOMatrix OOGLGetProjection (void)
 
void OOGLLoadProjection (OOMatrix matrix)
 
void OOGLMultProjection (OOMatrix matrix)
 
void OOGLTranslateProjection (Vector vector)
 
void OOGLRotateProjection (GLfloat angle, Vector axis)
 
void OOGLScaleProjection (Vector scale)
 
void OOGLFrustum (double left, double right, double bottom, double top, double near, double far)
 
void OOGLOrtho (double left, double right, double bottom, double top, double near, double far)
 
void OOGLPerspective (double fovy, double aspect, double zNear, double zFar)
 
OOMatrix OOGLGetModelViewProjection (void)
 

Variables

const char * ooliteStandardMatrixUniforms []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OOLITE_GL_MATRIX_MODELVIEW 
OOLITE_GL_MATRIX_PROJECTION 
OOLITE_GL_MATRIX_MODELVIEW_PROJECTION 
OOLITE_GL_MATRIX_NORMAL 
OOLITE_GL_MATRIX_MODELVIEW_INVERSE 
OOLITE_GL_MATRIX_PROJECTION_INVERSE 
OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE 
OOLITE_GL_MATRIX_MODELVIEW_TRANSPOSE 
OOLITE_GL_MATRIX_PROJECTION_TRANSPOSE 
OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_TRANSPOSE 
OOLITE_GL_MATRIX_MODELVIEW_INVERSE_TRANSPOSE 
OOLITE_GL_MATRIX_PROJECTION_INVERSE_TRANSPOSE 
OOLITE_GL_MATRIX_MODELVIEW_PROJECTION_INVERSE_TRANSPOSE 
OOLITE_GL_MATRIX_END 

Definition at line 31 of file OOOpenGLMatrixManager.h.

32{
47};
@ 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

Function Documentation

◆ OOGLFrustum()

void OOGLFrustum ( double left,
double right,
double bottom,
double top,
double near,
double far )

Definition at line 584 of file OOOpenGLMatrixManager.m.

585{
586 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
587 [matrixManager frustumLeft: frleft right: frright bottom: frbottom top: frtop near: frnear far: frfar];
588 [matrixManager syncProjection];
589}
#define UNIVERSE
Definition Universe.h:833

References OOOpenGLMatrixManager::frustumLeft:right:bottom:top:near:far:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLGetModelView()

OOMatrix OOGLGetModelView ( void )

Definition at line 464 of file OOOpenGLMatrixManager.m.

465{
466 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
467 OOMatrix matrix = [matrixManager getModelView];
468 return matrix;
469}

References OOOpenGLMatrixManager::getModelView.

+ Here is the call graph for this function:

◆ OOGLGetModelViewProjection()

OOMatrix OOGLGetModelViewProjection ( void )

Definition at line 605 of file OOOpenGLMatrixManager.m.

606{
607 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
608 return [matrixManager getMatrix: OOLITE_GL_MATRIX_MODELVIEW_PROJECTION];
609}

◆ OOGLGetProjection()

OOMatrix OOGLGetProjection ( void )

Definition at line 542 of file OOOpenGLMatrixManager.m.

543{
544 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
545 OOMatrix matrix = [matrixManager getProjection];
546 return matrix;
547}

References OOOpenGLMatrixManager::getProjection.

+ Here is the call graph for this function:

◆ OOGLLoadModelView()

void OOGLLoadModelView ( OOMatrix matrix)

Definition at line 478 of file OOOpenGLMatrixManager.m.

479{
480 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
481 [matrixManager loadModelView: matrix];
482 [matrixManager syncModelView];
483}

References OOOpenGLMatrixManager::loadModelView:, and OOOpenGLMatrixManager::syncModelView.

+ Here is the call graph for this function:

◆ OOGLLoadProjection()

void OOGLLoadProjection ( OOMatrix matrix)

Definition at line 549 of file OOOpenGLMatrixManager.m.

550{
551 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
552 [matrixManager loadProjection: matrix];
553 [matrixManager syncProjection];
554}

References OOOpenGLMatrixManager::loadProjection:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLLookAt()

void OOGLLookAt ( Vector eye,
Vector center,
Vector up )

Definition at line 513 of file OOOpenGLMatrixManager.m.

514{
515 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
516 [matrixManager lookAtWithEye: eye center: center up: up];
517 [matrixManager syncModelView];
518}

References OOOpenGLMatrixManager::lookAtWithEye:center:up:, and OOOpenGLMatrixManager::syncModelView.

Referenced by HeadUpDisplay::hudRotateViewpointForVirtualDepth.

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

◆ OOGLMultModelView()

void OOGLMultModelView ( OOMatrix matrix)

Definition at line 485 of file OOOpenGLMatrixManager.m.

486{
487 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
488 [matrixManager multModelView: matrix];
489 [matrixManager syncModelView];
490}

References OOOpenGLMatrixManager::multModelView:, and OOOpenGLMatrixManager::syncModelView.

Referenced by HeadUpDisplay::hudRotateViewpointForVirtualDepth.

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

◆ OOGLMultProjection()

void OOGLMultProjection ( OOMatrix matrix)

Definition at line 556 of file OOOpenGLMatrixManager.m.

557{
558 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
559 [matrixManager multProjection: matrix];
560 [matrixManager syncProjection];
561}

References OOOpenGLMatrixManager::multProjection:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLOrtho()

void OOGLOrtho ( double left,
double right,
double bottom,
double top,
double near,
double far )

Definition at line 591 of file OOOpenGLMatrixManager.m.

592{
593 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
594 [matrixManager orthoLeft: orleft right: orright bottom: orbottom top: ortop near: ornear far: orfar];
595 [matrixManager syncProjection];
596}

References OOOpenGLMatrixManager::orthoLeft:right:bottom:top:near:far:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLPerspective()

void OOGLPerspective ( double fovy,
double aspect,
double zNear,
double zFar )

Definition at line 598 of file OOOpenGLMatrixManager.m.

599{
600 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
601 [matrixManager perspectiveFovy: fovy aspect: aspect zNear: zNear zFar: zFar];
602 [matrixManager syncProjection];
603}

References OOOpenGLMatrixManager::perspectiveFovy:aspect:zNear:zFar:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLPopModelView()

OOMatrix OOGLPopModelView ( void )

Definition at line 456 of file OOOpenGLMatrixManager.m.

457{
458 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
459 OOMatrix matrix = [matrixManager popModelView];
460 [matrixManager syncModelView];
461 return matrix;
462}

References OOOpenGLMatrixManager::popModelView, and OOOpenGLMatrixManager::syncModelView.

Referenced by HeadUpDisplay::hudDrawReticleOnTarget, and HeadUpDisplay::hudDrawWaypoint.

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

◆ OOGLPopProjection()

OOMatrix OOGLPopProjection ( void )

Definition at line 534 of file OOOpenGLMatrixManager.m.

535{
536 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
537 OOMatrix matrix = [matrixManager popProjection];
538 [matrixManager syncProjection];
539 return matrix;
540}

References OOOpenGLMatrixManager::popProjection, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLPushModelView()

void OOGLPushModelView ( void )

Definition at line 449 of file OOOpenGLMatrixManager.m.

450{
451 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
452 [matrixManager pushModelView];
453 [matrixManager syncModelView];
454}

References OOOpenGLMatrixManager::pushModelView, and OOOpenGLMatrixManager::syncModelView.

Referenced by HeadUpDisplay::hudDrawReticleOnTarget, and HeadUpDisplay::hudDrawWaypoint.

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

◆ OOGLPushProjection()

void OOGLPushProjection ( void )

Definition at line 527 of file OOOpenGLMatrixManager.m.

528{
529 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
530 [matrixManager pushProjection];
531 [matrixManager syncProjection];
532}

References OOOpenGLMatrixManager::pushProjection, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLResetModelView()

void OOGLResetModelView ( void )

Definition at line 471 of file OOOpenGLMatrixManager.m.

472{
473 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
474 [matrixManager resetModelView];
475 [matrixManager syncModelView];
476}

References OOOpenGLMatrixManager::resetModelView, and OOOpenGLMatrixManager::syncModelView.

+ Here is the call graph for this function:

◆ OOGLResetProjection()

void OOGLResetProjection ( void )

Definition at line 520 of file OOOpenGLMatrixManager.m.

521{
522 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
523 [matrixManager resetProjection];
524 [matrixManager syncProjection];
525}

References OOOpenGLMatrixManager::resetProjection, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLRotateModelView()

void OOGLRotateModelView ( GLfloat angle,
Vector axis )

Definition at line 499 of file OOOpenGLMatrixManager.m.

500{
501 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
502 [matrixManager rotateModelView: angle axis: axis];
503 [matrixManager syncModelView];
504}

References OOOpenGLMatrixManager::rotateModelView:axis:, and OOOpenGLMatrixManager::syncModelView.

+ Here is the call graph for this function:

◆ OOGLRotateProjection()

void OOGLRotateProjection ( GLfloat angle,
Vector axis )

Definition at line 570 of file OOOpenGLMatrixManager.m.

571{
572 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
573 [matrixManager rotateProjection: angle axis: axis];
574 [matrixManager syncProjection];
575}

References OOOpenGLMatrixManager::rotateProjection:axis:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLScaleModelView()

void OOGLScaleModelView ( Vector scale)

Definition at line 506 of file OOOpenGLMatrixManager.m.

507{
508 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
509 [matrixManager scaleModelView: scale];
510 [matrixManager syncModelView];
511}

References OOOpenGLMatrixManager::scaleModelView:, and OOOpenGLMatrixManager::syncModelView.

Referenced by HeadUpDisplay::hudRotateViewpointForVirtualDepth.

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

◆ OOGLScaleProjection()

void OOGLScaleProjection ( Vector scale)

Definition at line 577 of file OOOpenGLMatrixManager.m.

578{
579 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
580 [matrixManager scaleProjection: scale];
581 [matrixManager syncProjection];
582}

References OOOpenGLMatrixManager::scaleProjection:, and OOOpenGLMatrixManager::syncProjection.

+ Here is the call graph for this function:

◆ OOGLTranslateModelView()

void OOGLTranslateModelView ( Vector vector)

Definition at line 492 of file OOOpenGLMatrixManager.m.

493{
494 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
495 [matrixManager translateModelView: vector];
496 [matrixManager syncModelView];
497}

References OOOpenGLMatrixManager::syncModelView, and OOOpenGLMatrixManager::translateModelView:.

Referenced by HeadUpDisplay::hudRotateViewpointForVirtualDepth.

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

◆ OOGLTranslateProjection()

void OOGLTranslateProjection ( Vector vector)

Definition at line 563 of file OOOpenGLMatrixManager.m.

564{
565 OOOpenGLMatrixManager *matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
566 [matrixManager translateProjection: vector];
567 [matrixManager syncProjection];
568}

References OOOpenGLMatrixManager::syncProjection, and OOOpenGLMatrixManager::translateProjection:.

+ Here is the call graph for this function:

Variable Documentation

◆ ooliteStandardMatrixUniforms

const char* ooliteStandardMatrixUniforms[]
extern

Definition at line 33 of file OOOpenGLMatrixManager.m.

34{
35 "ooliteModelView",
36 "ooliteProjection",
37 "ooliteModelViewProjection",
38 "ooliteNormalMatrix",
39 "ooliteModelViewInverse",
40 "ooliteProjectionInverse",
41 "ooliteModelViewProjectionInverse",
42 "ooliteModelViewTranspose",
43 "ooliteProjectionTranspose",
44 "ooliteModelViewProjectionTranspose",
45 "ooliteModelViewInverseTranspose",
46 "ooliteProjectionInverseTranspose",
47 "ooliteModelViewProjectionInverseTranspose"
48};