3#include <Foundation/Math/BoundingBox.h>
4#include <Foundation/Math/BoundingSphere.h>
5#include <Foundation/Math/Color.h>
6#include <Foundation/Math/Color8UNorm.h>
7#include <Foundation/Math/Mat3.h>
8#include <Foundation/Math/Mat4.h>
9#include <Foundation/Math/Plane.h>
10#include <Foundation/Math/Quat.h>
11#include <Foundation/Math/Transform.h>
12#include <Foundation/Math/Vec2.h>
13#include <Foundation/Math/Vec3.h>
14#include <Foundation/Math/Vec4.h>
18template <
typename Type>
25template <
typename Type>
32template <
typename Type>
38template <
typename Type>
42 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
51template <
typename Type>
58template <
typename Type>
65template <
typename Type>
71template <
typename Type>
75 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
84template <
typename Type>
91template <
typename Type>
98template <
typename Type>
104template <
typename Type>
108 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
117template <
typename Type>
124template <
typename Type>
127 PL_VERIFY(inout_stream.
ReadBytes(ref_mValue.
m_fElementsCM,
sizeof(Type) * 9) ==
sizeof(Type) * 9,
"End of stream reached.");
131template <
typename Type>
137template <
typename Type>
141 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
150template <
typename Type>
157template <
typename Type>
160 PL_VERIFY(inout_stream.
ReadBytes(ref_mValue.
m_fElementsCM,
sizeof(Type) * 16) ==
sizeof(Type) * 16,
"End of stream reached.");
164template <
typename Type>
170template <
typename Type>
174 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
183template <
typename Type>
186 inout_stream << value.m_qRotation;
187 inout_stream << value.m_vPosition;
188 inout_stream << value.m_vScale;
193template <
typename Type>
196 inout_stream >> out_value.m_qRotation;
197 inout_stream >> out_value.m_vPosition;
198 inout_stream >> out_value.m_vScale;
205template <
typename Type>
212template <
typename Type>
219template <
typename Type>
225template <
typename Type>
229 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
238template <
typename Type>
245template <
typename Type>
252template <
typename Type>
258template <
typename Type>
262 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
271template <
typename Type>
274 inout_stream << value.m_vMax;
275 inout_stream << value.m_vMin;
279template <
typename Type>
282 inout_stream >> out_value.m_vMax;
283 inout_stream >> out_value.m_vMin;
289template <
typename Type>
292 inout_stream << value.m_vCenter;
293 inout_stream << value.m_fRadius;
297template <
typename Type>
300 inout_stream >> out_value.m_vCenter;
301 inout_stream >> out_value.m_fRadius;
307template <
typename Type>
310 inout_stream << value.m_vCenter;
311 inout_stream << value.m_fSphereRadius;
312 inout_stream << value.m_vBoxHalfExtends;
316template <
typename Type>
319 inout_stream >> out_value.m_vCenter;
320 inout_stream >> out_value.m_fSphereRadius;
321 inout_stream >> out_value.m_vBoxHalfExtends;
343template <
typename Type>
346 const plUInt64 uiNumBytes =
sizeof(
plColor) * uiCount;
347 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
367template <
typename Type>
373template <
typename Type>
377 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
394 inout_stream >> fRadian;
399template <
typename Type>
405template <
typename Type>
408 const plUInt64 uiNumBytes =
sizeof(
plAngle) * uiCount;
409 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
429template <
typename Type>
435template <
typename Type>
439 if (inout_stream.
ReadBytes(pArray, uiNumBytes) == uiNumBytes)
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
PL_ALWAYS_INLINE void SetRadian(float fRad)
Sets the radian value. (No need for any conversion)
Definition Angle.h:52
constexpr float GetRadian() const
Returns the radian value. (No need for any conversion)
Definition Angle_inl.h:48
A combination of a bounding box and a bounding sphere with the same center.
Definition BoundingBoxSphere.h:12
An axis-aligned bounding box implementation.
Definition BoundingBox.h:12
An implementation of a bounding sphere.
Definition BoundingSphere.h:11
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:61
A 3x3 component matrix class.
Definition Mat3.h:9
Type m_fElementsCM[9]
The matrix as a 9-element Type array (column-major)
Definition Mat3.h:22
A 4x4 component matrix class.
Definition Mat4.h:11
Type m_fElementsCM[16]
The matrix as a 16-element Type array (column-major)
Definition Mat4.h:24
Quaternions can be used to represent rotations in 3D space.
Definition Quat.h:19
Interface for binary in (read) streams.
Definition Stream.h:22
virtual plUInt64 ReadBytes(void *pReadBuffer, plUInt64 uiBytesToRead)=0
Reads a raw number of bytes into the read buffer, this is the only method which has to be implemented...
Interface for binary out (write) streams.
Definition Stream.h:107
virtual plResult WriteBytes(const void *pWriteBuffer, plUInt64 uiBytesToWrite)=0
Writes a raw number of bytes from the buffer, this is the only method which has to be implemented to ...
A 2-component vector class.
Definition Vec2.h:14
A 3-component vector class.
Definition Vec3.h:9
A 4-component vector class.
Definition Vec4.h:9
A class that represents a mathematical plane.
Definition Plane.h:21
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
void AssertSuccess(const char *szMsg=nullptr, const char *szDetails=nullptr) const
Asserts that the function succeeded. In case of failure, the program will terminate.
Definition Status.cpp:7