#include "client/math/Matrix3DStack.h" #include "client/math/StackOverflow.h" #include "client/math/StackUnderflow.h" Matrix3DStack::Matrix3DStack() { } void Matrix3DStack::pop() { if(index <= 0) { throw StackUnderflow(); } index--; } void Matrix3DStack::push() { if(index >= STACK_SIZE - 1) { throw StackOverflow(); } index++; stack[index].set(stack[index - 1]); } Matrix3D& Matrix3DStack::get() { return stack[index]; }