UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoMath.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreMinimal.h"
7#include "Math/MathFwd.h"
8#include "Math/Vector2D.h"
9
17namespace GizmoMath
18{
24 const FVector& Point,
26
33 const FVector& QueryPoint,
35
42 const FVector& RayOrigin, const FVector& RayDirection,
45
52 const FVector& PlaneOrigin, const FVector& PlaneNormal,
53 const FVector& RayOrigin, const FVector& RayDirection,
55
62 const FVector& SphereOrigin, const float SphereRadius,
63 const FVector& RayOrigin, const FVector& RayDirection,
65
72 template<typename RealType>
75 const FVector& RayOrigin, const FVector& RayDirection,
76 bool& bIntersectsOut, RealType& OutHitDepth);
77
78
87 template <typename RealType>
89 const FVector& ConeCenter, const FVector& ConeDirection, RealType ConeCosAngle, RealType ConeHeight,
90 const FVector& RayOrigin, const FVector& RayDirection,
91 bool& bIntersectsOut, RealType& OutHitDepth);
92
99 template <typename RealType>
101 const RealType Interval0[2], const RealType Interval1[2],
102 int& OutNumIntersections, RealType& OutResult0, RealType& OutResult1);
103
109 const FVector& QueryPoint,
110 const FVector& CircleOrigin, const FVector& CircleNormal, float CircleRadius,
112
118 const FVector& PlaneNormal,
120
128 const FVector& Point,
129 const FVector& PlaneOrigin, const FVector& PlaneNormal,
130 const FVector& PlaneAxis1, const FVector& PlaneAxis2);
131
132
140 const FVector& Point,
141 const FVector& PlaneOrigin, const FVector& PlaneNormal,
142 const FVector& PlaneAxis1, const FVector& PlaneAxis2);
143
149 const FVector& Point,
150 const FVector& PlaneOrigin, const FVector& PlaneNormal);
151
152
157 template <typename RealType>
158 INTERACTIVETOOLSFRAMEWORK_API RealType SnapToIncrement(RealType Value, RealType Increment);
159
166}
167
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition GizmoMath.cpp:732
INTERACTIVETOOLSFRAMEWORK_API void RaySphereIntersection(const FVector &SphereOrigin, const float SphereRadius, const FVector &RayOrigin, const FVector &RayDirection, bool &bIntersectsOut, FVector &SphereIntersectionPointOut)
Definition GizmoMath.cpp:104
INTERACTIVETOOLSFRAMEWORK_API FVector ProjectPointOntoPlane(const FVector &Point, const FVector &PlaneOrigin, const FVector &PlaneNormal)
Definition GizmoMath.cpp:684
INTERACTIVETOOLSFRAMEWORK_API void MakeNormalPlaneBasis(const FVector &PlaneNormal, FVector &BasisAxis1Out, FVector &BasisAxis2Out)
Definition GizmoMath.cpp:623
INTERACTIVETOOLSFRAMEWORK_API void NearestPointOnLineToRay(const FVector &LineOrigin, const FVector &LineDirection, const FVector &RayOrigin, const FVector &RayDirection, FVector &NearestLinePointOut, float &LineParameterOut, FVector &NearestRayPointOut, float &RayParameterOut)
Definition GizmoMath.cpp:29
INTERACTIVETOOLSFRAMEWORK_API FVector2D ComputeCoordinatesInPlane(const FVector &Point, const FVector &PlaneOrigin, const FVector &PlaneNormal, const FVector &PlaneAxis1, const FVector &PlaneAxis2)
Definition GizmoMath.cpp:672
INTERACTIVETOOLSFRAMEWORK_API float ComputeAngleInPlane(const FVector &Point, const FVector &PlaneOrigin, const FVector &PlaneNormal, const FVector &PlaneAxis1, const FVector &PlaneAxis2)
Definition GizmoMath.cpp:654
void INTERACTIVETOOLSFRAMEWORK_API IntervalIntervalIntersection(const RealType Interval0[2], const RealType Interval1[2], int &OutNumIntersections, RealType &OutResult0, RealType &OutResult1)
void INTERACTIVETOOLSFRAMEWORK_API RayCylinderIntersection(const FVector &CylinderCenter, const FVector &CylinderAxis, RealType CylinderRadius, RealType CylinderHeight, const FVector &RayOrigin, const FVector &RayDirection, bool &bIntersectsOut, RealType &OutHitDepth)
INTERACTIVETOOLSFRAMEWORK_API RealType SnapToIncrement(RealType Value, RealType Increment)
INTERACTIVETOOLSFRAMEWORK_API FVector GetOrthogonalVector(const FVector &V)
Definition GizmoMath.cpp:714
INTERACTIVETOOLSFRAMEWORK_API void ClosetPointOnCircle(const FVector &QueryPoint, const FVector &CircleOrigin, const FVector &CircleNormal, float CircleRadius, FVector &ClosestPointOut)
Definition GizmoMath.cpp:601
INTERACTIVETOOLSFRAMEWORK_API void RayPlaneIntersectionPoint(const FVector &PlaneOrigin, const FVector &PlaneNormal, const FVector &RayOrigin, const FVector &RayDirection, bool &bIntersectsOut, FVector &PlaneIntersectionPointOut)
Definition GizmoMath.cpp:77
INTERACTIVETOOLSFRAMEWORK_API FVector ProjectPointOntoLine(const FVector &Point, const FVector &LineOrigin, const FVector &LineDirection)
Definition GizmoMath.cpp:8
INTERACTIVETOOLSFRAMEWORK_API void NearestPointOnLine(const FVector &LineOrigin, const FVector &LineDirection, const FVector &QueryPoint, FVector &NearestPointOut, float &LineParameterOut)
Definition GizmoMath.cpp:17
void INTERACTIVETOOLSFRAMEWORK_API RayConeIntersection(const FVector &ConeCenter, const FVector &ConeDirection, RealType ConeCosAngle, RealType ConeHeight, const FVector &RayOrigin, const FVector &RayDirection, bool &bIntersectsOut, RealType &OutHitDepth)