Oolite 1.91.0.7665-250419-c535bfe
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
OOOpenGLMatrixStack Class Reference

#include <OOOpenGLMatrixManager.h>

+ Inheritance diagram for OOOpenGLMatrixStack:
+ Collaboration diagram for OOOpenGLMatrixStack:

Instance Methods

(id) - init
 
(void) - dealloc
 
(void) - push:
 
(OOMatrix) - pop
 
(NSUInteger) - stackCount
 

Private Attributes

NSMutableArray * stack
 

Detailed Description

Definition at line 49 of file OOOpenGLMatrixManager.h.

Method Documentation

◆ dealloc

- (void) dealloc

Definition at line 61 of file OOOpenGLMatrixManager.m.

62{
63 [stack release];
64 [super dealloc];
65}

References dealloc.

Referenced by dealloc.

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

◆ init

- (id) init

Definition at line 52 of file OOOpenGLMatrixManager.m.

53{
54 if ((self = [super init]))
55 {
56 stack = [[NSMutableArray alloc] init];
57 }
58 return self;
59}

References init, and stack.

Referenced by init.

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

◆ pop

- (OOMatrix) pop

Definition at line 72 of file OOOpenGLMatrixManager.m.

73{
74 if ([stack count] == 0)
75 {
76 return kIdentityMatrix;
77 }
78 OOMatrix matrix;
79 [[stack lastObject] getValue: &matrix];
80 [stack removeLastObject];
81 return matrix;
82}
const OOMatrix kIdentityMatrix
Definition OOMatrix.m:31
unsigned count

References count, kIdentityMatrix, pop, and stack.

Referenced by pop, OOOpenGLMatrixManager::popModelView, and OOOpenGLMatrixManager::popProjection.

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

◆ push:

- (void) push: (OOMatrix) matrix

Definition at line 67 of file OOOpenGLMatrixManager.m.

67 : (OOMatrix) matrix
68{
69 [stack addObject: [NSValue valueWithBytes: &matrix objCType: @encode(OOMatrix)]];
70}

Referenced by OOOpenGLMatrixManager::pushModelView, and OOOpenGLMatrixManager::pushProjection.

+ Here is the caller graph for this function:

◆ stackCount

- (NSUInteger) stackCount

Definition at line 84 of file OOOpenGLMatrixManager.m.

85{
86 return [stack count];
87}

References stackCount.

Referenced by OOOpenGLMatrixManager::countModelView, and stackCount.

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

Member Data Documentation

◆ stack

- (NSMutableArray*) stack
private

Definition at line 52 of file OOOpenGLMatrixManager.h.

Referenced by init, and pop.


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