 |
OpenMesh
|
42 #ifndef OPENMESH_SRC_OPENMESH_CORE_GEOMETRY_VECTOR11T_HH_
43 #define OPENMESH_SRC_OPENMESH_CORE_GEOMETRY_VECTOR11T_HH_
49 #include <type_traits>
58 #include <OpenMesh/Core/System/config.h>
66 template<
typename ... Ts>
67 struct are_convertible_to;
69 template<
typename To,
typename From,
typename ... Froms>
70 struct are_convertible_to<To, From, Froms...> {
71 static constexpr
bool value = std::is_convertible<From, To>::value
72 && are_convertible_to<To, Froms...>::value;
75 template<
typename To,
typename From>
76 struct are_convertible_to<To, From> :
public std::is_convertible<From, To> {
82 template<
typename Scalar,
int DIM>
85 static_assert(DIM >= 1,
"VectorT requires positive dimensionality.");
88 using container = std::array<Scalar, DIM>;
102 static constexpr
int dim() {
107 static constexpr
size_t size() {
111 static constexpr
const size_t size_ = DIM;
117 template<
typename T,
typename ... Ts,
118 typename =
typename std::enable_if<
sizeof...(Ts)+1 == DIM>::type,
119 typename =
typename std::enable_if<
120 are_convertible_to<Scalar, T, Ts...>::value>::type>
121 constexpr
VectorT(T v, Ts... vs) : values_ { {static_cast<Scalar>(v), static_cast<Scalar>(vs)...} } {
122 static_assert(
sizeof...(Ts)+1 == DIM,
123 "Invalid number of components specified in constructor.");
124 static_assert(are_convertible_to<Scalar, T, Ts...>::value,
125 "Not all components are convertible to Scalar.");
147 template<
typename S = Scalar,
int D = DIM>
149 typename std::enable_if<D == 4,
150 VectorT<decltype(std::declval<S>()/std::declval<S>()), DIM>>::type {
151 static_assert(D == DIM,
"D and DIM need to be identical. (Never "
152 "override the default template arguments.)");
153 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
154 "to be the same type. (Never override the default template "
157 values_[0]/values_[3],
158 values_[1]/values_[3],
159 values_[2]/values_[3],
164 template<
typename Iterator,
166 *std::declval<Iterator&>(),
void(),
167 ++std::declval<Iterator&>(),
void())>
169 std::copy_n(it, DIM, values_.begin());
173 template<
typename otherScalarType,
174 typename =
typename std::enable_if<
175 std::is_convertible<otherScalarType, Scalar>::value>>
183 template<
typename OtherScalar,
184 typename =
typename std::enable_if<
185 std::is_convertible<OtherScalar, Scalar>::value>>
187 std::transform(_rhs.cbegin(), _rhs.cend(),
188 this->begin(), [](OtherScalar rhs) {
189 return static_cast<Scalar>(std::move(rhs));
195 Scalar*
data() {
return values_.data(); }
198 const Scalar*
data()
const {
return values_.data(); }
218 return std::equal(_rhs.values_.cbegin(), _rhs.values_.cend(), values_.cbegin());
223 return !std::equal(_rhs.values_.cbegin(), _rhs.values_.cend(), values_.cbegin());
229 template<
typename OtherScalar>
231 typename std::enable_if<std::is_convertible<
232 decltype(this->values_[0] * _s), Scalar>::value,
234 for (
auto& e : *
this) {
241 template<
typename OtherScalar>
243 typename std::enable_if<std::is_convertible<
244 decltype(this->values_[0] / _s), Scalar>::value,
246 for (
auto& e : *
this) {
253 template<
typename OtherScalar>
254 typename std::enable_if<std::is_convertible<
255 decltype(std::declval<Scalar>() * std::declval<OtherScalar>()),
263 template<
typename OtherScalar>
264 typename std::enable_if<std::is_convertible<
265 decltype(std::declval<Scalar>() / std::declval<OtherScalar>()),
275 template<
typename OtherScalar>
277 typename std::enable_if<
278 sizeof(decltype(this->values_[0] * *_rhs.data())) >= 0,
280 for (
int i = 0; i < DIM; ++i) {
281 data()[i] *= _rhs.data()[i];
287 template<
typename OtherScalar>
289 typename std::enable_if<
290 sizeof(decltype(this->values_[0] / *_rhs.data())) >= 0,
292 for (
int i = 0; i < DIM; ++i) {
293 data()[i] /= _rhs.data()[i];
299 template<
typename OtherScalar>
301 typename std::enable_if<
302 sizeof(decltype(this->values_[0] - *_rhs.data())) >= 0,
304 for (
int i = 0; i < DIM; ++i) {
305 data()[i] -= _rhs.data()[i];
311 template<
typename OtherScalar>
313 typename std::enable_if<
314 sizeof(decltype(this->values_[0] + *_rhs.data())) >= 0,
316 for (
int i = 0; i < DIM; ++i) {
317 data()[i] += _rhs.data()[i];
323 template<
typename OtherScalar>
325 typename std::enable_if<
326 sizeof(decltype(this->values_[0] * *_rhs.data())) >= 0,
332 template<
typename OtherScalar>
334 typename std::enable_if<
335 sizeof(decltype(this->values_[0] / *_rhs.data())) >= 0,
341 template<
typename OtherScalar>
343 typename std::enable_if<
344 sizeof(decltype(this->values_[0] + *_rhs.data())) >= 0,
350 template<
typename OtherScalar>
352 typename std::enable_if<
353 sizeof(decltype(this->values_[0] - *_rhs.data())) >= 0,
361 std::transform(values_.begin(), values_.end(), v.values_.begin(),
362 [](
const Scalar &s) {
return -s; });
368 template<
typename OtherScalar>
370 typename std::enable_if<DIM == 3,
371 VectorT<decltype((*
this)[0] * _rhs[0] -
372 (*
this)[0] * _rhs[0]), DIM>>::type {
374 values_[1] * _rhs[2] - values_[2] * _rhs[1],
375 values_[2] * _rhs[0] - values_[0] * _rhs[2],
376 values_[0] * _rhs[1] - values_[1] * _rhs[0]
382 template<
typename OtherScalar>
384 decltype(*this->
data() * *_rhs.data()) {
386 return std::inner_product(begin() + 1, begin() + DIM, _rhs.begin() + 1,
387 *begin() * *_rhs.begin());
396 template<
typename S = Scalar>
397 decltype(std::declval<S>() * std::declval<S>())
sqrnorm()
const {
398 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
399 "to be the same type. (Never override the default template "
401 typedef decltype(values_[0] * values_[0]) RESULT;
402 return std::accumulate(values_.cbegin() + 1, values_.cend(),
403 values_[0] * values_[0],
404 [](
const RESULT &l,
const Scalar &r) {
return l + r * r; });
408 template<
typename S = Scalar>
411 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
412 "to be the same type. (Never override the default template "
417 template<
typename S = Scalar>
420 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
421 "to be the same type. (Never override the default template "
428 template<
typename S = Scalar>
431 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
432 "to be the same type. (Never override the default template "
434 return *
this /=
norm();
439 template<
typename S = Scalar>
441 decltype(*this / std::declval<
VectorT<S, DIM>>().
norm()) {
442 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
443 "to be the same type. (Never override the default template "
445 return *
this /
norm();
450 template<
typename S = Scalar>
451 typename std::enable_if<
457 static_assert(std::is_same<S, Scalar>::value,
"S and Scalar need "
458 "to be the same type. (Never override the default template "
461 if (n !=
static_cast<decltype(
norm())
>(0)) {
476 return std::accumulate(
477 values_.cbegin() + 1, values_.cend(), values_[0]);
494 return *std::max_element(values_.cbegin(), values_.cend());
500 *std::max_element(values_.cbegin(), values_.cend(),
501 [](
const Scalar &a,
const Scalar &b) {
502 return std::abs(a) < std::abs(b);
508 return *std::min_element(values_.cbegin(), values_.cend());
514 *std::min_element(values_.cbegin(), values_.cend(),
515 [](
const Scalar &a,
const Scalar &b) {
516 return std::abs(a) < std::abs(b);
527 return std::accumulate(values_.cbegin() + 1, values_.cend(),
528 std::abs(values_[0]),
529 [](
const Scalar &l,
const Scalar &r) {
530 return l + std::abs(r);
536 std::transform(values_.cbegin(), values_.cend(),
537 _rhs.values_.cbegin(),
539 [](
const Scalar &l,
const Scalar &r) {
540 return std::min(l, r);
548 std::transform(values_.cbegin(), values_.cend(),
549 _rhs.values_.cbegin(),
551 [&result](
const Scalar &l,
const Scalar &r) {
564 std::transform(values_.cbegin(), values_.cend(),
565 _rhs.values_.cbegin(),
567 [](
const Scalar &l,
const Scalar &r) {
568 return std::max(l, r);
576 std::transform(values_.cbegin(), values_.cend(),
577 _rhs.values_.cbegin(),
579 [&result](
const Scalar &l,
const Scalar &r) {
605 template<
typename Functor>
608 std::transform(result.values_.cbegin(), result.values_.cend(),
609 result.values_.begin(), _func);
615 std::fill(values_.begin(), values_.end(), _s);
626 return std::lexicographical_compare(
627 values_.begin(), values_.end(),
628 _rhs.values_.begin(), _rhs.values_.end());
633 noexcept(noexcept(std::swap(values_, _other.values_))) {
634 std::swap(values_, _other.values_);
642 using iterator =
typename container::iterator;
643 using const_iterator =
typename container::const_iterator;
644 using reverse_iterator =
typename container::reverse_iterator;
645 using const_reverse_iterator =
typename container::const_reverse_iterator;
647 iterator begin() noexcept {
return values_.begin(); }
648 const_iterator begin() const noexcept {
return values_.cbegin(); }
649 const_iterator cbegin() const noexcept {
return values_.cbegin(); }
651 iterator end() noexcept {
return values_.end(); }
652 const_iterator end() const noexcept {
return values_.cend(); }
653 const_iterator cend() const noexcept {
return values_.cend(); }
655 reverse_iterator rbegin() noexcept {
return values_.rbegin(); }
656 const_reverse_iterator rbegin() const noexcept {
return values_.crbegin(); }
657 const_reverse_iterator crbegin() const noexcept {
return values_.crbegin(); }
659 reverse_iterator rend() noexcept {
return values_.rend(); }
660 const_reverse_iterator rend() const noexcept {
return values_.crend(); }
661 const_reverse_iterator crend() const noexcept {
return values_.crend(); }
667 template<
typename Scalar,
int DIM,
typename OtherScalar>
669 decltype(rhs.operator*(_s)) {
675 template<
typename Scalar,
int DIM>
677 typename std::enable_if<
678 sizeof(decltype(os << _vec[0])) >= 0, std::ostream&>::type {
681 for (
int i = 1; i < DIM; ++i) {
682 os <<
" " << _vec[i];
688 template<
typename Scalar,
int DIM>
690 typename std::enable_if<
691 sizeof(decltype(is >> _vec[0])) >= 0, std::istream &>::type {
692 for (
int i = 0; i < DIM; ++i)
699 template<
typename Scalar,
int DIM>
706 template<
typename LScalar,
typename RScalar,
int DIM>
709 decltype(_v1 % _v2) {
715 template<
typename Scalar,
int DIM>
717 noexcept(noexcept(_v1.swap(_v2))) {
723 template<
typename Scalar,
int DIM>
730 template<
typename Scalar,
int DIM>
736 template<
typename Scalar,
int DIM,
typename OtherScalar>
743 template<
typename Scalar,
int DIM>
750 template<
typename Scalar,
int DIM>
757 template<
typename Scalar,
int DIM>
878 constexpr
OpenMesh::Vec4f operator"" _htmlColor(
unsigned long long raw_color) {
880 ((raw_color >> 24) & 0xFF) / 255.0f,
881 ((raw_color >> 16) & 0xFF) / 255.0f,
882 ((raw_color >> 8) & 0xFF) / 255.0f,
883 ((raw_color >> 0) & 0xFF) / 255.0f);
VectorT< signed char, 1 > Vec1c
1-byte signed vector
Definition: Vector11T.hh:765
Scalar * data()
access to Scalar array
Definition: Vector11T.hh:195
VectorT< unsigned char, 3 > Vec3uc
3-byte unsigned vector
Definition: Vector11T.hh:801
const Scalar * data() const
access to const Scalar array
Definition: Vector11T.hh:198
Scalar dot(const VectorT< Scalar, DIM > &_v1, const VectorT< Scalar, DIM > &_v2)
Definition: Vector11T.hh:700
VectorT< double, 6 > Vec6d
6-double vector
Definition: Vector11T.hh:866
bool operator==(const vector_type &_rhs) const
component-wise comparison
Definition: Vector11T.hh:217
VectorT< unsigned int, 6 > Vec6ui
6-int unsigned vector
Definition: Vector11T.hh:862
auto normalized() const -> decltype(*this/std::declval< VectorT< S, DIM >>().norm())
return normalized vector
Definition: Vector11T.hh:440
static constexpr int dim()
returns dimension of the vector (deprecated)
Definition: Vector11T.hh:102
VectorT< unsigned short int, 3 > Vec3us
3-short unsigned vector
Definition: Vector11T.hh:805
Scalar mean_abs() const
return absolute arithmetic mean
Definition: Vector11T.hh:526
VectorT< unsigned char, 4 > Vec4uc
4-byte unsigned vector
Definition: Vector11T.hh:820
auto operator*(const OtherScalar &_s, const VectorT< Scalar, DIM > &rhs) -> decltype(rhs.operator*(_s))
Component wise multiplication from the left.
Definition: Vector11T.hh:668
VectorT< signed char, 6 > Vec6c
6-byte signed vector
Definition: Vector11T.hh:852
vector_type min(const vector_type &_rhs) const
component-wise min
Definition: Vector11T.hh:591
VectorT< signed short int, 2 > Vec2s
2-short signed vector
Definition: Vector11T.hh:786
VectorT< unsigned short int, 6 > Vec6us
6-short unsigned vector
Definition: Vector11T.hh:858
VectorT< signed short int, 1 > Vec1s
1-short signed vector
Definition: Vector11T.hh:769
VectorT< bool, 3 > Vec3b
3-bool vector
Definition: Vector11T.hh:815
auto operator-=(const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< sizeof(decltype(this->values_[0] - *_rhs.data())) >=0
vector difference from this
VectorT< Scalar, DIM > & vectorize(VectorT< Scalar, DIM > &_v, OtherScalar const &_val)
Definition: Vector11T.hh:737
VectorT< unsigned short int, 4 > Vec4us
4-short unsigned vector
Definition: Vector11T.hh:824
auto operator>>(std::istream &is, VectorT< Scalar, DIM > &_vec) -> typename std::enable_if< sizeof(decltype(is >> _vec[0])) >=0
read the space-separated components of a vector from a stream
vector_type &::type normalize_cond()
compute squared euclidean norm
Definition: Vector11T.hh:456
VectorT< double, 5 > Vec5d
5-double vector
Definition: Vector11T.hh:849
VectorT< signed int, 5 > Vec5i
5-int signed vector
Definition: Vector11T.hh:843
auto operator<<(std::ostream &os, const VectorT< Scalar, DIM > &_vec) -> typename std::enable_if< sizeof(decltype(os<< _vec[0])) >=0
output a vector by printing its space-separated compontens
auto length() const -> decltype(std::declval< VectorT< S, DIM >>().norm())
compute squared euclidean norm
Definition: Vector11T.hh:418
Scalar norm(const VectorT< Scalar, DIM > &_v)
Definition: Vector11T.hh:724
auto cross(const VectorT< LScalar, DIM > &_v1, const VectorT< RScalar, DIM > &_v2) -> decltype(_v1 % _v2)
Definition: Vector11T.hh:708
VectorT< signed int, 4 > Vec4i
4-int signed vector
Definition: Vector11T.hh:826
Scalar & operator[](size_t _i)
get i'th element read-write
Definition: Vector11T.hh:203
VectorT< signed short int, 6 > Vec6s
6-short signed vector
Definition: Vector11T.hh:856
Scalar sqrnorm(const VectorT< Scalar, DIM > &_v)
Definition: Vector11T.hh:731
const Scalar & operator[](size_t _i) const
get i'th element read-only
Definition: Vector11T.hh:209
VectorT< signed int, 2 > Vec2i
2-int signed vector
Definition: Vector11T.hh:790
VectorT< unsigned char, 5 > Vec5uc
5-byte unsigned vector
Definition: Vector11T.hh:837
auto operator+(const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< sizeof(decltype(this->values_[0]+ *_rhs.data())) >=0
component-wise vector addition
VectorT< float, 2 > Vec2f
2-float vector
Definition: Vector11T.hh:794
VectorT< Scalar, DIM > vector_type
type of this vector
Definition: Vector11T.hh:99
VectorT< unsigned int, 4 > Vec4ui
4-int unsigned vector
Definition: Vector11T.hh:828
VectorT(Iterator it)
construct from a value array or any other iterator
Definition: Vector11T.hh:168
auto operator|(const VectorT< OtherScalar, DIM > &_rhs) const -> decltype(*this->data() **_rhs.data())
compute scalar product
Definition: Vector11T.hh:383
auto norm() const -> decltype(std::sqrt(std::declval< VectorT< S, DIM >>().sqrnorm()))
compute euclidean norm
Definition: Vector11T.hh:409
VectorT< signed char, 4 > Vec4c
4-byte signed vector
Definition: Vector11T.hh:818
auto operator*=(const OtherScalar &_s) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] *_s), Scalar >::value, VectorT< Scalar, DIM > & >::type
component-wise self-multiplication with scalar
Definition: Vector11T.hh:230
VectorT< float, 1 > Vec1f
1-float vector
Definition: Vector11T.hh:777
Scalar l1_norm() const
compute L1 (Manhattan) norm
Definition: Vector11T.hh:475
VectorT< signed short int, 5 > Vec5s
5-short signed vector
Definition: Vector11T.hh:839
decltype(std::declval< S >() *std::declval< S >()) sqrnorm() const
compute squared euclidean norm
Definition: Vector11T.hh:397
std::enable_if< std::is_convertible< decltype(std::declval< Scalar >)/std::declval< OtherScalar >)), Scalar >::value, VectorT< Scalar, DIM > >::type operator/(const OtherScalar &_s) const
component-wise division by with scalar
Definition: Vector11T.hh:268
VectorT< unsigned short int, 5 > Vec5us
5-short unsigned vector
Definition: Vector11T.hh:841
static constexpr size_t size()
returns dimension of the vector
Definition: Vector11T.hh:107
vector_type & operator=(const VectorT< OtherScalar, DIM > &_rhs)
cast from vector with a different scalar type
Definition: Vector11T.hh:186
VectorT< float, 4 > Vec4f
4-float vector
Definition: Vector11T.hh:830
Scalar value_type
the type of the scalar used in this template
Definition: Vector11T.hh:96
auto homogenized() const -> typename std::enable_if< D==4, VectorT< decltype(std::declval< S >()/std::declval< S >()), DIM >>::type
Only for 4-component vectors with division operator on their Scalar: Dehomogenization.
Definition: Vector11T.hh:148
constexpr VectorT()
default constructor creates uninitialized values.
Definition: Vector11T.hh:129
auto operator/=(const OtherScalar &_s) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]/_s), Scalar >::value, VectorT< Scalar, DIM > & >::type
component-wise self-division by scalar
Definition: Vector11T.hh:242
VectorT< unsigned short int, 1 > Vec1us
1-short unsigned vector
Definition: Vector11T.hh:771
VectorT< signed int, 1 > Vec1i
1-int signed vector
Definition: Vector11T.hh:773
Scalar max_abs() const
return the maximal absolute component
Definition: Vector11T.hh:498
Scalar min_abs() const
return the minimal absolute component
Definition: Vector11T.hh:512
bool operator<(const vector_type &_rhs) const
lexicographical comparison
Definition: Vector11T.hh:625
vector_type & vectorize(const Scalar &_s)
store the same value in each component (e.g. to clear all entries)
Definition: Vector11T.hh:614
VectorT< double, 4 > Vec4d
4-double vector
Definition: Vector11T.hh:832
void swap(VectorT< Scalar, DIM > &_v1, VectorT< Scalar, DIM > &_v2) noexcept(noexcept(_v1.swap(_v2)))
Definition: Vector11T.hh:716
VectorT< float, 3 > Vec3f
3-float vector
Definition: Vector11T.hh:811
VectorT< signed int, 3 > Vec3i
3-int signed vector
Definition: Vector11T.hh:807
auto operator%(const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< DIM==3, VectorT< decltype((*this)[0] *_rhs[0] -(*this)[0] *_rhs[0]), DIM >>::type
cross product: only defined for Vec3* as specialization
Definition: Vector11T.hh:369
VectorT(const Scalar &v)
Creates a vector with all components set to v.
Definition: Vector11T.hh:134
vector_type operator-(void) const
unary minus
Definition: Vector11T.hh:359
Definition: VectorT_inc.hh:67
VectorT< unsigned short int, 2 > Vec2us
2-short unsigned vector
Definition: Vector11T.hh:788
VectorT< signed short int, 4 > Vec4s
4-short signed vector
Definition: Vector11T.hh:822
VectorT< Scalar, DIM > & maximize(VectorT< Scalar, DIM > &_v1, VectorT< Scalar, DIM > &_v2)
Definition: Vector11T.hh:751
VectorT< unsigned char, 6 > Vec6uc
6-byte unsigned vector
Definition: Vector11T.hh:854
static vector_type vectorized(const Scalar &_s)
store the same value in each component
Definition: Vector11T.hh:620
vector_type & maximize(const vector_type &_rhs)
maximize values: same as *this = max(*this, _rhs), but faster
Definition: Vector11T.hh:563
VectorT< unsigned int, 2 > Vec2ui
2-int unsigned vector
Definition: Vector11T.hh:792
VectorT< unsigned char, 1 > Vec1uc
1-byte unsigned vector
Definition: Vector11T.hh:767
VectorT< signed int, 6 > Vec6i
6-int signed vector
Definition: Vector11T.hh:860
VectorT< unsigned int, 1 > Vec1ui
1-int unsigned vector
Definition: Vector11T.hh:775
VectorT< float, 5 > Vec5f
5-float vector
Definition: Vector11T.hh:847
vector_type apply(const Functor &_func) const
component-wise apply function object with Scalar operator()(Scalar).
Definition: Vector11T.hh:606
VectorT< Scalar, DIM > & normalize(VectorT< Scalar, DIM > &_v)
Definition: Vector11T.hh:744
VectorT< signed char, 3 > Vec3c
3-byte signed vector
Definition: Vector11T.hh:799
Scalar mean() const
return arithmetic mean
Definition: Vector11T.hh:521
Scalar l8_norm() const
compute l8_norm
Definition: Vector11T.hh:481
VectorT< unsigned int, 5 > Vec5ui
5-int unsigned vector
Definition: Vector11T.hh:845
auto operator+=(const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< sizeof(decltype(this->values_[0]+ *_rhs.data())) >=0
vector self-addition
VectorT< double, 3 > Vec3d
3-double vector
Definition: Vector11T.hh:813
auto normalize() -> decltype(*this/=std::declval< VectorT< S, DIM >>().norm())
normalize vector, return normalized vector
Definition: Vector11T.hh:429
VectorT< signed char, 2 > Vec2c
2-byte signed vector
Definition: Vector11T.hh:782
VectorT< signed char, 5 > Vec5c
5-byte signed vector
Definition: Vector11T.hh:835
Scalar min() const
return the minimal component
Definition: Vector11T.hh:507
std::enable_if< std::is_convertible< decltype(std::declval< Scalar >) *std::declval< OtherScalar >)), Scalar >::value, VectorT< Scalar, DIM > >::type operator*(const OtherScalar &_s) const
component-wise multiplication with scalar
Definition: Vector11T.hh:258
VectorT< Scalar, DIM > & minimize(VectorT< Scalar, DIM > &_v1, VectorT< Scalar, DIM > &_v2)
Definition: Vector11T.hh:758
vector_type & minimize(const vector_type &_rhs)
minimize values: same as *this = min(*this, _rhs), but faster
Definition: Vector11T.hh:535
void swap(VectorT &_other) noexcept(noexcept(std::swap(values_, _other.values_)))
swap with another vector
Definition: Vector11T.hh:632
VectorT< float, 6 > Vec6f
6-float vector
Definition: Vector11T.hh:864
VectorT< double, 1 > Vec1d
1-double vector
Definition: Vector11T.hh:779
VectorT(const VectorT< otherScalarType, DIM > &_rhs)
copy & cast constructor (explicit)
Definition: Vector11T.hh:176
VectorT< double, 2 > Vec2d
2-double vector
Definition: Vector11T.hh:796
bool maximized(const vector_type &_rhs)
maximize values and signalize coordinate maximization
Definition: Vector11T.hh:574
vector_type max(const vector_type &_rhs) const
component-wise max
Definition: Vector11T.hh:596
bool operator!=(const vector_type &_rhs) const
component-wise comparison
Definition: Vector11T.hh:222
This file contains all code required to use Eigen3 vectors as Mesh vectors.
Definition: MeshItems.hh:59
Definition: Vector11T.hh:83
VectorT< unsigned int, 3 > Vec3ui
3-int unsigned vector
Definition: Vector11T.hh:809
bool minimized(const vector_type &_rhs)
minimize values and signalize coordinate minimization
Definition: Vector11T.hh:546
Scalar max() const
return the maximal component
Definition: Vector11T.hh:493
VectorT< signed short int, 3 > Vec3s
3-short signed vector
Definition: Vector11T.hh:803
VectorT< unsigned char, 2 > Vec2uc
2-byte unsigned vector
Definition: Vector11T.hh:784
Project OpenMesh,
© Computer Graphics Group, RWTH Aachen.
Documentation generated using
doxygen
.