Add minor changes
This commit is contained in:
@@ -66,6 +66,12 @@ public:
|
||||
double Values[4][4];
|
||||
double Raw[16];
|
||||
};
|
||||
public:
|
||||
/// <summary>A matrix with all of its components set to zero.</summary>
|
||||
static const Double4x4 Zero;
|
||||
|
||||
/// <summary>The identity matrix.</summary>
|
||||
static const Double4x4 Identity;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
@@ -73,6 +79,32 @@ public:
|
||||
/// </summary>
|
||||
Double4x4() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Matrix"/> struct.
|
||||
/// </summary>
|
||||
Double4x4(double m11, double m12, double m13, double m14,
|
||||
double m21, double m22, double m23, double m24,
|
||||
double m31, double m32, double m33, double m34,
|
||||
double m41, double m42, double m43, double m44)
|
||||
: M11(m11)
|
||||
, M12(m12)
|
||||
, M13(m13)
|
||||
, M14(m14)
|
||||
, M21(m21)
|
||||
, M22(m22)
|
||||
, M23(m23)
|
||||
, M24(m24)
|
||||
, M31(m31)
|
||||
, M32(m32)
|
||||
, M33(m33)
|
||||
, M34(m34)
|
||||
, M41(m41)
|
||||
, M42(m42)
|
||||
, M43(m43)
|
||||
, M44(m44)
|
||||
{
|
||||
}
|
||||
|
||||
Double4x4(const Matrix& matrix);
|
||||
|
||||
public:
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "../Types/String.h"
|
||||
|
||||
static_assert(sizeof(Matrix) == 4 * 4 * 4, "Invalid Matrix type size.");
|
||||
static_assert(sizeof(Double4x4) == 8 * 4 * 4, "Invalid Double4x4 type size.");
|
||||
|
||||
const Matrix Matrix::Zero(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
const Matrix Matrix::Identity(
|
||||
@@ -18,6 +19,13 @@ const Matrix Matrix::Identity(
|
||||
0.0f, 0.0f, 1.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
const Double4x4 Double4x4::Zero(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
const Double4x4 Double4x4::Identity(
|
||||
1.0, 0.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
Matrix::Matrix(const Matrix3x3& matrix)
|
||||
{
|
||||
Platform::MemoryCopy(&M11, &matrix.M11, sizeof(Float3));
|
||||
|
||||
@@ -97,6 +97,18 @@ bool RenderLightData::CanRenderShadow(const RenderView& view) const
|
||||
return result && ShadowsStrength > ZeroTolerance;
|
||||
}
|
||||
|
||||
#if !BUILD_RELEASE
|
||||
|
||||
#include "Engine/Level/Actors/Light.h"
|
||||
#include "Engine/Scripting/Scripting.h"
|
||||
|
||||
Light* RenderLightData::GetActor() const
|
||||
{
|
||||
return Scripting::TryFindObject<Light>(ID);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void RenderDirectionalLightData::SetShaderData(ShaderLightData& data, bool useShadow) const
|
||||
{
|
||||
data.SpotAngles.X = -2.0f;
|
||||
|
||||
@@ -64,6 +64,10 @@ struct RenderLightData
|
||||
int32 ShadowsResolution;
|
||||
|
||||
bool CanRenderShadow(const RenderView& view) const;
|
||||
#if !BUILD_RELEASE
|
||||
// Development-only, gets the actor that produced this light (from ID).
|
||||
Light* GetActor() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct RenderDirectionalLightData : RenderLightData
|
||||
|
||||
Reference in New Issue
Block a user