35 namespace Vectormath {
60 #ifdef _VECTORMATH_NO_SCALAR_CAST
67 inline operator bool()
const;
73 inline __m128
get128()
const;
105 inline const boolInVec
operator == (
const boolInVec &vec0,
const boolInVec &vec1);
106 inline const boolInVec
operator != (
const boolInVec &vec0,
const boolInVec &vec1);
107 inline const boolInVec
operator & (
const boolInVec &vec0,
const boolInVec &vec1);
108 inline const boolInVec
operator ^ (
const boolInVec &vec0,
const boolInVec &vec1);
109 inline const boolInVec
operator | (
const boolInVec &vec0,
const boolInVec &vec1);
114 inline const boolInVec
select(
const boolInVec &vec0,
const boolInVec &vec1,
const boolInVec &select_vec1);
124 namespace Vectormath {
141 unsigned int mask = -(int)scalar;
142 mData = _mm_set1_ps(*(
float *)&mask);
145 #ifdef _VECTORMATH_NO_SCALAR_CAST
151 boolInVec::operator bool() const
154 return *(
bool *)&mData;
168 return boolInVec(_mm_andnot_ps(
mData, _mm_cmpneq_ps(_mm_setzero_ps(),_mm_setzero_ps())));
207 return boolInVec(_mm_cmpeq_ps(vec0.get128(), vec1.get128()));
214 return boolInVec(_mm_cmpneq_ps(vec0.get128(), vec1.get128()));
221 return boolInVec(_mm_and_ps(vec0.get128(), vec1.get128()));
228 return boolInVec(_mm_or_ps(vec0.get128(), vec1.get128()));
235 return boolInVec(_mm_xor_ps(vec0.get128(), vec1.get128()));
242 return boolInVec(
vec_sel(vec0.get128(), vec1.get128(), select_vec1.get128()));
247 #endif // boolInVec_h
const boolInVec operator!=(boolInVec vec0, boolInVec vec1)
friend const boolInVec operator<=(const floatInVec &vec0, const floatInVec &vec1)
boolInVec & operator&=(boolInVec vec)
boolInVec & operator=(boolInVec vec)
friend const boolInVec operator<(const floatInVec &vec0, const floatInVec &vec1)
boolInVec & operator^=(boolInVec vec)
friend const boolInVec select(const boolInVec &vec0, const boolInVec &vec1, const boolInVec &select_vec1)
friend const boolInVec operator==(const boolInVec &vec0, const boolInVec &vec1)
friend const boolInVec operator!=(const boolInVec &vec0, const boolInVec &vec1)
friend const boolInVec operator^(const boolInVec &vec0, const boolInVec &vec1)
friend const boolInVec operator&(const boolInVec &vec0, const boolInVec &vec1)
const boolInVec select(boolInVec vec0, boolInVec vec1, boolInVec select_vec1)
friend const boolInVec operator>(const floatInVec &vec0, const floatInVec &vec1)
friend const boolInVec operator>=(const floatInVec &vec0, const floatInVec &vec1)
const boolInVec operator|(boolInVec vec0, boolInVec vec1)
friend const boolInVec operator|(const boolInVec &vec0, const boolInVec &vec1)
const boolInVec operator&(boolInVec vec0, boolInVec vec1)
boolInVec & operator|=(boolInVec vec)
const boolInVec operator==(boolInVec vec0, boolInVec vec1)
const boolInVec operator!() const
const boolInVec operator^(boolInVec vec0, boolInVec vec1)
static __m128 vec_sel(__m128 a, __m128 b, __m128 mask)