]>
Dogcows Code - chaz/yoink/blob - cml/mathlib/matrix_concat.h
1 /* -*- C++ -*- ------------------------------------------------------------
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
8 *-----------------------------------------------------------------------*/
13 #ifndef matrix_concat_h
14 #define matrix_concat_h
16 #include <cml/matrix/matrix_expr.h>
18 /* This will all most likely be abstracted away in a future version of the
19 * CML. For now, this file provides support for functions that need to
20 * concatenate transformation matrices in a basis-independent manner.
22 * @todo: The 2x2 and 3x3 versions of these functions are currently in
23 * matrix_rotation.h. They should be moved here.
29 /** A fixed-size temporary 4x4 matrix */
30 #define MAT_TEMP_4X4 matrix< \
31 typename et::ScalarPromote< \
32 typename MatT_1::value_type, \
33 typename MatT_2::value_type \
36 typename MatT_1::basis_orient, \
37 typename MatT_1::layout \
40 template < class MatT_1
, class MatT_2
> MAT_TEMP_4X4
41 matrix_concat_transforms_4x4(const MatT_1
& m1
, const MatT_2
& m2
, row_basis
) {
45 /** Concatenate two 3D col-basis rotation matrices in the order m1->m2 */
46 template < class MatT_1
, class MatT_2
> MAT_TEMP_4X4
47 matrix_concat_transforms_4x4(const MatT_1
& m1
, const MatT_2
& m2
, col_basis
) {
51 /** Concatenate two 3D rotation matrices in the order m1->m2 */
52 template < class MatT_1
, class MatT_2
> MAT_TEMP_4X4
53 matrix_concat_transforms_4x4(const MatT_1
& m1
, const MatT_2
& m2
) {
54 return matrix_concat_transforms_4x4(m1
,m2
,typename
MatT_1::basis_orient());
This page took 0.036153 seconds and 4 git commands to generate.