Plasma Engine  2.0
Loading...
Searching...
No Matches
AmbientCubeBasis.h
1#pragma once
2
3#include <Core/CoreDLL.h>
4
5#include <Foundation/IO/Stream.h>
6#include <Foundation/Math/Vec3.h>
7
8struct PL_CORE_DLL plAmbientCubeBasis
9{
10 enum
11 {
12 PosX = 0,
13 NegX,
14 PosY,
15 NegY,
16 PosZ,
17 NegZ,
18
19 NumDirs = 6
20 };
21
22 static plVec3 s_Dirs[NumDirs];
23};
24
25template <typename T>
27{
28 PL_DECLARE_POD_TYPE();
29
31
32 template <typename U>
33 plAmbientCube(const plAmbientCube<U>& other);
34
35 template <typename U>
36 void operator=(const plAmbientCube<U>& other);
37
38 bool operator==(const plAmbientCube& other) const;
39 bool operator!=(const plAmbientCube& other) const;
40
41 void AddSample(const plVec3& vDir, const T& value);
42
43 T Evaluate(const plVec3& vNormal) const;
44
45 plResult Serialize(plStreamWriter& inout_stream) const;
46 plResult Deserialize(plStreamReader& inout_stream);
47
48 T m_Values[plAmbientCubeBasis::NumDirs];
49};
50
51#include <Core/Graphics/Implementation/AmbientCubeBasis_inl.h>
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
Definition AmbientCubeBasis.h:9
Definition AmbientCubeBasis.h:27
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54