17 #include "../detail/setup.hpp"
18 #include "../detail/precision.hpp"
19 #include "../detail/type_int.hpp"
20 #include "../detail/_vectorize.hpp"
23 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTC_bitfield extension included")
35 template <
typename genIUType>
36 GLM_FUNC_DECL genIUType
mask(genIUType Bits);
41 template <
typename T, precision P,
template <
typename, precision>
class vecIUType>
42 GLM_FUNC_DECL vecIUType<T, P>
mask(vecIUType<T, P>
const & v);
47 template <
typename genIUType>
53 template <
typename T, precision P,
template <
typename, precision>
class vecType>
59 template <
typename genIUType>
65 template <
typename T, precision P,
template <
typename, precision>
class vecType>
71 template <
typename genIUType>
72 GLM_FUNC_DECL genIUType
bitfieldFillOne(genIUType Value,
int FirstBit,
int BitCount);
77 template <
typename T, precision P,
template <
typename, precision>
class vecType>
78 GLM_FUNC_DECL vecType<T, P>
bitfieldFillOne(vecType<T, P>
const & Value,
int FirstBit,
int BitCount);
83 template <
typename genIUType>
84 GLM_FUNC_DECL genIUType
bitfieldFillZero(genIUType Value,
int FirstBit,
int BitCount);
89 template <
typename T, precision P,
template <
typename, precision>
class vecType>
90 GLM_FUNC_DECL vecType<T, P>
bitfieldFillZero(vecType<T, P>
const & Value,
int FirstBit,
int BitCount);
207 #include "bitfield.inl"
GLM_FUNC_DECL vecType< T, P > bitfieldRotateRight(vecType< T, P > const &In, int Shift)
Rotate all bits to the right.
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
Interleaves the bits of x, y, z and w.
GLM_FUNC_DECL vecIUType< T, P > mask(vecIUType< T, P > const &v)
Build a mask of 'count' bits.
GLM_FUNC_DECL vecType< T, P > bitfieldFillOne(vecType< T, P > const &Value, int FirstBit, int BitCount)
Set to 1 a range of bits.
GLM_FUNC_DECL vecType< T, P > bitfieldFillZero(vecType< T, P > const &Value, int FirstBit, int BitCount)
Set to 0 a range of bits.
GLM_FUNC_DECL vecType< T, P > bitfieldRotateLeft(vecType< T, P > const &In, int Shift)
Rotate all bits to the left.