Oolite
Loading...
Searching...
No Matches
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.

31 {
46};
@ 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 566 of file OOOpenGLMatrixManager.m.

567{
568 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
569 [matrixManager frustumLeft:frleft right:frright bottom:frbottom top:frtop near:frnear far:frfar];
570 [matrixManager syncProjection];
571}
#define UNIVERSE
Definition Universe.h:827

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

Referenced by Universe::drawUniverse, and MyOpenGLView::updateGLSize:.

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

◆ OOGLGetModelView()

OOMatrix OOGLGetModelView ( void )

Definition at line 446 of file OOOpenGLMatrixManager.m.

447{
448 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
449 OOMatrix matrix = [matrixManager getModelView];
450 return matrix;
451}

References OOOpenGLMatrixManager::getModelView.

Referenced by Universe::drawUniverse.

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

◆ OOGLGetModelViewProjection()

OOMatrix OOGLGetModelViewProjection ( void )

Definition at line 587 of file OOOpenGLMatrixManager.m.

588{
589 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
590 return [matrixManager getMatrix:OOLITE_GL_MATRIX_MODELVIEW_PROJECTION];
591}

References OOOpenGLMatrixManager::getMatrix:.

Referenced by Universe::defineFrustum.

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

◆ OOGLGetProjection()

OOMatrix OOGLGetProjection ( void )

Definition at line 524 of file OOOpenGLMatrixManager.m.

525{
526 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
527 OOMatrix matrix = [matrixManager getProjection];
528 return matrix;
529}

References OOOpenGLMatrixManager::getProjection.

Here is the call graph for this function:

◆ OOGLLoadModelView()

void OOGLLoadModelView ( OOMatrix matrix)

Definition at line 460 of file OOOpenGLMatrixManager.m.

461{
462 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
463 [matrixManager loadModelView:matrix];
464 [matrixManager syncModelView];
465}

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

Referenced by OOLightParticleEntity::drawSubEntityImmediate:translucent:, and Universe::drawUniverse.

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

◆ OOGLLoadProjection()

void OOGLLoadProjection ( OOMatrix matrix)

Definition at line 531 of file OOOpenGLMatrixManager.m.

532{
533 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
534 [matrixManager loadProjection:matrix];
535 [matrixManager syncProjection];
536}

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 495 of file OOOpenGLMatrixManager.m.

496{
497 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
498 [matrixManager lookAtWithEye:eye center:center up:up];
499 [matrixManager syncModelView];
500}

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

Referenced by Universe::drawUniverse, and 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 467 of file OOOpenGLMatrixManager.m.

468{
469 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
470 [matrixManager multModelView:matrix];
471 [matrixManager syncModelView];
472}

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

Referenced by OOLightParticleEntity::drawImmediate:translucent:, OOParticleSystem::drawImmediate:translucent:, OOVisualEffectEntity(Private)::drawSubEntityImmediate:translucent:, ShipEntity::drawSubEntityImmediate:translucent:, OOTrumble::drawTrumble:, Universe::drawUniverse, and 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 538 of file OOOpenGLMatrixManager.m.

539{
540 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
541 [matrixManager multProjection:matrix];
542 [matrixManager syncProjection];
543}

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 573 of file OOOpenGLMatrixManager.m.

574{
575 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
576 [matrixManager orthoLeft:orleft right:orright bottom:orbottom top:ortop near:ornear far:orfar];
577 [matrixManager syncProjection];
578}

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 580 of file OOOpenGLMatrixManager.m.

581{
582 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
583 [matrixManager perspectiveFovy:fovy aspect:aspect zNear:zNear zFar:zFar];
584 [matrixManager syncProjection];
585}

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

Here is the call graph for this function:

◆ OOGLPopModelView()

◆ OOGLPopProjection()

OOMatrix OOGLPopProjection ( void )

Definition at line 516 of file OOOpenGLMatrixManager.m.

517{
518 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
519 OOMatrix matrix = [matrixManager popProjection];
520 [matrixManager syncProjection];
521 return matrix;
522}

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

Here is the call graph for this function:

◆ OOGLPushModelView()

◆ OOGLPushProjection()

