/*****************************************************************************
 * $LastChangedDate: 2011-08-20 12:07:38 -0400 (Sat, 20 Aug 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Matrix definitions.
 *//*
 * LEGAL:   COPYRIGHT (C) 2004 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef MATH_MATRIX_DEFS_HH
#define MATH_MATRIX_DEFS_HH 1

namespace math {

////////////////////////////////////////////////////////////////////////////////
///////////////////////////  Matrix definitions  ///////////////////////////////
////////////////////////////////////////////////////////////////////////////////

/// Elements in Matrix class (4x3 matrix).
const uint MATRIX_ELEMS = 16;

// The sign of the origin coordinates of the eye matrix is negative.
const fp EYE_MATRIX_ORIGIN_SIGN = -1.0;

// Row-major or column-major.
// If row-major, to go to row i, multiply i by amount of columns.
#ifndef MATRIX_ROW_MAJOR
#define MATRIX_ROW_MAJOR  0
#endif

// Matrix element offsets.
#if MATRIX_ROW_MAJOR
enum { Xx, Xy, Xz, Ox,
       Yx, Yy, Yz, Oy,
       Zx, Zy, Zz, Oz,
       Xw, Yw, Zw, Ow };
#else
enum { Xx, Yx, Zx, Xw,
       Xy, Yy, Zy, Yw,
       Xz, Yz, Zz, Zw,
       Ox, Oy, Oz, Ow };
#endif // MATRIX_ROW_MAJOR

} // namespace math

#endif // MATH_MATRIX_DEFS_HH
