7#include "Math/Matrix.h"
13
14
15
16
17
19struct TClipProjectionMatrix :
public TMatrix<T>
24
25
26
27
28
29 TClipProjectionMatrix(
const TMatrix<T>& SrcProjMat,
const TPlane<T>& Plane );
33 explicit TClipProjectionMatrix(
const TClipProjectionMatrix<FArg>& From) : TMatrix<T>(From) {}
42FORCEINLINE TClipProjectionMatrix<T>::TClipProjectionMatrix(
const TMatrix<T>& SrcProjMat,
const TPlane<T>& Plane ) :
49 TPlane<T> CornerPlane(
50 sgn(Plane.X) / SrcProjMat.M[0][0],
51 sgn(Plane.Y) / SrcProjMat.M[1][1],
53 -(1.0f - SrcProjMat.M[2][2]) / SrcProjMat.M[3][2]
57 TPlane<T> ProjPlane( Plane * (1.0f / (Plane | CornerPlane)) );
61 M[0][2] = ProjPlane.X;
62 M[1][2] = ProjPlane.Y;
63 M[2][2] = ProjPlane.Z;
64 M[3][2] = -ProjPlane.W;
70 if (a > 0.0f)
return (1.0f);
71 if (a < 0.0f)
return (-1.0f);
80template<>
struct TIsUECoreVariant<FClipProjectionMatrix44f> {
enum { Value =
true }; };
81template<>
struct TIsUECoreVariant<FClipProjectionMatrix44d> {
enum { Value =
true }; };
#define UE_DECLARE_LWC_TYPE(...)
#define TEMPLATE_REQUIRES(...)