Flow Visualisation

Allow to perform bit operations on integer values. More...

Collaboration diagram for GLM_GTX_bit:

Functions

template<typename genIType >
genIType glm::mask (genIType const &count)
 
template<typename genIUType , typename sizeType >
GLM_DEPRECATED genIUType glm::extractField (genIUType const &v, sizeType const &first, sizeType const &count)
 
template<typename genType >
GLM_DEPRECATED int glm::lowestBit (genType const &value)
 
template<typename genType >
GLM_DEPRECATED int glm::highestBit (genType const &value)
 
template<typename genType >
genType glm::highestBitValue (genType const &value)
 
template<typename genType >
bool glm::isPowerOfTwo (genType const &value)
 
template<typename genType >
genType glm::powerOfTwoAbove (genType const &value)
 
template<typename genType >
genType glm::powerOfTwoBelow (genType const &value)
 
template<typename genType >
genType glm::powerOfTwoNearest (genType const &value)
 
template<typename genType >
GLM_DEPRECATED genType glm::bitRevert (genType const &value)
 
template<typename genType >
genType glm::bitRotateRight (genType const &In, std::size_t Shift)
 
template<typename genType >
genType glm::bitRotateLeft (genType const &In, std::size_t Shift)
 
template<typename genIUType >
genIUType glm::fillBitfieldWithOne (genIUType const &Value, int const &FromBit, int const &ToBit)
 
template<typename genIUType >
genIUType glm::fillBitfieldWithZero (genIUType const &Value, int const &FromBit, int const &ToBit)
 

Detailed Description

Allow to perform bit operations on integer values.

<glm/gtx/bit.hpp> need to be included to use these functionalities.

Function Documentation

template<typename genType >
GLM_DEPRECATED genType glm::bitRevert ( genType const &  value)

Revert all bits of any integer based type.

See also
GLM_GTX_bit
template<typename genType >
genType glm::bitRotateLeft ( genType const &  In,
std::size_t  Shift 
)

Rotate all bits to the left.

See also
GLM_GTX_bit
template<typename genType >
genType glm::bitRotateRight ( genType const &  In,
std::size_t  Shift 
)

Rotate all bits to the right.

See also
GLM_GTX_bit
template<typename genIUType , typename sizeType >
GLM_DEPRECATED genIUType glm::extractField ( genIUType const &  v,
sizeType const &  first,
sizeType const &  count 
)

Component wise extraction of bit fields. genType and genIType could be a scalar or a vector.

See also
GLM_GTX_bit
template<typename genIUType >
genIUType glm::fillBitfieldWithOne ( genIUType const &  Value,
int const &  FromBit,
int const &  ToBit 
)

Set to 1 a range of bits.

See also
GLM_GTX_bit
template<typename genIUType >
genIUType glm::fillBitfieldWithZero ( genIUType const &  Value,
int const &  FromBit,
int const &  ToBit 
)

Set to 0 a range of bits.

See also
GLM_GTX_bit
template<typename genType >
GLM_DEPRECATED int glm::highestBit ( genType const &  value)

Find the highest bit set to 1 in a integer variable.

See also
GLM_GTX_bit
template<typename genType >
genType glm::highestBitValue ( genType const &  value)

Find the highest bit set to 1 in a integer variable and return its value.

See also
GLM_GTX_bit
template<typename genType >
bool glm::isPowerOfTwo ( genType const &  value)

Return true if the value is a power of two number.

See also
GLM_GTX_bit
template<typename genType >
GLM_DEPRECATED int glm::lowestBit ( genType const &  value)

Find the lowest bit set to 1 in a integer variable.

See also
GLM_GTX_bit
template<typename genIType >
genIType glm::mask ( genIType const &  count)

Build a mask of 'count' bits

See also
GLM_GTX_bit
template<typename genType >
genType glm::powerOfTwoAbove ( genType const &  value)

Return the power of two number which value is just higher the input value.

See also
GLM_GTX_bit
template<typename genType >
genType glm::powerOfTwoBelow ( genType const &  value)

Return the power of two number which value is just lower the input value.

See also
GLM_GTX_bit
template<typename genType >
genType glm::powerOfTwoNearest ( genType const &  value)

Return the power of two number which value is the closet to the input value.

See also
GLM_GTX_bit