void OOGLPushProjection ( void )

Definition at line 509 of file OOOpenGLMatrixManager.m.

510{
511 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
512 [matrixManager pushProjection];
513 [matrixManager syncProjection];
514}

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

Here is the call graph for this function:

◆ OOGLResetModelView()

void OOGLResetModelView ( void )

Definition at line 453 of file OOOpenGLMatrixManager.m.

454{
455 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
456 [matrixManager resetModelView];
457 [matrixManager syncModelView];
458}

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

Referenced by Universe::drawUniverse.

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

◆ OOGLResetProjection()

void OOGLResetProjection ( void )

Definition at line 502 of file OOOpenGLMatrixManager.m.

503{
504 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
505 [matrixManager resetProjection];
506 [matrixManager syncProjection];
507}

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

Referenced by Universe::drawUniverse, and MyOpenGLView::updateGLSize:.

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

◆ OOGLRotateModelView()

void OOGLRotateModelView ( GLfloat angle,
Vector axis )

Definition at line 481 of file OOOpenGLMatrixManager.m.

482{
483 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
484 [matrixManager rotateModelView:angle axis:axis];
485 [matrixManager syncModelView];
486}

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 552 of file OOOpenGLMatrixManager.m.

553{
554 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
555 [matrixManager rotateProjection:angle axis:axis];
556 [matrixManager syncProjection];
557}

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

Here is the call graph for this function:

◆ OOGLScaleModelView()

void OOGLScaleModelView ( Vector scale)

Definition at line 488 of file OOOpenGLMatrixManager.m.

489{
490 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
491 [matrixManager scaleModelView:scale];
492 [matrixManager syncModelView];
493}

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

Referenced by HeadUpDisplay(Private)::drawAegis:, HeadUpDisplay::drawIconForEmptyPylonAtX:y:width:height:alpha:, HeadUpDisplay::drawIconForMissile:selected:status:x:y:width:height:alpha:, OOLaserShotEntity::drawImmediate:translucent:, OOVisualEffectEntity::drawImmediate:translucent:, HeadUpDisplay::hudRotateViewpointForVirtualDepth, and OOPolygonSprite(OOHUDBeaconIcon)::oo_drawHUDBeaconIconAt:size:alpha:z:.

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

◆ OOGLScaleProjection()

void OOGLScaleProjection ( Vector scale)

Definition at line 559 of file OOOpenGLMatrixManager.m.

560{
561 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
562 [matrixManager scaleProjection:scale];
563 [matrixManager syncProjection];
564}

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

Here is the call graph for this function:

◆ OOGLTranslateModelView()

void OOGLTranslateModelView ( Vector vector)

Definition at line 474 of file OOOpenGLMatrixManager.m.

475{
476 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
477 [matrixManager translateModelView:vector];
478 [matrixManager syncModelView];
479}

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

Referenced by HeadUpDisplay(Private)::drawAegis:, HeadUpDisplay::drawIconForEmptyPylonAtX:y:width:height:alpha:, HeadUpDisplay::drawIconForMissile:selected:status:x:y:width:height:alpha:, OOParticleSystem::drawImmediate:translucent:, OOLightParticleEntity::drawSubEntityImmediate:translucent:, OOVisualEffectEntity(Private)::drawSubEntityImmediate:translucent:, ShipEntity::drawSubEntityImmediate:translucent:, OOTrumble::drawTrumble:, PlanetEntity::drawUnconditionally, Universe::drawUniverse, HeadUpDisplay::hudRotateViewpointForVirtualDepth, OOPolygonSprite(OOHUDBeaconIcon)::oo_drawHUDBeaconIconAt:size:alpha:z:, and OOCrosshairs::render.

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

◆ OOGLTranslateProjection()

void OOGLTranslateProjection ( Vector vector)

Definition at line 545 of file OOOpenGLMatrixManager.m.

546{
547 OOOpenGLMatrixManager* matrixManager = [[UNIVERSE gameView] getOpenGLMatrixManager];
548 [matrixManager translateProjection:vector];
549 [matrixManager syncProjection];
550}

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.

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

Referenced by OOOpenGLMatrixManager::standardMatrixUniformLocations:.