UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
HyperbolaCurve.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Geo/Curves/Curve.h"
5
6namespace UE::CADKernel
7{
8
10{
11 friend class FIGESEntity104;
12 friend class FEntity;
13 friend class FEntity;
14
15protected:
19
23 , SemiMajorAxis(InSemiAxis)
24 , SemiImaginaryAxis(InSemiImagAxis)
25 {
26 }
27
28 FHyperbolaCurve() = default;
29
30public:
31
32 virtual void Serialize(FCADKernelArchive& Ar) override
33 {
34 FCurve::Serialize(Ar);
35 Ar << Matrix;
36 Ar << SemiMajorAxis;
37 Ar << SemiImaginaryAxis;
38 }
39
40#ifdef CADKERNEL_DEV
41 virtual FInfoEntity& GetInfo(FInfoEntity&) const override;
42#endif
43
44 virtual ECurve GetCurveType() const override
45 {
46 return ECurve::Hyperbola;
47 }
48
50 {
51 return Matrix;
52 }
53
54 virtual TSharedPtr<FEntityGeom> ApplyMatrix(const FMatrixH& InMatrix) const override;
55 virtual void Offset(const FVector& OffsetDirection) override;
56
57
58 virtual void EvaluatePoint(double Coordinate, FCurvePoint& OutPoint, int32 DerivativeOrder = 0) const override
59 {
61
62 OutPoint.DerivativeOrder = DerivativeOrder;
63
64 const double CosHUCoord = cosh(Coordinate);
65 const double SinHUCoord = sinh(Coordinate);
66
67 OutPoint.Point = Matrix.Multiply(FVector(SemiMajorAxis * CosHUCoord, SemiImaginaryAxis * SinHUCoord, 0.));
68
69 if (DerivativeOrder > 0)
70 {
71 OutPoint.Gradient = Matrix.MultiplyVector(FVector(SemiMajorAxis * SinHUCoord, SemiImaginaryAxis * CosHUCoord, 0.));
72
73 if (DerivativeOrder > 1)
74 {
75 OutPoint.Laplacian = Matrix.MultiplyVector(FVector(SemiMajorAxis * CosHUCoord, SemiImaginaryAxis * SinHUCoord, 0.));
76 }
77 }
78 }
79
80 virtual void Evaluate2DPoint(double Coordinate, FCurvePoint2D& OutPoint, int32 DerivativeOrder = 0) const override
81 {
83
84 OutPoint.DerivativeOrder = DerivativeOrder;
85
86 const double CosHUCoord = cosh(Coordinate);
87 const double SinHUCoord = sinh(Coordinate);
88
89 OutPoint.Point = Matrix.Multiply2D(FVector2d(SemiMajorAxis * CosHUCoord, SemiImaginaryAxis * SinHUCoord));
90
91 if (DerivativeOrder > 0)
92 {
93 OutPoint.Gradient = Matrix.MultiplyVector2D(FVector2d(SemiMajorAxis * SinHUCoord, SemiImaginaryAxis * CosHUCoord));
94
95 if (DerivativeOrder > 1)
96 {
97 OutPoint.Laplacian = Matrix.MultiplyVector2D(FVector2d(SemiMajorAxis * CosHUCoord, SemiImaginaryAxis * SinHUCoord));
98 }
99 }
100 }
101};
102
103} // namespace UE::CADKernel
104
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ensureCADKernel(InExpression)
Definition Types.h:115
#define FVector
Definition IOSSystemIncludes.h:8
UE::Math::TVector2< double > FVector2d
Definition MathFwd.h:61
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition SharedPointer.h:692
Definition CADKernelArchive.h:19
Definition Curve.h:21
Definition CADEntity.h:56
Definition HyperbolaCurve.h:10
virtual ECurve GetCurveType() const override
Definition HyperbolaCurve.h:44
virtual void Serialize(FCADKernelArchive &Ar) override
Definition HyperbolaCurve.h:32
virtual void Evaluate2DPoint(double Coordinate, FCurvePoint2D &OutPoint, int32 DerivativeOrder=0) const override
Definition HyperbolaCurve.h:80
FMatrixH & GetMatrix()
Definition HyperbolaCurve.h:49
FMatrixH Matrix
Definition HyperbolaCurve.h:16
double SemiImaginaryAxis
Definition HyperbolaCurve.h:18
FHyperbolaCurve(const FMatrixH &InMatrix, double InSemiAxis, double InSemiImagAxis, const FLinearBoundary &InBounds, int8 InDimension=3)
Definition HyperbolaCurve.h:20
double SemiMajorAxis
Definition HyperbolaCurve.h:17
virtual void EvaluatePoint(double Coordinate, FCurvePoint &OutPoint, int32 DerivativeOrder=0) const override
Definition HyperbolaCurve.h:58
Definition MatrixH.h:14
Definition CADEntity.cpp:23
ECurve
Definition GeoEnum.h:10
Definition GeoPoint.h:11
Definition GeoPoint.h:50
Definition Boundary.h:18