Torque3D Documentation / _generateds / matrixSetDelegateMethods.h

matrixSetDelegateMethods.h

Engine/source/math/util/matrixSetDelegateMethods.h

More...

Public Defines

define
MATRIX_SET_BIND_VALUE(xfm) mEvalDelegate[xfm].bind(this, &(xfm))
define
MATRIX_SET_GET_VALUE(xfm) inline   &(xfm)() { return mTransform[xfm]; }
define
MATRIX_SET_GET_VALUE_FN(xfm) _transform_##xfm
define
MATRIX_SET_IS_INVERSE_OF(inv_xfm, src_xfm)    inline   &(inv_xfm, src_xfm)() \
   { \
      (mEvalDelegate[src_xfm](), mTransform[inv_xfm]); \
      (inv_xfm); \
      return mTransform[inv_xfm]; \
   }
define
MATRIX_SET_IS_INVERSE_OF_FN(inv_xfm, src_xfm) _##inv_xfm##_is_inverse_of_##src_xfm
define
MATRIX_SET_MULT_ASSIGN(matA, matB, matC)    inline   &(matA, matB, matC)() \
   { \
      (mEvalDelegate[matA](), mEvalDelegate[matB](), mTransform[matC]); \
      (matC); \
      return mTransform[matC]; \
   }
define
MATRIX_SET_MULT_ASSIGN_FN(matA, matB, matC) _##matC##_is_##matA##_x_##matB

Detailed Description

Public Defines

MATRIX_SET_BIND_VALUE(xfm) mEvalDelegate[xfm].bind(this, &(xfm))
MATRIX_SET_GET_VALUE(xfm) inline   &(xfm)() { return mTransform[xfm]; }
MATRIX_SET_GET_VALUE_FN(xfm) _transform_##xfm
MATRIX_SET_IS_INVERSE_OF(inv_xfm, src_xfm)    inline   &(inv_xfm, src_xfm)() \
   { \
      (mEvalDelegate[src_xfm](), mTransform[inv_xfm]); \
      (inv_xfm); \
      return mTransform[inv_xfm]; \
   }
MATRIX_SET_IS_INVERSE_OF_FN(inv_xfm, src_xfm) _##inv_xfm##_is_inverse_of_##src_xfm
MATRIX_SET_MULT_ASSIGN(matA, matB, matC)    inline   &(matA, matB, matC)() \
   { \
      (mEvalDelegate[matA](), mEvalDelegate[matB](), mTransform[matC]); \
      (matC); \
      return mTransform[matC]; \
   }
MATRIX_SET_MULT_ASSIGN_FN(matA, matB, matC) _##matC##_is_##matA##_x_##matB
 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23#ifndef _MATRIXSETDELEGATES_H_
24#define _MATRIXSETDELEGATES_H_
25
26   // Access to the direct value
27#define MATRIX_SET_GET_VALUE_FN(xfm) _transform_##xfm
28#define MATRIX_SET_GET_VALUE(xfm) inline const MatrixF &MATRIX_SET_GET_VALUE_FN(xfm)() { return mTransform[xfm]; }
29#define MATRIX_SET_BIND_VALUE(xfm) mEvalDelegate[xfm].bind(this, &MatrixSet::MATRIX_SET_GET_VALUE_FN(xfm))
30
31#define MATRIX_SET_IS_INVERSE_OF_FN(inv_xfm, src_xfm) _##inv_xfm##_is_inverse_of_##src_xfm
32#define MATRIX_SET_IS_INVERSE_OF(inv_xfm, src_xfm) inline const MatrixF &MATRIX_SET_IS_INVERSE_OF_FN(inv_xfm, src_xfm)() \
33   { \
34      m_matF_invert_to(mEvalDelegate[src_xfm](), mTransform[inv_xfm]); \
35      MATRIX_SET_BIND_VALUE(inv_xfm); \
36      return mTransform[inv_xfm]; \
37   }
38
39
40#define MATRIX_SET_MULT_ASSIGN_FN(matA, matB, matC) _##matC##_is_##matA##_x_##matB
41#define MATRIX_SET_MULT_ASSIGN(matA, matB, matC) inline const MatrixF &MATRIX_SET_MULT_ASSIGN_FN(matA, matB, matC)() \
42   { \
43      m_matF_x_matF_aligned(mEvalDelegate[matA](), mEvalDelegate[matB](), mTransform[matC]); \
44      MATRIX_SET_BIND_VALUE(matC); \
45      return mTransform[matC]; \
46   }
47
48
49#endif // _MATRIXSETDELEGATES_H_
50