inline void GraphicsSystem::MatrixPop() { MatrixStack.Remove(curMatrix); --curMatrix; ResetViewMatrix(); }
inline void GraphicsSystem::MatrixScale(float x, float y) { MatrixStack[curMatrix].X.x = 1.0f; MatrixStack[curMatrix].Y.y = 1.0f; MatrixStack[curMatrix].Scale(x, y, 1.0f); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixRotate(float x, float y, float z, float a) { MatrixStack[curMatrix].X.x = 1.0f; MatrixStack[curMatrix].X.y = 0.0f; MatrixStack[curMatrix].Y.x = 0.0f; MatrixStack[curMatrix].Y.y = 1.0f; MatrixStack[curMatrix].Z.z = 1.0f; // MatrixStack[curMatrix] *= Quat(AxisAngle(x, y, z, a)); MatrixStack[curMatrix] *= MatrixRotationZ(z); ResetViewMatrix(); }
void D3D10System::Frustum(float left, float right, float top, float bottom, float znear, float zfar) { Matrix4x4Frustum(curProjMatrix, left, right, top, bottom, znear, zfar); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixIdentity() { MatrixStack[curMatrix].SetIdentity(); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixTranspose() { MatrixStack[curMatrix].Transpose(); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixScale(const Vect2 &scale) { MatrixStack[curMatrix].Scale(scale.x, scale.y, 1.0f); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixTranslate(const Vect2 &pos) { MatrixStack[curMatrix] *= Vect(pos); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixTranslate(float x, float y) { MatrixStack[curMatrix] *= Vect(x, y, 0.0f); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixRotate(const Quat &q) { MatrixStack[curMatrix] *= q; ResetViewMatrix(); }
inline void GraphicsSystem::MatrixRotate(const AxisAngle &aa) { MatrixStack[curMatrix] *= Quat(aa); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixRotate(float x, float y, float z, float a) { MatrixStack[curMatrix] *= Quat(AxisAngle(x, y, z, a)); ResetViewMatrix(); }
inline void GraphicsSystem::MatrixMultiply(const Matrix &m) { MatrixStack[curMatrix] *= m; ResetViewMatrix(); }
inline void GraphicsSystem::MatrixSet(const Matrix &m) { MatrixStack[curMatrix] = m; ResetViewMatrix(); }