Oolite 1.91.0.7646-241128-10e222e
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 49 of file OOOpenGLMatrixManager.h.

Method Documentation

◆ dealloc

- (void) dealloc

Definition at line 605 of file OOOpenGLMatrixManager.m.

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

◆ init

- (id) init

Definition at line 605 of file OOOpenGLMatrixManager.m.

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

◆ pop

- (OOMatrix) pop

Definition at line 605 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

◆ push:

- (void) push: (OOMatrix) matrix

Definition at line 605 of file OOOpenGLMatrixManager.m.

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

◆ stackCount

- (NSUInteger) stackCount

Definition at line 605 of file OOOpenGLMatrixManager.m.

85{
86 return [stack count];
87}

Member Data Documentation

◆ stack

- (NSMutableArray*) stack
private

Definition at line 52 of file OOOpenGLMatrixManager.h.


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