//===========================================================================// // File: mtrxstk.cc // // Project: MUNGA Brick: Math Library // // Contents: Interface specification for the matrix class // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 11/21/94 JMA Initial coding. // // 12/01/94 JMA Changed Matrix to FullMatrix, based both matrix classes on // // Matrix44Base // //---------------------------------------------------------------------------// // Copyright (C) 1994-1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #if !defined(MTRXSTK_HPP) # include #endif AffineMatrixStack& AffineMatrixStack::Concatenate(const AffineMatrix& matrix) { AffineMatrix *old_top = Cast_Object(AffineMatrix*,Peek()); AffineMatrix *new_top = (AffineMatrix*)MemoryStack::Push(); new_top->Multiply(*old_top,matrix); return *this; } LinearMatrixStack& LinearMatrixStack::Concatenate(const LinearMatrix& matrix) { LinearMatrix *old_top = Cast_Object(LinearMatrix*,Peek()); LinearMatrix *new_top = (LinearMatrix*)MemoryStack::Push(); new_top->Multiply(*old_top,matrix); return *this; } Matrix4x4Stack& Matrix4x4Stack::Concatenate(const Matrix4x4& matrix) { Matrix4x4 *old_top = Cast_Object(Matrix4x4*,Peek()); Matrix4x4 *new_top = (Matrix4x4*)MemoryStack::Push(); new_top->Multiply(*old_top,matrix); return *this; } Matrix4x4Stack& Matrix4x4Stack::Concatenate(const AffineMatrix& matrix) { Matrix4x4 *old_top = Cast_Object(Matrix4x4*,Peek()); Matrix4x4 *new_top = (Matrix4x4*)MemoryStack::Push(); new_top->Multiply(*old_top,matrix); return *this; } Matrix4x4& Matrix4x4Stack::Push(const AffineMatrix& matrix) { Matrix4x4 *new_top = (Matrix4x4*)MemoryStack::Push(); return *new_top = matrix; }