Jolt Physics
A multi core friendly Game Physics Engine
|
A vector consisting of 16 bytes. More...
#include <BVec16.h>
Public Types | |
using | Type = { uint64 mData[2] |
Public Member Functions | |
BVec16 ()=default | |
Constructor. | |
BVec16 (const BVec16 &inRHS)=default | |
BVec16 & | operator= (const BVec16 &inRHS)=default |
JPH_INLINE | BVec16 (Type inRHS) |
JPH_INLINE | BVec16 (uint8 inB0, uint8 inB1, uint8 inB2, uint8 inB3, uint8 inB4, uint8 inB5, uint8 inB6, uint8 inB7, uint8 inB8, uint8 inB9, uint8 inB10, uint8 inB11, uint8 inB12, uint8 inB13, uint8 inB14, uint8 inB15) |
Create a vector from 16 bytes. | |
JPH_INLINE | BVec16 (uint64 inV0, uint64 inV1) |
Create a vector from two uint64's. | |
JPH_INLINE bool | operator== (BVec16Arg inV2) const |
Comparison. | |
JPH_INLINE bool | operator!= (BVec16Arg inV2) const |
JPH_INLINE uint8 | operator[] (uint inCoordinate) const |
Get component by index. | |
JPH_INLINE uint8 & | operator[] (uint inCoordinate) |
JPH_INLINE bool | TestAnyTrue () const |
Test if any of the components are true (true is when highest bit of component is set) | |
JPH_INLINE bool | TestAllTrue () const |
Test if all components are true (true is when highest bit of component is set) | |
JPH_INLINE int | GetTrues () const |
Store if mU8[0] is true in bit 0, mU8[1] in bit 1, etc. (true is when highest bit of component is set) | |
Static Public Member Functions | |
static JPH_INLINE BVec16 | sZero () |
Vector with all zeros. | |
static JPH_INLINE BVec16 | sReplicate (uint8 inV) |
Replicate int inV across all components. | |
static JPH_INLINE BVec16 | sLoadByte16 (const uint8 *inV) |
Load 16 bytes from memory. | |
static JPH_INLINE BVec16 | sEquals (BVec16Arg inV1, BVec16Arg inV2) |
Equals (component wise), highest bit of each component that is set is considered true. | |
static JPH_INLINE BVec16 | sOr (BVec16Arg inV1, BVec16Arg inV2) |
Logical or (component wise) | |
static JPH_INLINE BVec16 | sXor (BVec16Arg inV1, BVec16Arg inV2) |
Logical xor (component wise) | |
static JPH_INLINE BVec16 | sAnd (BVec16Arg inV1, BVec16Arg inV2) |
Logical and (component wise) | |
static JPH_INLINE BVec16 | sNot (BVec16Arg inV1) |
Logical not (component wise) | |
Public Attributes | ||
union { | ||
Type mValue | ||
uint8 mU8 [16] | ||
uint64 mU64 [2] | ||
}; | ||
Friends | |
ostream & | operator<< (ostream &inStream, BVec16Arg inV) |
To String. | |
A vector consisting of 16 bytes.
using BVec16::Type = { uint64 mData[2] |
|
default |
Constructor.
Intentionally not initialized for performance reasons
|
default |
|
inline |
JPH_NAMESPACE_BEGIN BVec16::BVec16 | ( | uint8 | inB0, |
uint8 | inB1, | ||
uint8 | inB2, | ||
uint8 | inB3, | ||
uint8 | inB4, | ||
uint8 | inB5, | ||
uint8 | inB6, | ||
uint8 | inB7, | ||
uint8 | inB8, | ||
uint8 | inB9, | ||
uint8 | inB10, | ||
uint8 | inB11, | ||
uint8 | inB12, | ||
uint8 | inB13, | ||
uint8 | inB14, | ||
uint8 | inB15 | ||
) |
Create a vector from 16 bytes.
int BVec16::GetTrues | ( | ) | const |
Store if mU8[0] is true in bit 0, mU8[1] in bit 1, etc. (true is when highest bit of component is set)
|
inline |
bool BVec16::operator== | ( | BVec16Arg | inV2 | ) | const |
Comparison.
Equals (component wise), highest bit of each component that is set is considered true.
bool BVec16::TestAllTrue | ( | ) | const |
Test if all components are true (true is when highest bit of component is set)
bool BVec16::TestAnyTrue | ( | ) | const |
Test if any of the components are true (true is when highest bit of component is set)
|
friend |
To String.
union { ... } BVec16 |
uint64 BVec16::mU64[2] |
uint8 BVec16::mU8[16] |
Type BVec16::mValue |