ShapeOp  0.1.0
Types.h
Go to the documentation of this file.
1 // This file is part of ShapeOp, a lightweight C++ library
3 // for static and dynamic geometry processing.
4 //
5 // Copyright (C) 2014 Sofien Bouaziz <sofien.bouaziz@gmail.com>
6 // Copyright (C) 2014 LGG EPFL
7 //
8 // This Source Code Form is subject to the terms of the Mozilla
9 // Public License v. 2.0. If a copy of the MPL was not distributed
10 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #ifndef TYPES_H
13 #define TYPES_H
14 #include "Common.h"
16 #include <Eigen/Dense>
17 #include <Eigen/Sparse>
19 
21 //TODO: For windows 32 bit we may need Eigen::DontAlign
24 #ifdef SHAPEOP_DONT_ALIGN
25 #define SHAPEOP_ALIGNMENT Eigen::DontAlign
26 #else
27 #define SHAPEOP_ALIGNMENT Eigen::AutoAlign
28 #endif
29 
31 namespace ShapeOp {
33 //Dense
34 template < int Rows, int Cols, int Options = (Eigen::ColMajor | SHAPEOP_ALIGNMENT) >
35 using MatrixT = Eigen::Matrix<Scalar, Rows, Cols, Options>;
49 //Sparse
50 template<int Options = Eigen::ColMajor>
51 using SparseMatrixT = Eigen::SparseMatrix<Scalar, Options>;
53 typedef Eigen::Triplet<Scalar> Triplet;
54 } // namespace ShapeOp
57 #endif // TYPES_H
58 
MatrixT< 3, 1 > Vector3
A 3d column vector.
Definition: Types.h:39
MatrixT< 2, 2 > Matrix22
A 2 by 2 matrix.
Definition: Types.h:37
MatrixT< 3, 4 > Matrix34
A 3 by 4 matrix.
Definition: Types.h:42
SparseMatrixT SparseMatrix
The default sparse matrix of Eigen.
Definition: Types.h:52
MatrixT< Eigen::Dynamic, 1 > VectorX
A nd column vector.
Definition: Types.h:47
SHAPEOP_SCALAR ShapeOpScalar
Defines the scalar type used by the ShapeOp solver (float or double).
Definition: Common.h:23
MatrixT< Eigen::Dynamic, Eigen::Dynamic > MatrixXX
A n by m matrix.
Definition: Types.h:48
MatrixT< 3, Eigen::Dynamic > Matrix3X
A 3 by n matrix.
Definition: Types.h:45
MatrixT< 2, 3 > Matrix23
A 2 by 3 matrix.
Definition: Types.h:38
MatrixT< 2, 1 > Vector2
A 2d column vector.
Definition: Types.h:36
Namespace of the ShapeOp library.
Definition: Constraint.cpp:18
Eigen::Triplet< Scalar > Triplet
A triplet, used in the sparse triplet representation for matrices.
Definition: Types.h:53
MatrixT< Eigen::Dynamic, 3 > MatrixX3
A n by 3 matrix.
Definition: Types.h:46
Eigen::Matrix< Scalar, Rows, Cols, Options > MatrixT
A typedef of the dense matrix of Eigen.
Definition: Types.h:35
ShapeOpScalar Scalar
A scalar type, double or float, as defined in ShapeOpScalar in Common.h.
Definition: Types.h:32
MatrixT< 3, 3 > Matrix33
A 3 by 3 matrix.
Definition: Types.h:41
MatrixT< 4, 4 > Matrix44
A 4 by 4 matrix.
Definition: Types.h:44
MatrixT< 4, 1 > Vector4
A 4d column vector.
Definition: Types.h:43
Eigen::SparseMatrix< Scalar, Options > SparseMatrixT
A typedef of the sparse matrix of Eigen.
Definition: Types.h:51
MatrixT< 3, 2 > Matrix32
A 3 by 2 matrix.
Definition: Types.h:40