22 #ifndef _vctBarycentricVector_h
23 #define _vctBarycentricVector_h
68 template <
class _elementType, vct::
size_type _size>
94 template <str
ide_type __str
ide,
class __dataPtrType>
108 :
BaseType(element0, element1, element2)
112 _elementType element3)
113 :
BaseType(element0, element1, element2, element3)
119 _elementType element3, _elementType element4, ...)
121 (*this)[0] = element0;
122 (*this)[1] = element1;
123 (*this)[2] = element2;
124 (*this)[3] = element3;
125 (*this)[4] = element4;
127 va_start(nextArg, element4);
129 (*this)[i] = va_arg(nextArg, value_type);
136 bool IsBarycentric(
const _elementType tolerance = TypeTraits::Tolerance() )
const
139 return ( (-tolerance <= diff) && (diff <= tolerance) );
144 bool IsInterior(
const _elementType tolerance = TypeTraits::Tolerance())
const
148 const bool result = ((*this).GreaterOrEqual(tolerance));
154 bool IsMember(
const _elementType tolerance = TypeTraits::Tolerance())
const
158 const bool result = ((*this).GreaterOrEqual(-tolerance));
164 bool HasZero(
const _elementType tolerance = TypeTraits::Tolerance())
const
168 SoViSi< typename vctBinaryOperations<bool>::Or,
170 Unfold( (*
this), tolerance );
174 bool IsBoundary(
const _elementType tolerance = TypeTraits::Tolerance())
const
181 bool IsVertex(
const _elementType tolerance = TypeTraits::Tolerance())
const
185 const ThisType diff((*
this) - _elementType(1));
186 return (diff.
HasZero(tolerance));
197 if ( (-tolerance <= scale) && (scale <= tolerance) )
207 #endif // _vctBarycentricVector_h
size_t index_type
Definition: vctContainerTraits.h:36
bool IsBoundary(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:174
vctBarycentricVector(_elementType element0, _elementType element1, _elementType element2)
Definition: vctBarycentricVector.h:107
Definition: vctBarycentricVector.h:69
vctFixedSizeVector< _elementType, _size > BaseType
Definition: vctBarycentricVector.h:72
vctBarycentricVector< _elementType, _size > ThisType
Definition: vctBarycentricVector.h:73
vctBarycentricVector(_elementType element0, _elementType element1)
Definition: vctBarycentricVector.h:103
class cmnTypeTraits< value_type > TypeTraits
Definition: vctBarycentricVector.h:76
vctBarycentricVector(_elementType value)
Definition: vctBarycentricVector.h:99
vctBarycentricVector(const vctFixedSizeVectorBase< _size, __stride, _elementType, __dataPtrType > &other)
Definition: vctBarycentricVector.h:95
Implementation of a fixed-size vector using template metaprogramming.
Definition: vctFixedSizeVector.h:52
bool HasZero(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:164
vctBarycentricVector()
Definition: vctBarycentricVector.h:79
Declaration of vctFixedSizeVector.
Declaration of the class cmnTypeTraits.
vctBarycentricVector(_elementType element0, _elementType element1, _elementType element2, _elementType element3, _elementType element4,...)
Definition: vctBarycentricVector.h:118
value_type SumOfElements(void) const
Definition: vctFixedSizeConstVectorBase.h:424
bool IsMember(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:154
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeVectorBase.h:76
vctBarycentricVector(const BaseType &other)
Definition: vctBarycentricVector.h:89
Test if the first argument is bound by the second argument.
Definition: vctBinaryOperations.h:454
bool IsBarycentric(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:136
bool IsVertex(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:181
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctBarycentricVector(_elementType element0, _elementType element1, _elementType element2, _elementType element3)
Definition: vctBarycentricVector.h:111
bool IsInterior(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:144
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition: cmnTypeTraits.h:155
Container class for the recursive engines.
Definition: vctFixedSizeVectorRecursiveEngines.h:76
ThisType ScaleToBarycentric(const _elementType tolerance=TypeTraits::Tolerance()) const
Definition: vctBarycentricVector.h:194
vctBarycentricVector(const ThisType &other)
Definition: vctBarycentricVector.h:84