libigl v2.5.0
Loading...
Searching...
No Matches
PlainVector.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2024 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8
9#ifndef IGL_PLAINVECTOR_H
10#define IGL_PLAINVECTOR_H
11#include <Eigen/Core>
12#include "PlainMatrix.h"
13
14namespace igl
15{
16 // PlainVectorHelper to determine correct matrix type based on Derived and Size
17 template <typename Derived, int Size, int Options>
19 // Conditional Type: Column vector if is_column_vector is true, otherwise row vector
20 using Type = Eigen::Matrix<
21 typename Derived::Scalar,
22 (Derived::ColsAtCompileTime == 1 && Derived::RowsAtCompileTime != 1) ? Size : 1,
23 (Derived::ColsAtCompileTime == 1 && Derived::RowsAtCompileTime != 1) ? 1 : Size,
24 Options>;
25 };
26
28 template <
29 typename Derived,
30 int Size = (Derived::ColsAtCompileTime == 1 && Derived::RowsAtCompileTime != 1) ? Derived::RowsAtCompileTime : Derived::ColsAtCompileTime,
31 int Options = get_options<Derived>::value>
33
34}
35#endif
36
Definition AABB.h:18
typename PlainVectorHelper< Derived, Size, Options >::Type PlainVector
Definition PlainVector.h:32
Definition PlainVector.h:18
Eigen::Matrix< typename Derived::Scalar,(Derived::ColsAtCompileTime==1 &&Derived::RowsAtCompileTime !=1) ? Size :1,(Derived::ColsAtCompileTime==1 &&Derived::RowsAtCompileTime !=1) ? 1 :Size, Options > Type
Definition PlainVector.h:20
static constexpr int value
Definition PlainMatrix.h:37