17 virtual void ReadBytes(
void *outData,
size_t inNumBytes) = 0;
33 template <
class T,
class A>
34 void Read(std::vector<T, A> &outT)
49 template <
class Type,
class Traits,
class Allocator>
50 void Read(std::basic_string<Type, Traits, Allocator> &outString)
52 typename std::basic_string<Type, Traits, Allocator>::size_type len = 0;
56 outString.resize(len);
57 ReadBytes(outString.data(), len *
sizeof(Type));
88 outVec =
DMat44(x, y, z, t);
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
Holds a 4x4 matrix of floats with the last column consisting of doubles.
Definition DMat44.h:13
static JPH_INLINE Type sFixW(TypeArg inValue)
Internal helper function that ensures that the Z component is replicated to the W component to preven...
Definition DVec3.inl:92
Type mValue
Definition DVec3.h:275
Simple binary input stream.
Definition StreamIn.h:11
virtual ~StreamIn()=default
Virtual destructor.
void Read(T &outT)
Read a primitive (e.g. float, int, etc.) from the binary stream.
Definition StreamIn.h:27
void Read(std::vector< T, A > &outT)
Read a vector of primitives from the binary stream.
Definition StreamIn.h:34
void Read(std::basic_string< Type, Traits, Allocator > &outString)
Read a string from the binary stream (reads the number of characters and then the characters)
Definition StreamIn.h:50
void Read(Vec3 &outVec)
Read a Vec3 (don't read W)
Definition StreamIn.h:64
virtual void ReadBytes(void *outData, size_t inNumBytes)=0
Read a string of bytes from the binary stream.
virtual bool IsEOF() const =0
Returns true when an attempt has been made to read past the end of the file.
virtual bool IsFailed() const =0
Returns true if there was an IO failure.
void Read(DMat44 &outVec)
Read a DMat44 (don't read W component of translation)
Definition StreamIn.h:78
void Read(DVec3 &outVec)
Read a DVec3 (don't read W)
Definition StreamIn.h:71
static JPH_INLINE Type sFixW(Type inValue)
Internal helper function that ensures that the Z component is replicated to the W component to preven...
Type mValue
Definition Vec3.h:281