UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMFloatType.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_VERSE_VM || defined(__INTELLISENSE__)
6
8#include "VerseVM/VVMFloat.h"
9#include "VerseVM/VVMType.h"
10
11namespace Verse
12{
13
14// An float type with constraints.
15struct VFloatType : VType
16{
19
20 static VFloatType& New(FAllocationContext Context, VFloat InMin, VFloat InMax)
21 {
22 return *new (Context.AllocateFastCell(sizeof(VFloatType))) VFloatType(Context, InMin, InMax);
23 }
24 static bool Equals(const VType& Type, VFloat Min, VFloat Max)
25 {
26 if (Type.IsA<VFloatType>())
27 {
28 const VFloatType& Other = Type.StaticCast<VFloatType>();
29 return Min == Other.GetMin() && Max == Other.GetMax();
30 }
31 return false;
32 }
33
34 const VFloat& GetMin() const
35 {
36 return Min;
37 }
38
39 const VFloat& GetMax() const
40 {
41 return Max;
42 }
43
44 bool SubsumesImpl(FAllocationContext Context, VValue);
45
46 COREUOBJECT_API void AppendToStringImpl(FAllocationContext Context, FUtf8StringBuilderBase& Builder, EValueStringFormat Format, TSet<const void*>& VisitedObjects, uint32 RecursionDepth);
49
50 static constexpr bool SerializeIdentity = false;
51 static void SerializeLayout(FAllocationContext Context, VFloatType*& This, FStructuredArchiveVisitor& Visitor);
52 void SerializeImpl(FAllocationContext, FStructuredArchiveVisitor& Visitor);
53
54private:
55 explicit VFloatType(FAllocationContext& Context, VFloat InMin, VFloat InMax)
57 , Min(InMin)
58 , Max(InMax)
59 {
60 }
61
62 VFloat Min;
63 VFloat Max;
64};
65} // namespace Verse
66
67#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition JsonObject.h:23
Definition JsonValue.h:22
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition StringBuilder.h:79
int32 GetMax(const FIntVector3 &V)
Definition Utilities.h:67
int32 GetMin(const FIntVector3 &V)
Definition Utilities.h:53
Type
Definition PawnAction_Move.h:11
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
bool SerializeImpl(const UScriptStruct *InSourceEventType, const void *InSourceEventData, FLiveLinkSerializedFrameData &OutSerializedData)
Definition LiveLinkCompression.cpp:126
Definition Archive.h:36