39 m_stack = std::stack<Matrix4>();
46 m_currentMatrix = matrix;
52 return m_currentMatrix;
58 m_currentMatrix.identity();
64 if (m_stack.size() > k_MatrixStack_MaxSize) {
68 m_stack.push(m_currentMatrix);
75 if (m_stack.size() == 0) {
79 m_currentMatrix = m_stack.top();
86 translate(position.x(), position.y(), position.z());
92 m_currentMatrix.translate(x, y, z);
98 m_currentMatrix.scale(x, y, z);
104 scale(_scale.x(), _scale.y(), _scale.z());
110 scale(btVector3(f, f, f));
116 btVector3 *axis = &rot.getAxis();
118 rot_matrix.rotate(
RADTODEG(rot.getAngle()), axis->x(), axis->y(), axis->z());
119 m_currentMatrix = m_currentMatrix * rot_matrix;
125 rotate(btQuaternion(vec.x(), vec.y(), vec.z()));
131 btVector3 rot(y, x, z);
137 const std::stack<Matrix4> MatrixStack::getStack()
const {
void translate(btVector3 position)
void scale(float x, float y, float z)
void rotate(btQuaternion rot)