X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fquaternion%2Fquatop_macros.h;fp=src%2FMoof%2Fcml%2Fquaternion%2Fquatop_macros.h;h=0000000000000000000000000000000000000000;hp=112e34855f818c0037d005a7bea3c5c63776c67b;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/Moof/cml/quaternion/quatop_macros.h b/src/Moof/cml/quaternion/quatop_macros.h deleted file mode 100644 index 112e348..0000000 --- a/src/Moof/cml/quaternion/quatop_macros.h +++ /dev/null @@ -1,232 +0,0 @@ -/* -*- C++ -*- ------------------------------------------------------------ - -Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ - -The Configurable Math Library (CML) is distributed under the terms of the -Boost Software License, v1.0 (see cml/LICENSE for details). - - *-----------------------------------------------------------------------*/ -/** @file - * @brief - * - * Create unary and binary operators with macros. - * - * These macros work just like those in cml/quaternion/vecop_macros.h. - */ - -#ifndef quatop_macros_h -#define quatop_macros_h - -/** Declare a unary operator taking a quaternion operand. */ -#define CML_QUAT_UNIOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::UnaryQuaternionOp< quaternion, _OpT_ > \ -> \ - \ -_op_ (const quaternion& arg) \ -{ \ - typedef et::UnaryQuaternionOp< \ - quaternion, _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(arg)); \ -} - - -/** Declare a unary operator taking a et::QuaternionXpr operand. */ -#define CML_QUATXPR_UNIOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::UnaryQuaternionOp< XprT, _OpT_ > \ -> \ - \ -_op_ (QUATXPR_ARG_TYPE arg) \ -{ \ - typedef et::UnaryQuaternionOp< \ - XprT, _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(arg.expression())); \ -} - - - -/** Declare an operator taking two quaternion operands. */ -#define CML_QUAT_QUAT_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - quaternion, quaternion, \ - _OpT_ \ - > \ -> \ - \ -_op_ ( \ - const quaternion& left, \ - const quaternion& right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - quaternion, quaternion, \ - _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left,right)); \ -} - - -/** Declare an operator taking a quaternion and a et::QuaternionXpr. */ -#define CML_QUAT_QUATXPR_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - quaternion, XprT, \ - _OpT_ \ - > \ -> \ - \ -_op_ ( \ - const quaternion& left, \ - QUATXPR_ARG_TYPE right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - quaternion, XprT, \ - _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left,right.expression())); \ -} - - -/** Declare an operator taking an et::QuaternionXpr and a quaternion. */ -#define CML_QUATXPR_QUAT_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - XprT, quaternion, \ - _OpT_ \ - > \ -> \ - \ -_op_ ( \ - QUATXPR_ARG_TYPE left, \ - const quaternion& right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - XprT, quaternion, \ - _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left.expression(),right)); \ -} - - -/** Declare an operator taking two et::QuaternionXpr operands. */ -#define CML_QUATXPR_QUATXPR_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - XprT1, XprT2, \ - _OpT_ < \ - typename XprT1::value_type, \ - typename XprT2::value_type \ - > \ - > \ -> \ - \ -_op_ ( \ - QUATXPR_ARG_TYPE_N(1) left, \ - QUATXPR_ARG_TYPE_N(2) right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - XprT1, XprT2, \ - _OpT_ < \ - typename XprT1::value_type, \ - typename XprT2::value_type> \ - > ExprT; \ - return et::QuaternionXpr( \ - ExprT(left.expression(),right.expression())); \ -} - - -/** Declare an operator taking a quaternion and a scalar. */ -#define CML_QUAT_SCALAR_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - quaternion, ScalarT, \ - _OpT_ \ - > \ -> \ - \ -_op_ ( \ - const quaternion& left, \ - SCALAR_ARG_TYPE right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - quaternion, ScalarT, _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left,right)); \ -} - - -/** Declare an operator taking a scalar and a quaternion. */ -#define CML_SCALAR_QUAT_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - ScalarT, quaternion, _OpT_ \ - > \ -> \ - \ -_op_ ( \ - SCALAR_ARG_TYPE left, \ - const quaternion& right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - ScalarT, quaternion, _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left,right)); \ -} - - -/** Declare an operator taking a et::QuaternionXpr and a scalar. */ -#define CML_QUATXPR_SCALAR_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - XprT, ScalarT, _OpT_ \ - > \ -> \ - \ -_op_ ( \ - QUATXPR_ARG_TYPE left, \ - SCALAR_ARG_TYPE right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - XprT, ScalarT, _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left.expression(),right)); \ -} - - -/** Declare an operator taking a scalar and a et::QuaternionXpr. */ -#define CML_SCALAR_QUATXPR_BINOP(_op_, _OpT_) \ -template \ -inline et::QuaternionXpr< \ - et::BinaryQuaternionOp< \ - ScalarT, XprT, _OpT_ \ - > \ -> \ - \ -_op_ ( \ - SCALAR_ARG_TYPE left, \ - QUATXPR_ARG_TYPE right) \ -{ \ - typedef et::BinaryQuaternionOp< \ - ScalarT, XprT, \ - _OpT_ \ - > ExprT; \ - return et::QuaternionXpr(ExprT(left,right.expression())); \ -} - -#endif - -// ------------------------------------------------------------------------- -// vim:ft=cpp