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

Simple byte buffer, aligned to a cache line. More...

#include <ByteBuffer.h>

Inheritance diagram for ByteBuffer:

Public Member Functions

size_t Align (size_t inSize)
 Align the size to a multiple of inSize, returns the length after alignment. More...
 
template<class Type >
Type * Allocate (size_t inSize=1)
 Allocate block of data of inSize elements and return the pointer. More...
 
template<class Type >
void AppendVector (const Array< Type > &inData)
 Append inData to the buffer. More...
 
template<class Type >
const Type * Get (size_t inPosition) const
 Get object at inPosition (an offset in bytes) More...
 
template<class Type >
Type * Get (size_t inPosition)
 Get object at inPosition (an offset in bytes) More...
 

Detailed Description

Simple byte buffer, aligned to a cache line.

Member Function Documentation

◆ Align()

size_t ByteBuffer::Align ( size_t  inSize)
inline

Align the size to a multiple of inSize, returns the length after alignment.

◆ Allocate()

template<class Type >
Type * ByteBuffer::Allocate ( size_t  inSize = 1)
inline

Allocate block of data of inSize elements and return the pointer.

◆ AppendVector()

template<class Type >
void ByteBuffer::AppendVector ( const Array< Type > &  inData)
inline

Append inData to the buffer.

◆ Get() [1/2]

template<class Type >
Type * ByteBuffer::Get ( size_t  inPosition)
inline

Get object at inPosition (an offset in bytes)

◆ Get() [2/2]

template<class Type >
const Type * ByteBuffer::Get ( size_t  inPosition) const
inline

Get object at inPosition (an offset in bytes)


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