UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MirrorMatrix.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Math/Plane.h"
7#include "Math/Matrix.h"
8
9namespace UE {
10namespace Math {
11
15template<typename T>
17 : public TMatrix<T>
18{
19public:
20
27
28 // Conversion to other type.
29 template<typename FArg UE_REQUIRES(!std::is_same_v<T, FArg>)>
30 explicit TMirrorMatrix(const TMirrorMatrix<FArg>& From)
31 : TMatrix<T>(From)
32 {
33 }
34};
35
36template<typename T>
39 TPlane<T>( -2.f*Plane.X*Plane.X + 1.f, -2.f*Plane.Y*Plane.X, -2.f*Plane.Z*Plane.X, 0.f ),
40 TPlane<T>( -2.f*Plane.X*Plane.Y, -2.f*Plane.Y*Plane.Y + 1.f, -2.f*Plane.Z*Plane.Y, 0.f ),
41 TPlane<T>( -2.f*Plane.X*Plane.Z, -2.f*Plane.Y*Plane.Z, -2.f*Plane.Z*Plane.Z + 1.f, 0.f ),
42 TPlane<T>( 2.f*Plane.X*Plane.W, 2.f*Plane.Y*Plane.W, 2.f*Plane.Z*Plane.W, 1.f ) )
43{
44 //check( FMath::Abs(1.f - Plane.SizeSquared()) < KINDA_SMALL_NUMBER && TEXT("not normalized"));
45}
46
47} // namespace Math
48} // namespace UE
49
51
52template<> struct TIsUECoreVariant<FMirrorMatrix44f> { enum { Value = true }; };
53template<> struct TIsUECoreVariant<FMirrorMatrix44d> { enum { Value = true }; };
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define X(Name, Desc)
Definition FormatStringSan.h:47
#define UE_DECLARE_LWC_TYPE(...)
Definition LargeWorldCoordinates.h:27
Definition AdvancedWidgetsModule.cpp:13
Definition IsUECoreType.h:19
@ Value
Definition IsUECoreType.h:20
Definition Matrix.h:43
Definition MirrorMatrix.h:18
TMirrorMatrix(const TMirrorMatrix< FArg > &From)
Definition MirrorMatrix.h:30
TMirrorMatrix(const TPlane< T > &Plane)
Definition MirrorMatrix.h:37
Definition Plane.h:35