Link Search Menu Expand Document

Class OGLStack

About :

	OGLStack is a simple class to replace a usual gl matrix stack. It reproduces its basic methods
Class diagram of class of OGLStack.

Functions

Function summury
__init__(self)  
load_matrix(self, matrix) replaces the current matrix by the specified one (more…)
mult_matrix(self, matrix) multiply the current matrix by the specified one (more…)
load_identity(self, matrix) replaces the current matrix by identity (more…)
push_matrix(self) adds the current matrix in the stack and keep the current matrix unchanged (more…)
pop_matrix(self) retrieve the last matrix pushed in the stack as the current matrix and removes this last matrix from the stack (more…)
reset(self) removes the stack and load identity as the current matrix (more…)
get_current(self) gets current matrix (more…)
get_current_transpose(self) gets current matrix but transposed. GL specifies matrix in the transpose mode (more…)

Methods desciption :

init

def __init__(self)

load_matrix

def load_matrix(self, matrix)

replaces the current matrix by the specified one

  • → matrix

mult_matrix

def mult_matrix(self, matrix)

multiply the current matrix by the specified one

  • → matrix

load_identity

def load_identity(self, matrix)

replaces the current matrix by identity

push_matrix

def push_matrix(self)

adds the current matrix in the stack and keep the current matrix unchanged

pop_matrix

def pop_matrix(self)

retrieve the last matrix pushed in the stack as the current matrix and removes this last matrix from the stack

reset

def reset(self)

removes the stack and load identity as the current matrix

get_current

def get_current(self)

gets current matrix

  • ← current matrix

get_current_transpose

def get_current_transpose(self)

gets current matrix but transposed. GL specifies matrix in the transpose mode

  • ← current matrix