Oolite
Loading...
Searching...
No Matches
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 48 of file OOOpenGLMatrixManager.h.

Method Documentation

◆ dealloc

- (void) dealloc

Definition at line 59 of file OOOpenGLMatrixManager.m.

60{
61 [stack release];
62 [super dealloc];
63}

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

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

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

71{
72 if ([stack count] == 0) {
73 return kIdentityMatrix;
74 }
75 OOMatrix matrix;
76 [[stack lastObject] getValue:&matrix];
77 [stack removeLastObject];
78 return matrix;
79}
const OOMatrix kIdentityMatrix
Definition OOMatrix.m:28
struct OOMatrix OOMatrix
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 65 of file OOOpenGLMatrixManager.m.

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

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

Here is the caller graph for this function:

◆ stackCount

- (NSUInteger) stackCount

Definition at line 81 of file OOOpenGLMatrixManager.m.

82{
83 return [stack count];
84}

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 50 of file OOOpenGLMatrixManager.h.

Referenced by init, and pop.


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