Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BVec16 Class Reference

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
 
BVec16operator= (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 uint8operator[] (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.
 

Detailed Description

A vector consisting of 16 bytes.

Member Typedef Documentation

◆ Type

using BVec16::Type = { uint64 mData[2]

Constructor & Destructor Documentation

◆ BVec16() [1/5]

BVec16::BVec16 ( )
default

Constructor.

Intentionally not initialized for performance reasons

◆ BVec16() [2/5]

BVec16::BVec16 ( const BVec16 inRHS)
default

◆ BVec16() [3/5]

JPH_INLINE BVec16::BVec16 ( Type  inRHS)
inline

◆ BVec16() [4/5]

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.

◆ BVec16() [5/5]

BVec16::BVec16 ( uint64  inV0,
uint64  inV1 
)

Create a vector from two uint64's.

Member Function Documentation

◆ GetTrues()

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)

◆ operator!=()

JPH_INLINE bool BVec16::operator!= ( BVec16Arg  inV2) const
inline

◆ operator=()

BVec16 & BVec16::operator= ( const BVec16 inRHS)
default

◆ operator==()

bool BVec16::operator== ( BVec16Arg  inV2) const

Comparison.

◆ operator[]() [1/2]

JPH_INLINE uint8 & BVec16::operator[] ( uint  inCoordinate)
inline

◆ operator[]() [2/2]

JPH_INLINE uint8 BVec16::operator[] ( uint  inCoordinate) const
inline

Get component by index.

◆ sAnd()

BVec16 BVec16::sAnd ( BVec16Arg  inV1,
BVec16Arg  inV2 
)
static

Logical and (component wise)

◆ sEquals()

BVec16 BVec16::sEquals ( BVec16Arg  inV1,
BVec16Arg  inV2 
)
static

Equals (component wise), highest bit of each component that is set is considered true.

◆ sLoadByte16()

BVec16 BVec16::sLoadByte16 ( const uint8 inV)
static

Load 16 bytes from memory.

◆ sNot()

BVec16 BVec16::sNot ( BVec16Arg  inV1)
static

Logical not (component wise)

◆ sOr()

BVec16 BVec16::sOr ( BVec16Arg  inV1,
BVec16Arg  inV2 
)
static

Logical or (component wise)

◆ sReplicate()

BVec16 BVec16::sReplicate ( uint8  inV)
static

Replicate int inV across all components.

◆ sXor()

BVec16 BVec16::sXor ( BVec16Arg  inV1,
BVec16Arg  inV2 
)
static

Logical xor (component wise)

◆ sZero()

BVec16 BVec16::sZero ( )
static

Vector with all zeros.

◆ TestAllTrue()

bool BVec16::TestAllTrue ( ) const

Test if all components are true (true is when highest bit of component is set)

◆ TestAnyTrue()

bool BVec16::TestAnyTrue ( ) const

Test if any of the components are true (true is when highest bit of component is set)

Friends And Related Symbol Documentation

◆ operator<<

ostream & operator<< ( ostream &  inStream,
BVec16Arg  inV 
)
friend

To String.

Member Data Documentation

◆ [union]

union { ... } BVec16

◆ mU64

uint64 BVec16::mU64[2]

◆ mU8

uint8 BVec16::mU8[16]

◆ mValue

Type BVec16::mValue

The documentation for this class was generated from the following files: