diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FBox2D_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FBox2D_Wrap.cpp index cad5e6b9c1..a5c0f64b99 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FBox2D_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FBox2D_Wrap.cpp @@ -8,746 +8,44 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator+= FBox2D &(const FVector2D &) __attribute__((thiscall)) - -// unsupported method : operator+= FBox2D &(const FBox2D &) __attribute__((thiscall)) - -static void* _FBox2DNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FBox2D* Obj = new FBox2D(); - - // UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FBox2D* Obj = new FBox2D(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - FBox2D* Obj = new FBox2D(*Arg0, *Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - FBox2D* Obj = new FBox2D(Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FBox2DDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FBox2D* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FBox2DDelete_:%p"), Self); - delete Self; -} -static void FBox2DM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FBox2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FBox2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FBox2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FBox2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FBox2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_ComputeSquaredDistanceToPoint(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_ComputeSquaredDistanceToPoint] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ComputeSquaredDistanceToPoint(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_ExpandBy(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_ExpandBy] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ExpandBy(Arg0); - void* Ptr = new FBox2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetArea(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetArea] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetArea(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetCenter(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetCenter] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetCenter(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetCenterAndExtents(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked())) - { - FVector2D* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - FVector2D* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetCenterAndExtents] Attempt to access a NULL self pointer"); - return; - } - Self->GetCenterAndExtents(*Arg0, *Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetClosestPointTo(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetClosestPointTo] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClosestPointTo(*Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetExtent(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetExtent] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetExtent(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_GetSize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_GetSize] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSize(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_Init(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::M_Init] Attempt to access a NULL self pointer"); - return; - } - Self->Init(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_Intersect(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FBox2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_Intersect] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Intersect(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_IsInside(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_IsInside] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsInside(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FBox2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_IsInside] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsInside(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_ShiftBy(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_ShiftBy] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ShiftBy(*Arg0); - void* Ptr = new FBox2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FBox2DM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FBox2D::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FBox2DMinGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Min] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, &(Self->Min), true); - - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FBox2DMinSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Min] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Min = *PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Value->ToObject(Context).ToLocalChecked()); -} -static void _FBox2DMaxGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Max] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, &(Self->Max), true); - - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FBox2DMaxSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Max] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Max = *PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Value->ToObject(Context).ToLocalChecked()); -} -static void _FBox2DbIsValidGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::bIsValid] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Boolean::New(Isolate, Self->bIsValid); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FBox2DbIsValidSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::bIsValid] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->bIsValid = Value->ToBoolean(Isolate)->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFBox2D { AutoRegisterForFBox2D() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"Min", _FBox2DMinGet_, _FBox2DMinSet_}, - {"Max", _FBox2DMaxGet_, _FBox2DMaxSet_}, {"bIsValid", _FBox2DbIsValidGet_, _FBox2DbIsValidSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Equality", FBox2DM_op_Equality}, - {"op_Inequality", FBox2DM_op_Inequality}, {"op_Addition", FBox2DM_op_Addition}, {"set_Item", FBox2DM_set_Item}, - {"ComputeSquaredDistanceToPoint", FBox2DM_ComputeSquaredDistanceToPoint}, {"ExpandBy", FBox2DM_ExpandBy}, - {"GetArea", FBox2DM_GetArea}, {"GetCenter", FBox2DM_GetCenter}, {"GetCenterAndExtents", FBox2DM_GetCenterAndExtents}, - {"GetClosestPointTo", FBox2DM_GetClosestPointTo}, {"GetExtent", FBox2DM_GetExtent}, {"GetSize", FBox2DM_GetSize}, - {"Init", FBox2DM_Init}, {"Intersect", FBox2DM_Intersect}, {"IsInside", FBox2DM_IsInside}, {"ShiftBy", FBox2DM_ShiftBy}, - {"ToString", FBox2DM_ToString}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{0, 0}}; - - Def.UETypeName = "Box2D"; - - Def.SetInitialize(_FBox2DNew_); - Def.Finalize = _FBox2DDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FBox2D), MakeConstructor(FBox2D, EForceInit), + MakeConstructor(FBox2D, const FVector2D&, const FVector2D&), MakeConstructor(FBox2D, const FVector2D*, const int32), + MakeConstructor(FBox2D, const TArray&))) + .Property("Min", MakeProperty(&FBox2D::Min)) + .Property("Max", MakeProperty(&FBox2D::Max)) + .Property("bIsValid", MakeProperty(&FBox2D::bIsValid)) + .Method("op_Equality", MakeFunction(&FBox2D::operator==)) + .Method("op_Inequality", MakeFunction(&FBox2D::operator!=)) + .Method("op_Addition", CombineOverloads(MakeOverload(FBox2D(FBox2D::*)(const FVector2D&) const, &FBox2D::operator+), + MakeOverload(FBox2D(FBox2D::*)(const FBox2D&) const, &FBox2D::operator+))) + .Method("set_Item", SelectFunction(FVector2D & (FBox2D::*) (int32), &FBox2D::operator[])) + .Method("ComputeSquaredDistanceToPoint", MakeFunction(&FBox2D::ComputeSquaredDistanceToPoint)) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("ExpandBy", SelectFunction(FBox2D(FBox2D::*)(const double W) const, &FBox2D::ExpandBy)) +#else + .Method("ExpandBy", SelectFunction(FBox2D(FBox2D::*)(const float W) const, &FBox2D::ExpandBy)) +#endif + .Method("GetArea", MakeFunction(&FBox2D::GetArea)) + .Method("GetCenter", MakeFunction(&FBox2D::GetCenter)) + .Method("GetCenterAndExtents", MakeFunction(&FBox2D::GetCenterAndExtents)) + .Method("GetClosestPointTo", MakeFunction(&FBox2D::GetClosestPointTo)) + .Method("GetExtent", MakeFunction(&FBox2D::GetExtent)) + .Method("GetSize", MakeFunction(&FBox2D::GetSize)) + .Method("Init", MakeFunction(&FBox2D::Init)) + .Method("Intersect", MakeFunction(&FBox2D::Intersect)) + .Method("IsInside", CombineOverloads(MakeOverload(bool (FBox2D::*)(const FVector2D&) const, &FBox2D::IsInside), + MakeOverload(bool (FBox2D::*)(const FBox2D&) const, &FBox2D::IsInside))) + .Method("ShiftBy", MakeFunction(&FBox2D::ShiftBy)) + .Method("ToString", MakeFunction(&FBox2D::ToString)) + .Register(); } }; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FColor_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FColor_Wrap.cpp index 1627603b94..ae1080c519 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FColor_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FColor_Wrap.cpp @@ -8,552 +8,35 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator+= void (const FColor &) __attribute__((thiscall)) - -static void* _FColorNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FColor* Obj = new FColor(); - - // UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FColor* Obj = new FColor(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - uint8 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - uint8 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - uint8 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value(); - uint8 Arg3 = Info[3]->ToInteger(Context).ToLocalChecked()->Value(); - FColor* Obj = new FColor(Arg0, Arg1, Arg2, Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - uint32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - FColor* Obj = new FColor(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FColorDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FColor* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FColorDelete_:%p"), Self); - delete Self; -} -static void FColorM_DWColor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_DWColor] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->DWColor(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_DWColor] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->DWColor(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_FromRGBE(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_FromRGBE] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->FromRGBE(); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorS_FromHex(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto MethodResult = FColor::FromHex(Arg0); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorS_MakeRandomColor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto MethodResult = FColor::MakeRandomColor(); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorS_MakeRedToGreenColorFromScalar(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FColor::MakeRedToGreenColorFromScalar(Arg0); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorS_MakeFromColorTemperature(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FColor::MakeFromColorTemperature(Arg0); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_WithAlpha(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - uint8 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_WithAlpha] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->WithAlpha(Arg0); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ReinterpretAsLinear(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ReinterpretAsLinear] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ReinterpretAsLinear(); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToHex(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FColor::M_ToHex] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToHex(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToPackedARGB(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ToPackedARGB] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToPackedARGB(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToPackedABGR(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ToPackedABGR] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToPackedABGR(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToPackedRGBA(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ToPackedRGBA] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToPackedRGBA(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FColorM_ToPackedBGRA(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FColor::M_ToPackedBGRA] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToPackedBGRA(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFColor { AutoRegisterForFColor() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"DWColor", FColorM_DWColor}, {"op_Equality", FColorM_op_Equality}, - {"op_Inequality", FColorM_op_Inequality}, {"FromRGBE", FColorM_FromRGBE}, {"WithAlpha", FColorM_WithAlpha}, - {"ReinterpretAsLinear", FColorM_ReinterpretAsLinear}, {"ToHex", FColorM_ToHex}, {"ToString", FColorM_ToString}, - {"InitFromString", FColorM_InitFromString}, {"ToPackedARGB", FColorM_ToPackedARGB}, - {"ToPackedABGR", FColorM_ToPackedABGR}, {"ToPackedRGBA", FColorM_ToPackedRGBA}, {"ToPackedBGRA", FColorM_ToPackedBGRA}, - {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"FromHex", FColorS_FromHex}, - {"MakeRandomColor", FColorS_MakeRandomColor}, {"MakeRedToGreenColorFromScalar", FColorS_MakeRedToGreenColorFromScalar}, - {"MakeFromColorTemperature", FColorS_MakeFromColorTemperature}, {0, 0}}; - - Def.UETypeName = "Color"; - - Def.SetInitialize(_FColorNew_); - Def.Finalize = _FColorDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FColor), MakeConstructor(FColor, EForceInit), + MakeConstructor(FColor, uint8, uint8, uint8, uint8), MakeConstructor(FColor, uint32))) + .Method("DWColor", CombineOverloads(MakeOverload(uint32 & (FColor::*) (), &FColor::DWColor), + MakeOverload(const uint32& (FColor::*) () const, &FColor::DWColor))) + .Method("op_Equality", MakeFunction(&FColor::operator==)) + .Method("op_Inequality", MakeFunction(&FColor::operator!=)) + .Method("FromRGBE", MakeFunction(&FColor::FromRGBE)) + .Function("FromHex", MakeFunction(&FColor::FromHex)) + .Function("MakeRandomColor", MakeFunction(&FColor::MakeRandomColor)) + .Function("MakeRedToGreenColorFromScalar", MakeFunction(&FColor::MakeRedToGreenColorFromScalar)) + .Function("MakeFromColorTemperature", MakeFunction(&FColor::MakeFromColorTemperature)) + .Method("WithAlpha", MakeFunction(&FColor::WithAlpha)) + .Method("ReinterpretAsLinear", MakeFunction(&FColor::ReinterpretAsLinear)) + .Method("ToHex", MakeFunction(&FColor::ToHex)) + .Method("ToString", MakeFunction(&FColor::ToString)) + .Method("InitFromString", MakeFunction(&FColor::InitFromString)) + .Method("ToPackedARGB", MakeFunction(&FColor::ToPackedARGB)) + .Method("ToPackedABGR", MakeFunction(&FColor::ToPackedABGR)) + .Method("ToPackedRGBA", MakeFunction(&FColor::ToPackedRGBA)) + .Method("ToPackedBGRA", MakeFunction(&FColor::ToPackedBGRA)) + .Register(); } }; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FGuid_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FGuid_Wrap.cpp index e70eb16b25..2adab1948f 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FGuid_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FGuid_Wrap.cpp @@ -8,416 +8,33 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -static void* _FGuidNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FGuid* Obj = new FGuid(); - - // UE_LOG(LogTemp, Warning, TEXT("_FGuidNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - uint32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - uint32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - uint32 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value(); - uint32 Arg3 = Info[3]->ToInteger(Context).ToLocalChecked()->Value(); - FGuid* Obj = new FGuid(Arg0, Arg1, Arg2, Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FGuidNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FGuidDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FGuid* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FGuidDelete_:%p"), Self); - delete Self; -} -static void FGuidM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FGuid::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidM_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FGuid::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidM_Invalidate(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FGuid::M_Invalidate] Attempt to access a NULL self pointer"); - return; - } - Self->Invalidate(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidM_IsValid(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::M_IsValid] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsValid(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FGuid::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EGuidFormats Arg0 = EGuidFormats(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FGuid::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(Arg0); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidS_NewGuid(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto MethodResult = FGuid::NewGuid(); - void* Ptr = new FGuid(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidS_Parse(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsString() && Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked())) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - FGuid* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - auto MethodResult = FGuid::Parse(Arg0, *Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FGuidS_ParseExact(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsString() && Info[1]->IsNumber() && Info[2]->IsObject() && - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked())) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - EGuidFormats Arg1 = EGuidFormats(Info[1]->ToInt32(Context).ToLocalChecked()->Value()); - FGuid* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked()); - auto MethodResult = FGuid::ParseExact(Arg0, Arg1, *Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FGuidAGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::A] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->A); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FGuidASet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::A] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->A = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FGuidBGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::B] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->B); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FGuidBSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::B] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->B = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FGuidCGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::C] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->C); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FGuidCSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::C] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->C = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FGuidDGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::D] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->D); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FGuidDSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::D] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->D = Value->ToInteger(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFGuid { AutoRegisterForFGuid() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"A", _FGuidAGet_, _FGuidASet_}, {"B", _FGuidBGet_, _FGuidBSet_}, - {"C", _FGuidCGet_, _FGuidCSet_}, {"D", _FGuidDGet_, _FGuidDSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"set_Item", FGuidM_set_Item}, {"get_Item", FGuidM_get_Item}, - {"Invalidate", FGuidM_Invalidate}, {"IsValid", FGuidM_IsValid}, {"ToString", FGuidM_ToString}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = { - {"NewGuid", FGuidS_NewGuid}, {"Parse", FGuidS_Parse}, {"ParseExact", FGuidS_ParseExact}, {0, 0}}; - - Def.UETypeName = "Guid"; - - Def.SetInitialize(_FGuidNew_); - Def.Finalize = _FGuidDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FGuid), MakeConstructor(FGuid, uint32, uint32, uint32, uint32))) + .Property("A", MakeProperty(&FGuid::A)) + .Property("B", MakeProperty(&FGuid::B)) + .Property("C", MakeProperty(&FGuid::C)) + .Property("D", MakeProperty(&FGuid::D)) + .Method("set_Item", SelectFunction(uint32 & (FGuid::*) (int32), &FGuid::operator[])) + .Method("get_Item", SelectFunction(const uint32& (FGuid::*) (int32) const, &FGuid::operator[])) + .Method("Invalidate", MakeFunction(&FGuid::Invalidate)) + .Method("IsValid", MakeFunction(&FGuid::IsValid)) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("ToString", MakeFunction(&FGuid::ToString, EGuidFormats::Digits)) +#else + .Method("ToString", CombineOverloads(MakeOverload(FString(FGuid::*)() const, &FGuid::ToString), + MakeOverload(FString(FGuid::*)(EGuidFormats Format) const, &FGuid::ToString))) +#endif + .Function("NewGuid", MakeFunction(&FGuid::NewGuid)) + .Function("Parse", MakeFunction(&FGuid::Parse)) + .Function("ParseExact", MakeFunction(&FGuid::ParseExact)) + .Register(); } }; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FIntPoint_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FIntPoint_Wrap.cpp index 304ffd4ca7..06d19003b1 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FIntPoint_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FIntPoint_Wrap.cpp @@ -8,717 +8,42 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator() const int32 &(int32) __attribute__((thiscall)) const - -// unsupported method : operator() int32 &(int32) __attribute__((thiscall)) - -// unsupported method : operator*= FIntPoint &(int32) __attribute__((thiscall)) - -// unsupported method : operator/= FIntPoint &(int32) __attribute__((thiscall)) - -// unsupported method : operator+= FIntPoint &(const FIntPoint &) __attribute__((thiscall)) - -// unsupported method : operator-= FIntPoint &(const FIntPoint &) __attribute__((thiscall)) - -// unsupported method : operator/= FIntPoint &(const FIntPoint &) __attribute__((thiscall)) - -// unsupported method : operator= FIntPoint &(const FIntPoint &) __attribute__((thiscall)) - -static void* _FIntPointNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FIntPoint* Obj = new FIntPoint(); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - FIntPoint* Obj = new FIntPoint(Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FIntPoint* Obj = new FIntPoint(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FIntPointDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FIntPoint* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FIntPointDelete_:%p"), Self); - delete Self; -} -static void FIntPointM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(*Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_ComponentMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_ComponentMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ComponentMin(*Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_ComponentMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_ComponentMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ComponentMax(*Arg0); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_GetMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_GetMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMax(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_GetMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_GetMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMin(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_SizeSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_SizeSquared] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntPoint::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointS_DivideAndRoundUp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - auto MethodResult = FIntPoint::DivideAndRoundUp(*Arg0, Arg1); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FIntPoint* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FIntPoint::DivideAndRoundUp(*Arg0, *Arg1); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointS_DivideAndRoundDown(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - auto MethodResult = FIntPoint::DivideAndRoundDown(*Arg0, Arg1); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntPointS_Num(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto MethodResult = FIntPoint::Num(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FIntPointXGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FIntPointXSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FIntPointYGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FIntPointYSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToInteger(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFIntPoint { AutoRegisterForFIntPoint() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = { - {"X", _FIntPointXGet_, _FIntPointXSet_}, {"Y", _FIntPointYGet_, _FIntPointYSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Equality", FIntPointM_op_Equality}, - {"op_Inequality", FIntPointM_op_Inequality}, {"op_Multiply", FIntPointM_op_Multiply}, - {"op_Division", FIntPointM_op_Division}, {"op_Addition", FIntPointM_op_Addition}, - {"op_Subtraction", FIntPointM_op_Subtraction}, {"set_Item", FIntPointM_set_Item}, {"get_Item", FIntPointM_get_Item}, - {"ComponentMin", FIntPointM_ComponentMin}, {"ComponentMax", FIntPointM_ComponentMax}, {"GetMax", FIntPointM_GetMax}, - {"GetMin", FIntPointM_GetMin}, {"Size", FIntPointM_Size}, {"SizeSquared", FIntPointM_SizeSquared}, - {"ToString", FIntPointM_ToString}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"DivideAndRoundUp", FIntPointS_DivideAndRoundUp}, - {"DivideAndRoundDown", FIntPointS_DivideAndRoundDown}, {"Num", FIntPointS_Num}, {0, 0}}; - - Def.UETypeName = "IntPoint"; - - Def.SetInitialize(_FIntPointNew_); - Def.Finalize = _FIntPointDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors( + MakeConstructor(FIntPoint), MakeConstructor(FIntPoint, int32, int32), MakeConstructor(FIntPoint, EForceInit))) + .Property("X", MakeProperty(&FIntPoint::X)) + .Property("Y", MakeProperty(&FIntPoint::Y)) + .Method("op_Equality", MakeFunction(&FIntPoint::operator==)) + .Method("op_Inequality", MakeFunction(&FIntPoint::operator!=)) + .Method("op_Multiply", SelectFunction(FIntPoint(FIntPoint::*)(int32 Scale) const, &FIntPoint::operator*)) + .Method("op_Division", CombineOverloads(MakeOverload(FIntPoint(FIntPoint::*)(int32) const, &FIntPoint::operator/), + MakeOverload(FIntPoint(FIntPoint::*)(const FIntPoint&) const, &FIntPoint::operator/))) + .Method("op_Addition", MakeFunction(&FIntPoint::operator+)) + .Method("op_Subtraction", MakeFunction(&(FIntPoint::operator-))) + .Method("set_Item", SelectFunction(int32 & (FIntPoint::*) (int32), &FIntPoint::operator[])) + .Method("get_Item", SelectFunction(int32(FIntPoint::*)(int32) const, &FIntPoint::operator[])) + .Method("ComponentMin", MakeFunction(&FIntPoint::ComponentMin)) + .Method("ComponentMax", MakeFunction(&FIntPoint::ComponentMax)) + .Method("GetMax", MakeFunction(&FIntPoint::GetMax)) + .Method("GetMin", MakeFunction(&FIntPoint::GetMin)) + .Method("Size", MakeFunction(&FIntPoint::Size)) + .Method("SizeSquared", MakeFunction(&FIntPoint::SizeSquared)) + .Method("ToString", MakeFunction(&FIntPoint::ToString)) + .Function( + "DivideAndRoundUp", CombineOverloads(MakeOverload(FIntPoint(*)(FIntPoint, int32), &FIntPoint::DivideAndRoundUp), + MakeOverload(FIntPoint(*)(FIntPoint, FIntPoint), &FIntPoint::DivideAndRoundUp))) + .Function( + "DivideAndRoundDown", SelectFunction(FIntPoint(*)(FIntPoint lhs, int32 Divisor), &FIntPoint::DivideAndRoundDown)) + .Function("Num", MakeFunction(&FIntPoint::Num)) + .Register(); } }; -AutoRegisterForFIntPoint _AutoRegisterForFIntPoint_; \ No newline at end of file +AutoRegisterForFIntPoint _AutoRegisterForFIntPoint_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FIntVector_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FIntVector_Wrap.cpp index 1233ac9297..dad160bddd 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FIntVector_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FIntVector_Wrap.cpp @@ -8,640 +8,38 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator() const int32 &(int32) __attribute__((thiscall)) const - -// unsupported method : operator() int32 &(int32) __attribute__((thiscall)) - -// unsupported method : operator*= FIntVector &(int32) __attribute__((thiscall)) - -// unsupported method : operator/= FIntVector &(int32) __attribute__((thiscall)) - -// unsupported method : operator+= FIntVector &(const FIntVector &) __attribute__((thiscall)) - -// unsupported method : operator-= FIntVector &(const FIntVector &) __attribute__((thiscall)) - -// unsupported method : operator= FIntVector &(const FIntVector &) __attribute__((thiscall)) - -// unsupported method : operator>> FIntVector (int32) __attribute__((thiscall)) const - -// unsupported method : operator<< FIntVector (int32) __attribute__((thiscall)) const - -// unsupported method : operator& FIntVector (int32) __attribute__((thiscall)) const - -static void* _FIntVectorNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FIntVector* Obj = new FIntVector(); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - int32 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value(); - FIntVector* Obj = new FIntVector(Arg0, Arg1, Arg2); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - FIntVector* Obj = new FIntVector(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FIntVector* Obj = new FIntVector(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FIntVector* Obj = new FIntVector(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FIntVectorDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FIntVector* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FIntVectorDelete_:%p"), Self); - delete Self; -} -static void FIntVectorM_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FIntVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FIntVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FIntVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FIntVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_IsZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_IsZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsZero(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_GetMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_GetMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMax(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_GetMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_GetMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMin(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FIntVector::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorS_DivideAndRoundUp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value(); - auto MethodResult = FIntVector::DivideAndRoundUp(*Arg0, Arg1); - void* Ptr = new FIntVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FIntVectorS_Num(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto MethodResult = FIntVector::Num(); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FIntVectorXGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FIntVectorXSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FIntVectorYGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FIntVectorYSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToInteger(Context).ToLocalChecked()->Value(); -} -static void _FIntVectorZGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Z] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Integer::New(Isolate, Self->Z); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FIntVectorZSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Z] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Z = Value->ToInteger(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFIntVector { AutoRegisterForFIntVector() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"X", _FIntVectorXGet_, _FIntVectorXSet_}, - {"Y", _FIntVectorYGet_, _FIntVectorYSet_}, {"Z", _FIntVectorZGet_, _FIntVectorZSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"get_Item", FIntVectorM_get_Item}, {"set_Item", FIntVectorM_set_Item}, - {"op_Equality", FIntVectorM_op_Equality}, {"op_Inequality", FIntVectorM_op_Inequality}, - {"op_Multiply", FIntVectorM_op_Multiply}, {"op_Division", FIntVectorM_op_Division}, - {"op_Addition", FIntVectorM_op_Addition}, {"op_Subtraction", FIntVectorM_op_Subtraction}, - {"IsZero", FIntVectorM_IsZero}, {"GetMax", FIntVectorM_GetMax}, {"GetMin", FIntVectorM_GetMin}, - {"Size", FIntVectorM_Size}, {"ToString", FIntVectorM_ToString}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = { - {"DivideAndRoundUp", FIntVectorS_DivideAndRoundUp}, {"Num", FIntVectorS_Num}, {0, 0}}; - - Def.UETypeName = "IntVector"; - - Def.SetInitialize(_FIntVectorNew_); - Def.Finalize = _FIntVectorDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FIntVector), MakeConstructor(FIntVector, int32, int32, int32), + MakeConstructor(FIntVector, int32), MakeConstructor(FIntVector, FVector), MakeConstructor(FIntVector, EForceInit))) + .Property("X", MakeProperty(&FIntVector::X)) + .Property("Y", MakeProperty(&FIntVector::Y)) + .Property("Z", MakeProperty(&FIntVector::Z)) + .Method("get_Item", SelectFunction(const int32& (FIntVector::*) (int32) const, &FIntVector::operator[])) + .Method("set_Item", SelectFunction(int32 & (FIntVector::*) (int32), &FIntVector::operator[])) + .Method("op_Equality", MakeFunction(&FIntVector::operator==)) + .Method("op_Inequality", MakeFunction(&FIntVector::operator!=)) + .Method("op_Multiply", SelectFunction(FIntVector(FIntVector::*)(int32 Scale) const, &FIntVector::operator*)) + .Method("op_Division", MakeFunction(&FIntVector::operator/)) + .Method("op_Addition", MakeFunction(&FIntVector::operator+)) + .Method("op_Subtraction", MakeFunction(&FIntVector::operator-)) + .Method("IsZero", MakeFunction(&FIntVector::IsZero)) + .Method("GetMax", MakeFunction(&FIntVector::GetMax)) + .Method("GetMin", MakeFunction(&FIntVector::GetMin)) + .Method("Size", MakeFunction(&FIntVector::Size)) + .Method("ToString", MakeFunction(&FIntVector::ToString)) + .Function( + "DivideAndRoundUp", CombineOverloads(MakeOverload(FIntVector(*)(FIntVector, int32), &FIntVector::DivideAndRoundUp), + MakeOverload(FIntVector(*)(FIntVector, FIntVector), &FIntVector::DivideAndRoundUp))) + .Function("Num", MakeFunction(&FIntVector::Num)) + .Register(); } }; -AutoRegisterForFIntVector _AutoRegisterForFIntVector_; \ No newline at end of file +AutoRegisterForFIntVector _AutoRegisterForFIntVector_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FLinearColor_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FLinearColor_Wrap.cpp index fee4aeda9b..4678606a40 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FLinearColor_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FLinearColor_Wrap.cpp @@ -8,1218 +8,63 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" +#include "UsingTypeDecl.hpp" -// unsupported method : operator+= FLinearColor &(const FLinearColor &) __attribute__((thiscall)) - -// unsupported method : operator-= FLinearColor &(const FLinearColor &) __attribute__((thiscall)) - -// unsupported method : operator*= FLinearColor &(const FLinearColor &) __attribute__((thiscall)) - -// unsupported method : operator*= FLinearColor &(float) __attribute__((thiscall)) - -// unsupported method : operator/= FLinearColor &(const FLinearColor &) __attribute__((thiscall)) - -// unsupported method : operator/= FLinearColor &(float) __attribute__((thiscall)) - -static void* _FLinearColorNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FLinearColor* Obj = new FLinearColor(); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FLinearColor* Obj = new FLinearColor(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg3 = Info[3]->ToNumber(Context).ToLocalChecked()->Value(); - FLinearColor* Obj = new FLinearColor(Arg0, Arg1, Arg2, Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FLinearColor* Obj = new FLinearColor(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FLinearColor* Obj = new FLinearColor(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FLinearColor* Obj = new FLinearColor(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FLinearColorDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FLinearColor* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FLinearColorDelete_:%p"), Self); - delete Self; -} -static void FLinearColorM_ToRGBE(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_ToRGBE] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToRGBE(); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_FromSRGBColor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FLinearColor::FromSRGBColor(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_FromPow22Color(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FLinearColor::FromPow22Color(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_Component(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(*Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_GetClamped(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_GetClamped] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClamped(Arg0, Arg1); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_CopyWithNewOpacity(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_CopyWithNewOpacity] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->CopyWithNewOpacity(Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_MakeRandomColor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto MethodResult = FLinearColor::MakeRandomColor(); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_MakeFromColorTemperature(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FLinearColor::MakeFromColorTemperature(Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_Dist(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FLinearColor* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FLinearColor::Dist(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_LinearRGBToHSV(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_LinearRGBToHSV] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->LinearRGBToHSV(); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_HSVToLinearRGB(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_HSVToLinearRGB] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->HSVToLinearRGB(); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorS_LerpUsingHSV(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FLinearColor* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FLinearColor::LerpUsingHSV(*Arg0, *Arg1, Arg2); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -#if ENGINE_MAJOR_VERSION >= 5 -static void FLinearColorM_QuantizeFloor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_QuantizeFloor] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->QuantizeFloor(); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} -#endif - -static void FLinearColorM_Quantize(const v8::FunctionCallbackInfo& Info) -{ -#if ENGINE_MAJOR_VERSION >= 5 - FLinearColorM_QuantizeFloor(Info); -#else - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_Quantize] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Quantize(); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -#endif -} - -static void FLinearColorM_QuantizeRound(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_QuantizeRound] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->QuantizeRound(); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_ToFColor(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsBoolean()) - { - const bool Arg0 = Info[0]->ToBoolean(Isolate)->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_ToFColor] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToFColor(Arg0); - void* Ptr = new FColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_Desaturate(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_Desaturate] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Desaturate(Arg0); - void* Ptr = new FLinearColor(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_ComputeLuminance(const v8::FunctionCallbackInfo& Info) +struct AutoRegisterForFLinearColor { - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) + AutoRegisterForFLinearColor() { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_ComputeLuminance] Attempt to access a NULL self pointer"); - return; - } + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FLinearColor), MakeConstructor(FLinearColor, EForceInit), + MakeConstructor(FLinearColor, float, float, float, float), MakeConstructor(FLinearColor, const FColor&), + MakeConstructor(FLinearColor, const FVector&), MakeConstructor(FLinearColor, const FVector4&), + MakeConstructor(FLinearColor, const FFloat16Color&))) + .Property("R", MakeProperty(&FLinearColor::R)) + .Property("G", MakeProperty(&FLinearColor::G)) + .Property("B", MakeProperty(&FLinearColor::B)) + .Property("A", MakeProperty(&FLinearColor::A)) + .Method("ToRGBE", MakeFunction(&FLinearColor::ToRGBE)) + .Function("FromSRGBColor", MakeFunction(&FLinearColor::FromSRGBColor)) + .Function("FromPow22Color", MakeFunction(&FLinearColor::FromPow22Color)) + .Method("Component", CombineOverloads(MakeOverload(float& (FLinearColor::*) (int32), &FLinearColor::Component), + MakeOverload(const float& (FLinearColor::*) (int32) const, &FLinearColor::Component))) + .Method("op_Addition", MakeFunction(&FLinearColor::operator+)) + .Method("op_Subtraction", MakeFunction(&FLinearColor::operator-)) + .Method("op_Multiply", + CombineOverloads(MakeOverload(FLinearColor(FLinearColor::*)(const FLinearColor&) const, &FLinearColor::operator*), + MakeOverload(FLinearColor(FLinearColor::*)(float) const, &FLinearColor::operator*))) + .Method("op_Division", + CombineOverloads(MakeOverload(FLinearColor(FLinearColor::*)(const FLinearColor&) const, &FLinearColor::operator/), + MakeOverload(FLinearColor(FLinearColor::*)(float) const, &FLinearColor::operator/))) + .Method("GetClamped", MakeFunction(&FLinearColor::GetClamped)) + .Method("op_Equality", MakeFunction(&FLinearColor::operator==)) + .Method("op_Inequality", MakeFunction(&FLinearColor::operator!=)) + .Method("Equals", MakeFunction(&FLinearColor::Equals)) + .Method("CopyWithNewOpacity", MakeFunction(&FLinearColor::CopyWithNewOpacity)) + .Function("MakeRandomColor", MakeFunction(&FLinearColor::MakeRandomColor)) + .Function("MakeFromColorTemperature", MakeFunction(&FLinearColor::MakeFromColorTemperature)) + .Function("Dist", MakeFunction(&FLinearColor::Dist)) + .Method("LinearRGBToHSV", MakeFunction(&FLinearColor::LinearRGBToHSV)) + .Method("HSVToLinearRGB", MakeFunction(&FLinearColor::HSVToLinearRGB)) + .Function("LerpUsingHSV", MakeFunction(&FLinearColor::LerpUsingHSV)) + .Method("Quantize", MakeFunction(&FLinearColor::Quantize)) + .Method("QuantizeRound", MakeFunction(&FLinearColor::QuantizeRound)) + .Method("ToFColor", MakeFunction(&FLinearColor::ToFColor)) + .Method("Desaturate", MakeFunction(&FLinearColor::Desaturate)) #if ENGINE_MAJOR_VERSION > 4 - auto MethodResult = Self->GetLuminance(); + .Method("ComputeLuminance", MakeFunction(&FLinearColor::GetLuminance)) #else - auto MethodResult = Self->ComputeLuminance(); + .Method("ComputeLuminance", MakeFunction(&FLinearColor::ComputeLuminance)) #endif - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_GetMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_GetMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMax(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_IsAlmostBlack(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_IsAlmostBlack] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsAlmostBlack(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_GetMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_GetMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMin(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_GetLuminance(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_GetLuminance] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetLuminance(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FLinearColorM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FLinearColor::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FLinearColorRGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::R] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->R); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FLinearColorRSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::R] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->R = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FLinearColorGGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::G] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->G); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FLinearColorGSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::G] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->G = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FLinearColorBGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::B] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->B); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FLinearColorBSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::B] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->B = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FLinearColorAGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::A] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->A); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FLinearColorASet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FLinearColor::A] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->A = Value->ToNumber(Context).ToLocalChecked()->Value(); -} - -struct AutoRegisterForFLinearColor -{ - AutoRegisterForFLinearColor() - { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"R", _FLinearColorRGet_, _FLinearColorRSet_}, - {"G", _FLinearColorGGet_, _FLinearColorGSet_}, {"B", _FLinearColorBGet_, _FLinearColorBSet_}, - {"A", _FLinearColorAGet_, _FLinearColorASet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"ToRGBE", FLinearColorM_ToRGBE}, - {"Component", FLinearColorM_Component}, {"op_Addition", FLinearColorM_op_Addition}, - {"op_Subtraction", FLinearColorM_op_Subtraction}, {"op_Multiply", FLinearColorM_op_Multiply}, - {"op_Division", FLinearColorM_op_Division}, {"GetClamped", FLinearColorM_GetClamped}, - {"op_Equality", FLinearColorM_op_Equality}, {"op_Inequality", FLinearColorM_op_Inequality}, - {"Equals", FLinearColorM_Equals}, {"CopyWithNewOpacity", FLinearColorM_CopyWithNewOpacity}, - {"LinearRGBToHSV", FLinearColorM_LinearRGBToHSV}, {"HSVToLinearRGB", FLinearColorM_HSVToLinearRGB}, - {"Quantize", FLinearColorM_Quantize}, {"QuantizeRound", FLinearColorM_QuantizeRound}, - {"ToFColor", FLinearColorM_ToFColor}, {"Desaturate", FLinearColorM_Desaturate}, - {"ComputeLuminance", FLinearColorM_ComputeLuminance}, {"GetMax", FLinearColorM_GetMax}, - {"IsAlmostBlack", FLinearColorM_IsAlmostBlack}, {"GetMin", FLinearColorM_GetMin}, - {"GetLuminance", FLinearColorM_GetLuminance}, {"ToString", FLinearColorM_ToString}, - {"InitFromString", FLinearColorM_InitFromString}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"FromSRGBColor", FLinearColorS_FromSRGBColor}, - {"FromPow22Color", FLinearColorS_FromPow22Color}, {"MakeRandomColor", FLinearColorS_MakeRandomColor}, - {"MakeFromColorTemperature", FLinearColorS_MakeFromColorTemperature}, {"Dist", FLinearColorS_Dist}, - {"LerpUsingHSV", FLinearColorS_LerpUsingHSV}, {0, 0}}; - - Def.UETypeName = "LinearColor"; - - Def.SetInitialize(_FLinearColorNew_); - Def.Finalize = _FLinearColorDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + .Method("GetMax", MakeFunction(&FLinearColor::GetMax)) + .Method("IsAlmostBlack", MakeFunction(&FLinearColor::IsAlmostBlack)) + .Method("GetMin", MakeFunction(&FLinearColor::GetMin)) + .Method("GetLuminance", MakeFunction(&FLinearColor::GetLuminance)) + .Method("ToString", MakeFunction(&FLinearColor::ToString)) + .Method("InitFromString", MakeFunction(&FLinearColor::InitFromString)) + .Register(); } }; -AutoRegisterForFLinearColor _AutoRegisterForFLinearColor_; \ No newline at end of file +AutoRegisterForFLinearColor _AutoRegisterForFLinearColor_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FQuat_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FQuat_Wrap.cpp index bb9fb4e47a..a5ffb98105 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FQuat_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FQuat_Wrap.cpp @@ -8,1846 +8,79 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator+= FQuat (const FQuat &) __attribute__((thiscall)) - -// unsupported method : operator-= FQuat (const FQuat &) __attribute__((thiscall)) - -// unsupported method : operator*= FQuat (const FQuat &) __attribute__((thiscall)) - -// unsupported method : op_Multiply FMatrix (const FMatrix &) __attribute__((thiscall)) const - -// unsupported method : operator*= FQuat (const float) __attribute__((thiscall)) - -// unsupported method : operator/= FQuat (const float) __attribute__((thiscall)) - -static void* _FQuatNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FQuat* Obj = new FQuat(); - - // UE_LOG(LogTemp, Warning, TEXT("_FQuatNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FQuat* Obj = new FQuat(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FQuatNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg3 = Info[3]->ToNumber(Context).ToLocalChecked()->Value(); - FQuat* Obj = new FQuat(Arg0, Arg1, Arg2, Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FQuatNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FQuat* Obj = new FQuat(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FQuatNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - FQuat* Obj = new FQuat(*Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FQuatNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FQuatDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FQuat* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FQuatDelete_:%p"), Self); - delete Self; -} -static void FQuatM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_IsIdentity(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_IsIdentity] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsIdentity(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_op_BitwiseOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_op_BitwiseOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator|(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_MakeFromEuler(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::MakeFromEuler(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Euler(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Euler] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Euler(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Normalize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_Normalize] Attempt to access a NULL self pointer"); - return; - } - Self->Normalize(Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetNormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetNormalized(Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_IsNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_IsNormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNormalized(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_SizeSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_SizeSquared] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetAngle(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetAngle] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAngle(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_ToAxisAndAngle(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsNumber()) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - float Arg1 = PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_ToAxisAndAngle] Attempt to access a NULL self pointer"); - return; - } - Self->ToAxisAndAngle(*Arg0, Arg1); - - PUERTS_NAMESPACE::DataTransfer::UpdateRef(Isolate, Info[1], v8::Number::New(Isolate, Arg1)); - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_ToSwingTwist(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - FQuat* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_ToSwingTwist] Attempt to access a NULL self pointer"); - return; - } - Self->ToSwingTwist(*Arg0, *Arg1, *Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_RotateVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_RotateVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->RotateVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_UnrotateVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_UnrotateVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->UnrotateVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Log(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Log] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Log(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Exp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Exp] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Exp(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Inverse(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Inverse] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Inverse(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_EnforceShortestArcWith(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_EnforceShortestArcWith] Attempt to access a NULL self pointer"); - return; - } - Self->EnforceShortestArcWith(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetAxisX(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetAxisX] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAxisX(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetAxisY(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetAxisY] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAxisY(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetAxisZ(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetAxisZ] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAxisZ(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetForwardVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetForwardVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetForwardVector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetRightVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetRightVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRightVector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetUpVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetUpVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetUpVector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Vector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Vector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Vector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_Rotator(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::M_Rotator] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Rotator(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_GetRotationAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_GetRotationAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRotationAxis(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_AngularDistance(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_AngularDistance] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->AngularDistance(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatM_DiagnosticCheckNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FQuat::M_DiagnosticCheckNaN] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_FindBetween(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::FindBetween(*Arg0, *Arg1); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_FindBetweenNormals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::FindBetweenNormals(*Arg0, *Arg1); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_FindBetweenVectors(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::FindBetweenVectors(*Arg0, *Arg1); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_Error(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::Error(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_ErrorAutoNormalize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FQuat::ErrorAutoNormalize(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_FastLerp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::FastLerp(*Arg0, *Arg1, Arg2); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_FastBilerp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 6) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked()) && - Info[4]->IsNumber() && Info[5]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg3 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - float Arg4 = Info[4]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg5 = Info[5]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::FastBilerp(*Arg0, *Arg1, *Arg2, *Arg3, Arg4, Arg5); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_Slerp_NotNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::Slerp_NotNormalized(*Arg0, *Arg1, Arg2); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_Slerp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::Slerp(*Arg0, *Arg1, Arg2); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_SlerpFullPath_NotNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::SlerpFullPath_NotNormalized(*Arg0, *Arg1, Arg2); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_SlerpFullPath(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::SlerpFullPath(*Arg0, *Arg1, Arg2); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_Squad(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 5) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked()) && - Info[4]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg3 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - float Arg4 = Info[4]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::Squad(*Arg0, *Arg1, *Arg2, *Arg3, Arg4); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_SquadFullPath(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 5) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked()) && - Info[4]->IsNumber()) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg3 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - float Arg4 = Info[4]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FQuat::SquadFullPath(*Arg0, *Arg1, *Arg2, *Arg3, Arg4); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FQuatS_CalcTangents(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 5) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsNumber() && Info[4]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[4])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[4])->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FQuat* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - float Arg3 = Info[3]->ToNumber(Context).ToLocalChecked()->Value(); - FQuat* Arg4 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[4])->ToObject(Context).ToLocalChecked()); - FQuat::CalcTangents(*Arg0, *Arg1, *Arg2, Arg3, *Arg4); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FQuatXGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FQuatXSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FQuatYGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FQuatYSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FQuatZGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::Z] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Z); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FQuatZSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::Z] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Z = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FQuatWGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::W] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->W); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FQuatWSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FQuat::W] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->W = Value->ToNumber(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFQuat { AutoRegisterForFQuat() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"X", _FQuatXGet_, _FQuatXSet_}, {"Y", _FQuatYGet_, _FQuatYSet_}, - {"Z", _FQuatZGet_, _FQuatZSet_}, {"W", _FQuatWGet_, _FQuatWSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Addition", FQuatM_op_Addition}, - {"op_Subtraction", FQuatM_op_Subtraction}, {"Equals", FQuatM_Equals}, {"IsIdentity", FQuatM_IsIdentity}, - {"op_Multiply", FQuatM_op_Multiply}, {"op_Division", FQuatM_op_Division}, {"op_Equality", FQuatM_op_Equality}, - {"op_Inequality", FQuatM_op_Inequality}, {"op_BitwiseOr", FQuatM_op_BitwiseOr}, {"Euler", FQuatM_Euler}, - {"Normalize", FQuatM_Normalize}, {"GetNormalized", FQuatM_GetNormalized}, {"IsNormalized", FQuatM_IsNormalized}, - {"Size", FQuatM_Size}, {"SizeSquared", FQuatM_SizeSquared}, {"GetAngle", FQuatM_GetAngle}, - {"ToAxisAndAngle", FQuatM_ToAxisAndAngle}, {"ToSwingTwist", FQuatM_ToSwingTwist}, {"RotateVector", FQuatM_RotateVector}, - {"UnrotateVector", FQuatM_UnrotateVector}, {"Log", FQuatM_Log}, {"Exp", FQuatM_Exp}, {"Inverse", FQuatM_Inverse}, - {"EnforceShortestArcWith", FQuatM_EnforceShortestArcWith}, {"GetAxisX", FQuatM_GetAxisX}, {"GetAxisY", FQuatM_GetAxisY}, - {"GetAxisZ", FQuatM_GetAxisZ}, {"GetForwardVector", FQuatM_GetForwardVector}, {"GetRightVector", FQuatM_GetRightVector}, - {"GetUpVector", FQuatM_GetUpVector}, {"Vector", FQuatM_Vector}, {"Rotator", FQuatM_Rotator}, - {"GetRotationAxis", FQuatM_GetRotationAxis}, {"AngularDistance", FQuatM_AngularDistance}, - {"ContainsNaN", FQuatM_ContainsNaN}, {"ToString", FQuatM_ToString}, {"InitFromString", FQuatM_InitFromString}, - {"DiagnosticCheckNaN", FQuatM_DiagnosticCheckNaN}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"MakeFromEuler", FQuatS_MakeFromEuler}, - {"FindBetween", FQuatS_FindBetween}, {"FindBetweenNormals", FQuatS_FindBetweenNormals}, - {"FindBetweenVectors", FQuatS_FindBetweenVectors}, {"Error", FQuatS_Error}, - {"ErrorAutoNormalize", FQuatS_ErrorAutoNormalize}, {"FastLerp", FQuatS_FastLerp}, {"FastBilerp", FQuatS_FastBilerp}, - {"Slerp_NotNormalized", FQuatS_Slerp_NotNormalized}, {"Slerp", FQuatS_Slerp}, - {"SlerpFullPath_NotNormalized", FQuatS_SlerpFullPath_NotNormalized}, {"SlerpFullPath", FQuatS_SlerpFullPath}, - {"Squad", FQuatS_Squad}, {"SquadFullPath", FQuatS_SquadFullPath}, {"CalcTangents", FQuatS_CalcTangents}, {0, 0}}; - - Def.UETypeName = "Quat"; - - Def.SetInitialize(_FQuatNew_); - Def.Finalize = _FQuatDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FQuat), MakeConstructor(FQuat, EForceInit), + MakeConstructor(FQuat, float, float, float, float), MakeConstructor(FQuat, const FMatrix&), + MakeConstructor(FQuat, const FRotator&), MakeConstructor(FQuat, FVector, float))) + .Property("X", MakeProperty(&FQuat::X)) + .Property("Y", MakeProperty(&FQuat::Y)) + .Property("Z", MakeProperty(&FQuat::Z)) + .Property("W", MakeProperty(&FQuat::W)) + .Method("op_Addition", MakeFunction(&FQuat::operator+)) + .Method("op_Subtraction", SelectFunction(FQuat(FQuat::*)(const FQuat& Q) const, &FQuat::operator-)) + .Method("Equals", MakeFunction(&FQuat::Equals)) + .Method("IsIdentity", MakeFunction(&FQuat::IsIdentity)) + .Method("op_Multiply", CombineOverloads(MakeOverload(FQuat(FQuat::*)(const FQuat&) const, &FQuat::operator*), + MakeOverload(FVector(FQuat::*)(const FVector&) const, &FQuat::operator*), + MakeOverload(FQuat(FQuat::*)(const float) const, &FQuat::operator*))) + .Method("op_Division", SelectFunction(FQuat(FQuat::*)(const float Scale) const, &FQuat::operator/)) + .Method("op_Equality", MakeFunction(&FQuat::operator==)) + .Method("op_Inequality", MakeFunction(&FQuat::operator!=)) + .Method("op_BitwiseOr", MakeFunction(&FQuat::operator|)) + .Function("MakeFromEuler", MakeFunction(&FQuat::MakeFromEuler)) + .Method("Euler", MakeFunction(&FQuat::Euler)) + .Method("Normalize", MakeFunction(&FQuat::Normalize)) + .Method("GetNormalized", MakeFunction(&FQuat::GetNormalized)) + .Method("IsNormalized", MakeFunction(&FQuat::IsNormalized)) + .Method("Size", MakeFunction(&FQuat::Size)) + .Method("SizeSquared", MakeFunction(&FQuat::SizeSquared)) + .Method("GetAngle", MakeFunction(&FQuat::GetAngle)) + .Method("ToAxisAndAngle", SelectFunction(void (FQuat::*)(FVector & Axis, float& Angle) const, &FQuat::ToAxisAndAngle)) + .Method("ToSwingTwist", MakeFunction(&FQuat::ToSwingTwist)) + .Method("RotateVector", MakeFunction(&FQuat::RotateVector)) + .Method("UnrotateVector", MakeFunction(&FQuat::UnrotateVector)) + .Method("Log", MakeFunction(&FQuat::Log)) + .Method("Exp", MakeFunction(&FQuat::Exp)) + .Method("Inverse", MakeFunction(&FQuat::Inverse)) + .Method("EnforceShortestArcWith", MakeFunction(&FQuat::EnforceShortestArcWith)) + .Method("GetAxisX", MakeFunction(&FQuat::GetAxisX)) + .Method("GetAxisY", MakeFunction(&FQuat::GetAxisY)) + .Method("GetAxisZ", MakeFunction(&FQuat::GetAxisZ)) + .Method("GetForwardVector", MakeFunction(&FQuat::GetForwardVector)) + .Method("GetRightVector", MakeFunction(&FQuat::GetRightVector)) + .Method("GetUpVector", MakeFunction(&FQuat::GetUpVector)) + .Method("Vector", MakeFunction(&FQuat::Vector)) + .Method("Rotator", MakeFunction(&FQuat::Rotator)) + .Method("GetRotationAxis", MakeFunction(&FQuat::GetRotationAxis)) + .Method("AngularDistance", MakeFunction(&FQuat::AngularDistance)) + .Method("ContainsNaN", MakeFunction(&FQuat::ContainsNaN)) + .Method("ToString", MakeFunction(&FQuat::ToString)) + .Method("InitFromString", MakeFunction(&FQuat::InitFromString)) + .Method("DiagnosticCheckNaN", CombineOverloads(MakeOverload(void (FQuat::*)() const, &FQuat::DiagnosticCheckNaN), + MakeOverload(void (FQuat::*)(const TCHAR*) const, &FQuat::DiagnosticCheckNaN))) + .Function("FindBetween", MakeFunction(&FQuat::FindBetween)) + .Function("FindBetweenNormals", MakeFunction(&FQuat::FindBetweenNormals)) + .Function("FindBetweenVectors", MakeFunction(&FQuat::FindBetweenVectors)) + .Function("Error", MakeFunction(&FQuat::Error)) + .Function("ErrorAutoNormalize", MakeFunction(&FQuat::ErrorAutoNormalize)) + .Function("FastLerp", MakeFunction(&FQuat::FastLerp)) + .Function("FastBilerp", MakeFunction(&FQuat::FastBilerp)) + .Function("Slerp_NotNormalized", MakeFunction(&FQuat::Slerp_NotNormalized)) + .Function("Slerp", MakeFunction(&FQuat::Slerp)) + .Function("SlerpFullPath_NotNormalized", MakeFunction(&FQuat::SlerpFullPath_NotNormalized)) + .Function("SlerpFullPath", MakeFunction(&FQuat::SlerpFullPath)) + .Function("Squad", MakeFunction(&FQuat::Squad)) + .Function("SquadFullPath", MakeFunction(&FQuat::SquadFullPath)) + .Function("CalcTangents", MakeFunction(&FQuat::CalcTangents)) + .Register(); } }; -AutoRegisterForFQuat _AutoRegisterForFQuat_; \ No newline at end of file +AutoRegisterForFQuat _AutoRegisterForFQuat_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FRotator_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FRotator_Wrap.cpp index 2e91a03537..d319e978c9 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FRotator_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FRotator_Wrap.cpp @@ -8,1240 +8,60 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator*= FRotator (float) __attribute__((thiscall)) - -// unsupported method : operator+= FRotator (const FRotator &) __attribute__((thiscall)) - -// unsupported method : operator-= FRotator (const FRotator &) __attribute__((thiscall)) - -static void* _FRotatorNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FRotator* Obj = new FRotator(); - - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - FRotator* Obj = new FRotator(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - FRotator* Obj = new FRotator(Arg0, Arg1, Arg2); - - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FRotator* Obj = new FRotator(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FRotator* Obj = new FRotator(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FRotatorDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FRotator* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FRotatorDelete_:%p"), Self); - delete Self; -} -static void FRotatorM_DiagnosticCheckNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_DiagnosticCheckNaN] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_IsNearlyZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_IsNearlyZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNearlyZero(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_IsZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_IsZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsZero(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Add(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::M_Add] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Add(Arg0, Arg1, Arg2); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetInverse(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetInverse] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetInverse(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GridSnap(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GridSnap] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GridSnap(*Arg0); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Vector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Vector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Vector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Quaternion(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Quaternion] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Quaternion(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Euler(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Euler] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Euler(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_RotateVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_RotateVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->RotateVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_UnrotateVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_UnrotateVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->UnrotateVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Clamp(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Clamp] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Clamp(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetNormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetNormalized(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetDenormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetDenormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetDenormalized(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetComponentForAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetComponentForAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetComponentForAxis(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_SetComponentForAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_SetComponentForAxis] Attempt to access a NULL self pointer"); - return; - } - Self->SetComponentForAxis(Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_Normalize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_Normalize] Attempt to access a NULL self pointer"); - return; - } - Self->Normalize(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetWindingAndRemainder(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked())) - { - FRotator* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - FRotator* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetWindingAndRemainder] Attempt to access a NULL self pointer"); - return; - } - Self->GetWindingAndRemainder(*Arg0, *Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetManhattanDistance(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetManhattanDistance] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetManhattanDistance(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_GetEquivalentRotator(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_GetEquivalentRotator] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetEquivalentRotator(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_SetClosestToMe(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked())) - { - FRotator* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_SetClosestToMe] Attempt to access a NULL self pointer"); - return; - } - Self->SetClosestToMe(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_ToCompactString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_ToCompactString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToCompactString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorM_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FRotator::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_ClampAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::ClampAxis(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_NormalizeAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::NormalizeAxis(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_CompressAxisToByte(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::CompressAxisToByte(Arg0); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_DecompressAxisFromByte(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - uint8 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::DecompressAxisFromByte(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_CompressAxisToShort(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::CompressAxisToShort(Arg0); - auto V8Result = v8::Integer::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_DecompressAxisFromShort(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - uint16 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto MethodResult = FRotator::DecompressAxisFromShort(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FRotatorS_MakeFromEuler(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FRotator::MakeFromEuler(*Arg0); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FRotatorPitchGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Pitch] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Pitch); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FRotatorPitchSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Pitch] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Pitch = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FRotatorYawGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Yaw] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Yaw); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FRotatorYawSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Yaw] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Yaw = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FRotatorRollGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Roll] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Roll); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FRotatorRollSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FRotator::Roll] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Roll = Value->ToNumber(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFRotator { AutoRegisterForFRotator() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"Pitch", _FRotatorPitchGet_, _FRotatorPitchSet_}, - {"Yaw", _FRotatorYawGet_, _FRotatorYawSet_}, {"Roll", _FRotatorRollGet_, _FRotatorRollSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"DiagnosticCheckNaN", FRotatorM_DiagnosticCheckNaN}, - {"op_Addition", FRotatorM_op_Addition}, {"op_Subtraction", FRotatorM_op_Subtraction}, - {"op_Multiply", FRotatorM_op_Multiply}, {"op_Equality", FRotatorM_op_Equality}, - {"op_Inequality", FRotatorM_op_Inequality}, {"IsNearlyZero", FRotatorM_IsNearlyZero}, {"IsZero", FRotatorM_IsZero}, - {"Equals", FRotatorM_Equals}, {"Add", FRotatorM_Add}, {"GetInverse", FRotatorM_GetInverse}, - {"GridSnap", FRotatorM_GridSnap}, {"Vector", FRotatorM_Vector}, {"Quaternion", FRotatorM_Quaternion}, - {"Euler", FRotatorM_Euler}, {"RotateVector", FRotatorM_RotateVector}, {"UnrotateVector", FRotatorM_UnrotateVector}, - {"Clamp", FRotatorM_Clamp}, {"GetNormalized", FRotatorM_GetNormalized}, {"GetDenormalized", FRotatorM_GetDenormalized}, - {"GetComponentForAxis", FRotatorM_GetComponentForAxis}, {"SetComponentForAxis", FRotatorM_SetComponentForAxis}, - {"Normalize", FRotatorM_Normalize}, {"GetWindingAndRemainder", FRotatorM_GetWindingAndRemainder}, - {"GetManhattanDistance", FRotatorM_GetManhattanDistance}, {"GetEquivalentRotator", FRotatorM_GetEquivalentRotator}, - {"SetClosestToMe", FRotatorM_SetClosestToMe}, {"ToString", FRotatorM_ToString}, - {"ToCompactString", FRotatorM_ToCompactString}, {"InitFromString", FRotatorM_InitFromString}, - {"ContainsNaN", FRotatorM_ContainsNaN}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"ClampAxis", FRotatorS_ClampAxis}, - {"NormalizeAxis", FRotatorS_NormalizeAxis}, {"CompressAxisToByte", FRotatorS_CompressAxisToByte}, - {"DecompressAxisFromByte", FRotatorS_DecompressAxisFromByte}, {"CompressAxisToShort", FRotatorS_CompressAxisToShort}, - {"DecompressAxisFromShort", FRotatorS_DecompressAxisFromShort}, {"MakeFromEuler", FRotatorS_MakeFromEuler}, {0, 0}}; - - Def.UETypeName = "Rotator"; - - Def.SetInitialize(_FRotatorNew_); - Def.Finalize = _FRotatorDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FRotator), MakeConstructor(FRotator, float), + MakeConstructor(FRotator, float, float, float), MakeConstructor(FRotator, EForceInit), + MakeConstructor(FRotator, const FQuat&))) + .Property("Pitch", MakeProperty(&FRotator::Pitch)) + .Property("Yaw", MakeProperty(&FRotator::Yaw)) + .Property("Roll", MakeProperty(&FRotator::Roll)) + .Method("DiagnosticCheckNaN", CombineOverloads(MakeOverload(void (FRotator::*)() const, &FRotator::DiagnosticCheckNaN), + MakeOverload(void (FRotator::*)(const TCHAR*) const, &FRotator::DiagnosticCheckNaN))) + .Method("op_Addition", MakeFunction(&FRotator::operator+)) + .Method("op_Subtraction", MakeFunction(&FRotator::operator-)) + .Method("op_Multiply", SelectFunction(FRotator(FRotator::*)(float Scale) const, &FRotator::operator*)) + .Method("op_Equality", MakeFunction(&FRotator::operator==)) + .Method("op_Inequality", MakeFunction(&FRotator::operator!=)) + .Method("IsNearlyZero", MakeFunction(&FRotator::IsNearlyZero)) + .Method("IsZero", MakeFunction(&FRotator::IsZero)) + .Method("Equals", MakeFunction(&FRotator::Equals)) + .Method("Add", MakeFunction(&FRotator::Add)) + .Method("GetInverse", MakeFunction(&FRotator::GetInverse)) + .Method("GridSnap", MakeFunction(&FRotator::GridSnap)) + .Method("Vector", MakeFunction(&FRotator::Vector)) + .Method("Quaternion", MakeFunction(&FRotator::Quaternion)) + .Method("Euler", MakeFunction(&FRotator::Euler)) + .Method("RotateVector", MakeFunction(&FRotator::RotateVector)) + .Method("UnrotateVector", MakeFunction(&FRotator::UnrotateVector)) + .Method("Clamp", MakeFunction(&FRotator::Clamp)) + .Method("GetNormalized", MakeFunction(&FRotator::GetNormalized)) + .Method("GetDenormalized", MakeFunction(&FRotator::GetDenormalized)) + .Method("GetComponentForAxis", MakeFunction(&FRotator::GetComponentForAxis)) + .Method("SetComponentForAxis", MakeFunction(&FRotator::SetComponentForAxis)) + .Method("Normalize", MakeFunction(&FRotator::Normalize)) + .Method("GetWindingAndRemainder", MakeFunction(&FRotator::GetWindingAndRemainder)) + .Method("GetManhattanDistance", MakeFunction(&FRotator::GetManhattanDistance)) + .Method("GetEquivalentRotator", MakeFunction(&FRotator::GetEquivalentRotator)) + .Method("SetClosestToMe", MakeFunction(&FRotator::SetClosestToMe)) + .Method("ToString", MakeFunction(&FRotator::ToString)) + .Method("ToCompactString", MakeFunction(&FRotator::ToCompactString)) + .Method("InitFromString", MakeFunction(&FRotator::InitFromString)) + .Method("ContainsNaN", MakeFunction(&FRotator::ContainsNaN)) + .Function("ClampAxis", MakeFunction(&FRotator::ClampAxis)) + .Function("NormalizeAxis", MakeFunction(&FRotator::NormalizeAxis)) + .Function("CompressAxisToByte", MakeFunction(&FRotator::CompressAxisToByte)) + .Function("DecompressAxisFromByte", MakeFunction(&FRotator::DecompressAxisFromByte)) + .Function("CompressAxisToShort", MakeFunction(&FRotator::CompressAxisToShort)) + .Function("DecompressAxisFromShort", MakeFunction(&FRotator::DecompressAxisFromShort)) + .Function("MakeFromEuler", MakeFunction(&FRotator::MakeFromEuler)) + .Register(); } }; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FTransform_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FTransform_Wrap.cpp index ed270c89fa..bd68fab261 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FTransform_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FTransform_Wrap.cpp @@ -8,2466 +8,117 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : DebugEqualMatrix bool (const FMatrix &) __attribute__((thiscall)) const - -// unsupported method : operator= FTransform &(const FTransform &) __attribute__((thiscall)) - -// unsupported method : ToMatrixWithScale FMatrix () __attribute__((thiscall)) const - -// unsupported method : ToInverseMatrixWithScale FMatrix () __attribute__((thiscall)) const - -// unsupported method : ToMatrixNoScale FMatrix () __attribute__((thiscall)) const - -// unsupported method : operator+= FTransform &(const FTransform &) __attribute__((thiscall)) - -// unsupported method : operator*= FTransform &(const ScalarRegister &) __attribute__((thiscall)) - -// unsupported method : operator*= void (const FTransform &) __attribute__((thiscall)) - -// unsupported method : operator*= void (const FQuat &) __attribute__((thiscall)) - -static void* _FTransformNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FTransform* Obj = new FTransform(); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0, *Arg1, *Arg2); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FRotator* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0, *Arg1, *Arg2); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - ENoInit Arg0 = ENoInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FTransform* Obj = new FTransform(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FVector* Arg3 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - FTransform* Obj = new FTransform(*Arg0, *Arg1, *Arg2, *Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FTransformNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FTransformDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FTransform* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FTransformDelete_:%p"), Self); - delete Self; -} -static void FTransformM_DiagnosticCheckNaN_Translate(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DiagnosticCheckNaN_Translate] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN_Translate(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_DiagnosticCheckNaN_Rotate(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DiagnosticCheckNaN_Rotate] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN_Rotate(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_DiagnosticCheckNaN_Scale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DiagnosticCheckNaN_Scale3D] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN_Scale3D(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_DiagnosticCheckNaN_All(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DiagnosticCheckNaN_All] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN_All(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_DiagnosticCheck_IsValid(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DiagnosticCheck_IsValid] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheck_IsValid(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_DebugPrint(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_DebugPrint] Attempt to access a NULL self pointer"); - return; - } - Self->DebugPrint(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_ToHumanReadableString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ToHumanReadableString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToHumanReadableString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Inverse(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Inverse] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Inverse(); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Blend(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Blend] Attempt to access a NULL self pointer"); - return; - } - Self->Blend(*Arg0, *Arg1, Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_BlendWith(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_BlendWith] Attempt to access a NULL self pointer"); - return; - } - Self->BlendWith(*Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_AnyHasNegativeScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FTransform::AnyHasNegativeScale(*Arg0, *Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_ScaleTranslation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ScaleTranslation] Attempt to access a NULL self pointer"); - return; - } - Self->ScaleTranslation(*Arg0); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ScaleTranslation] Attempt to access a NULL self pointer"); - return; - } - Self->ScaleTranslation(Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_RemoveScaling(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_RemoveScaling] Attempt to access a NULL self pointer"); - return; - } - Self->RemoveScaling(Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetMaximumAxisScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetMaximumAxisScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMaximumAxisScale(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetMinimumAxisScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetMinimumAxisScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMinimumAxisScale(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetRelativeTransform(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetRelativeTransform] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRelativeTransform(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetRelativeTransformReverse(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetRelativeTransformReverse] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRelativeTransformReverse(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetToRelativeTransform(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetToRelativeTransform] Attempt to access a NULL self pointer"); - return; - } - Self->SetToRelativeTransform(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformFVector4(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformFVector4] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformFVector4(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformFVector4NoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformFVector4NoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformFVector4NoScale(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformPosition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformPosition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformPosition(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformPositionNoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformPositionNoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformPositionNoScale(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InverseTransformPosition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InverseTransformPosition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InverseTransformPosition(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InverseTransformPositionNoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InverseTransformPositionNoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InverseTransformPositionNoScale(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformVectorNoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformVectorNoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformVectorNoScale(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InverseTransformVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InverseTransformVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InverseTransformVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InverseTransformVectorNoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InverseTransformVectorNoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InverseTransformVectorNoScale(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TransformRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TransformRotation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TransformRotation(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_InverseTransformRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_InverseTransformRotation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InverseTransformRotation(*Arg0); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetScaled(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetScaled] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetScaled(Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetScaled] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetScaled(*Arg0); - void* Ptr = new FTransform(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetScaledAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetScaledAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetScaledAxis(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetUnitAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetUnitAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetUnitAxis(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Mirror(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - EAxis::Type Arg1 = EAxis::Type(Info[1]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Mirror] Attempt to access a NULL self pointer"); - return; - } - Self->Mirror(Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_GetSafeScaleReciprocal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FTransform::GetSafeScaleReciprocal(*Arg0, Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetLocation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetLocation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetLocation(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Rotator(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Rotator] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Rotator(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetDeterminant(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetDeterminant] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetDeterminant(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetLocation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetLocation] Attempt to access a NULL self pointer"); - return; - } - Self->SetLocation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_IsValid(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_IsValid] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsValid(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_AreRotationsEqual(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FTransform::AreRotationsEqual(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_AreTranslationsEqual(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FTransform::AreTranslationsEqual(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_AreScale3DsEqual(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FTransform::AreScale3DsEqual(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_RotationEquals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_RotationEquals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->RotationEquals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_TranslationEquals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_TranslationEquals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->TranslationEquals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Scale3DEquals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Scale3DEquals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Scale3DEquals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_EqualsNoScale(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_EqualsNoScale] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->EqualsNoScale(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - FTransform::Multiply(Arg0, Arg1, Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetComponents(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetComponents] Attempt to access a NULL self pointer"); - return; - } - Self->SetComponents(*Arg0, *Arg1, *Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetIdentity(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetIdentity] Attempt to access a NULL self pointer"); - return; - } - Self->SetIdentity(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_MultiplyScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_MultiplyScale3D] Attempt to access a NULL self pointer"); - return; - } - Self->MultiplyScale3D(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetTranslation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetTranslation] Attempt to access a NULL self pointer"); - return; - } - Self->SetTranslation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_CopyTranslation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_CopyTranslation] Attempt to access a NULL self pointer"); - return; - } - Self->CopyTranslation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_ConcatenateRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_ConcatenateRotation] Attempt to access a NULL self pointer"); - return; - } - Self->ConcatenateRotation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_AddToTranslation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_AddToTranslation] Attempt to access a NULL self pointer"); - return; - } - Self->AddToTranslation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_AddTranslations(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FTransform::AddTranslations(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformS_SubtractTranslations(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FTransform* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FTransform::SubtractTranslations(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FQuat* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetRotation] Attempt to access a NULL self pointer"); - return; - } - Self->SetRotation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_CopyRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_CopyRotation] Attempt to access a NULL self pointer"); - return; - } - Self->CopyRotation(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetScale3D] Attempt to access a NULL self pointer"); - return; - } - Self->SetScale3D(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_CopyScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_CopyScale3D] Attempt to access a NULL self pointer"); - return; - } - Self->CopyScale3D(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_SetTranslationAndScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_SetTranslationAndScale3D] Attempt to access a NULL self pointer"); - return; - } - Self->SetTranslationAndScale3D(*Arg0, *Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_Accumulate(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_Accumulate] Attempt to access a NULL self pointer"); - return; - } - Self->Accumulate(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_NormalizeRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_NormalizeRotation] Attempt to access a NULL self pointer"); - return; - } - Self->NormalizeRotation(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_IsRotationNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_IsRotationNormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsRotationNormalized(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetRotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetRotation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRotation(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetTranslation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetTranslation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetTranslation(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_GetScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_GetScale3D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetScale3D(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_CopyRotationPart(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_CopyRotationPart] Attempt to access a NULL self pointer"); - return; - } - Self->CopyRotationPart(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FTransformM_CopyTranslationAndScale3D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FTransform* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FTransform::M_CopyTranslationAndScale3D] Attempt to access a NULL self pointer"); - return; - } - Self->CopyTranslationAndScale3D(*Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFTransform { AutoRegisterForFTransform() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = { - {"DiagnosticCheckNaN_Translate", FTransformM_DiagnosticCheckNaN_Translate}, - {"DiagnosticCheckNaN_Rotate", FTransformM_DiagnosticCheckNaN_Rotate}, - {"DiagnosticCheckNaN_Scale3D", FTransformM_DiagnosticCheckNaN_Scale3D}, - {"DiagnosticCheckNaN_All", FTransformM_DiagnosticCheckNaN_All}, - {"DiagnosticCheck_IsValid", FTransformM_DiagnosticCheck_IsValid}, {"DebugPrint", FTransformM_DebugPrint}, - {"ToHumanReadableString", FTransformM_ToHumanReadableString}, {"ToString", FTransformM_ToString}, - {"InitFromString", FTransformM_InitFromString}, {"Inverse", FTransformM_Inverse}, {"Blend", FTransformM_Blend}, - {"BlendWith", FTransformM_BlendWith}, {"op_Addition", FTransformM_op_Addition}, - {"op_Multiply", FTransformM_op_Multiply}, {"ScaleTranslation", FTransformM_ScaleTranslation}, - {"RemoveScaling", FTransformM_RemoveScaling}, {"GetMaximumAxisScale", FTransformM_GetMaximumAxisScale}, - {"GetMinimumAxisScale", FTransformM_GetMinimumAxisScale}, {"GetRelativeTransform", FTransformM_GetRelativeTransform}, - {"GetRelativeTransformReverse", FTransformM_GetRelativeTransformReverse}, - {"SetToRelativeTransform", FTransformM_SetToRelativeTransform}, {"TransformFVector4", FTransformM_TransformFVector4}, - {"TransformFVector4NoScale", FTransformM_TransformFVector4NoScale}, - {"TransformPosition", FTransformM_TransformPosition}, - {"TransformPositionNoScale", FTransformM_TransformPositionNoScale}, - {"InverseTransformPosition", FTransformM_InverseTransformPosition}, - {"InverseTransformPositionNoScale", FTransformM_InverseTransformPositionNoScale}, - {"TransformVector", FTransformM_TransformVector}, {"TransformVectorNoScale", FTransformM_TransformVectorNoScale}, - {"InverseTransformVector", FTransformM_InverseTransformVector}, - {"InverseTransformVectorNoScale", FTransformM_InverseTransformVectorNoScale}, - {"TransformRotation", FTransformM_TransformRotation}, - {"InverseTransformRotation", FTransformM_InverseTransformRotation}, {"GetScaled", FTransformM_GetScaled}, - {"GetScaledAxis", FTransformM_GetScaledAxis}, {"GetUnitAxis", FTransformM_GetUnitAxis}, {"Mirror", FTransformM_Mirror}, - {"GetLocation", FTransformM_GetLocation}, {"Rotator", FTransformM_Rotator}, - {"GetDeterminant", FTransformM_GetDeterminant}, {"SetLocation", FTransformM_SetLocation}, - {"ContainsNaN", FTransformM_ContainsNaN}, {"IsValid", FTransformM_IsValid}, - {"RotationEquals", FTransformM_RotationEquals}, {"TranslationEquals", FTransformM_TranslationEquals}, - {"Scale3DEquals", FTransformM_Scale3DEquals}, {"Equals", FTransformM_Equals}, - {"EqualsNoScale", FTransformM_EqualsNoScale}, {"SetComponents", FTransformM_SetComponents}, - {"SetIdentity", FTransformM_SetIdentity}, {"MultiplyScale3D", FTransformM_MultiplyScale3D}, - {"SetTranslation", FTransformM_SetTranslation}, {"CopyTranslation", FTransformM_CopyTranslation}, - {"ConcatenateRotation", FTransformM_ConcatenateRotation}, {"AddToTranslation", FTransformM_AddToTranslation}, - {"SetRotation", FTransformM_SetRotation}, {"CopyRotation", FTransformM_CopyRotation}, - {"SetScale3D", FTransformM_SetScale3D}, {"CopyScale3D", FTransformM_CopyScale3D}, - {"SetTranslationAndScale3D", FTransformM_SetTranslationAndScale3D}, {"Accumulate", FTransformM_Accumulate}, - {"NormalizeRotation", FTransformM_NormalizeRotation}, {"IsRotationNormalized", FTransformM_IsRotationNormalized}, - {"GetRotation", FTransformM_GetRotation}, {"GetTranslation", FTransformM_GetTranslation}, - {"GetScale3D", FTransformM_GetScale3D}, {"CopyRotationPart", FTransformM_CopyRotationPart}, - {"CopyTranslationAndScale3D", FTransformM_CopyTranslationAndScale3D}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"AnyHasNegativeScale", FTransformS_AnyHasNegativeScale}, - {"GetSafeScaleReciprocal", FTransformS_GetSafeScaleReciprocal}, {"AreRotationsEqual", FTransformS_AreRotationsEqual}, - {"AreTranslationsEqual", FTransformS_AreTranslationsEqual}, {"AreScale3DsEqual", FTransformS_AreScale3DsEqual}, - {"Multiply", FTransformS_Multiply}, {"AddTranslations", FTransformS_AddTranslations}, - {"SubtractTranslations", FTransformS_SubtractTranslations}, {0, 0}}; - - Def.UETypeName = "Transform"; - - Def.SetInitialize(_FTransformNew_); - Def.Finalize = _FTransformDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FTransform), MakeConstructor(FTransform, const FVector&), + MakeConstructor(FTransform, const FQuat&), MakeConstructor(FTransform, const FRotator&), + MakeConstructor(FTransform, const FQuat&, const FVector&, const FVector&), + MakeConstructor(FTransform, const VectorRegister&, const VectorRegister&, const VectorRegister&), + MakeConstructor(FTransform, const FRotator&, const FVector&, const FVector&), MakeConstructor(FTransform, ENoInit), + MakeConstructor(FTransform, const FMatrix&), + MakeConstructor(FTransform, const FVector&, const FVector&, const FVector&, const FVector&))) + .Method("DiagnosticCheckNaN_Translate", MakeFunction(&FTransform::DiagnosticCheckNaN_Translate)) + .Method("DiagnosticCheckNaN_Rotate", MakeFunction(&FTransform::DiagnosticCheckNaN_Rotate)) + .Method("DiagnosticCheckNaN_Scale3D", MakeFunction(&FTransform::DiagnosticCheckNaN_Scale3D)) + .Method("DiagnosticCheckNaN_All", MakeFunction(&FTransform::DiagnosticCheckNaN_All)) + .Method("DiagnosticCheck_IsValid", MakeFunction(&FTransform::DiagnosticCheck_IsValid)) + .Method("DebugPrint", MakeFunction(&FTransform::DebugPrint)) + .Method("ToHumanReadableString", MakeFunction(&FTransform::ToHumanReadableString)) + .Method("ToString", MakeFunction(&FTransform::ToString)) + .Method("InitFromString", MakeFunction(&FTransform::InitFromString)) + .Method("Inverse", MakeFunction(&FTransform::Inverse)) + .Method("Blend", MakeFunction(&FTransform::Blend)) + .Method("BlendWith", MakeFunction(&FTransform::BlendWith)) + .Method("op_Addition", MakeFunction(&FTransform::operator+)) + .Method("op_Multiply", + CombineOverloads(MakeOverload(FTransform(FTransform::*)(const ScalarRegister&) const, &FTransform::operator*), + MakeOverload(FTransform(FTransform::*)(const FTransform&) const, &FTransform::operator*), + MakeOverload(FTransform(FTransform::*)(const FQuat&) const, &FTransform::operator*))) + .Function("AnyHasNegativeScale", MakeFunction(&FTransform::AnyHasNegativeScale)) + .Method("RemoveScaling", MakeFunction(&FTransform::RemoveScaling)) + .Method("GetMaximumAxisScale", MakeFunction(&FTransform::GetMaximumAxisScale)) + .Method("GetMinimumAxisScale", MakeFunction(&FTransform::GetMinimumAxisScale)) + .Method("GetRelativeTransform", MakeFunction(&FTransform::GetRelativeTransform)) + .Method("GetRelativeTransformReverse", MakeFunction(&FTransform::GetRelativeTransformReverse)) + .Method("SetToRelativeTransform", MakeFunction(&FTransform::SetToRelativeTransform)) + .Method("TransformFVector4", MakeFunction(&FTransform::TransformFVector4)) + .Method("TransformFVector4NoScale", MakeFunction(&FTransform::TransformFVector4NoScale)) + .Method("TransformPosition", MakeFunction(&FTransform::TransformPosition)) + .Method("TransformPositionNoScale", MakeFunction(&FTransform::TransformPositionNoScale)) + .Method("InverseTransformPosition", MakeFunction(&FTransform::InverseTransformPosition)) + .Method("InverseTransformPositionNoScale", MakeFunction(&FTransform::InverseTransformPositionNoScale)) + .Method("TransformVector", MakeFunction(&FTransform::TransformVector)) + .Method("TransformVectorNoScale", MakeFunction(&FTransform::TransformVectorNoScale)) + .Method("InverseTransformVector", MakeFunction(&FTransform::InverseTransformVector)) + .Method("InverseTransformVectorNoScale", MakeFunction(&FTransform::InverseTransformVectorNoScale)) + .Method("TransformRotation", MakeFunction(&FTransform::TransformRotation)) + .Method("InverseTransformRotation", MakeFunction(&FTransform::InverseTransformRotation)) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("ScaleTranslation", + CombineOverloads(MakeOverload(void (FTransform::*)(const FVector&), &FTransform::ScaleTranslation), + MakeOverload(void (FTransform::*)(const double&), &FTransform::ScaleTranslation))) + .Method("GetScaled", CombineOverloads(MakeOverload(FTransform(FTransform::*)(double) const, &FTransform::GetScaled), + MakeOverload(FTransform(FTransform::*)(FVector) const, &FTransform::GetScaled))) + .Function( + "GetSafeScaleReciprocal", SelectFunction(FVector(*)(const FVector&, double), &FTransform::GetSafeScaleReciprocal)) +#else + .Method("ScaleTranslation", + CombineOverloads(MakeOverload(void (FTransform::*)(const FVector&), &FTransform::ScaleTranslation), + MakeOverload(void (FTransform::*)(const float&), &FTransform::ScaleTranslation))) + .Method("GetScaled", CombineOverloads(MakeOverload(FTransform(FTransform::*)(float) const, &FTransform::GetScaled), + MakeOverload(FTransform(FTransform::*)(FVector) const, &FTransform::GetScaled))) + .Function( + "GetSafeScaleReciprocal", SelectFunction(FVector(*)(const FVector&, float), &FTransform::GetSafeScaleReciprocal)) +#endif + .Method("GetScaledAxis", MakeFunction(&FTransform::GetScaledAxis)) + .Method("GetUnitAxis", MakeFunction(&FTransform::GetUnitAxis)) + .Method("Mirror", MakeFunction(&FTransform::Mirror)) + .Method("GetLocation", MakeFunction(&FTransform::GetLocation)) + .Method("Rotator", MakeFunction(&FTransform::Rotator)) + .Method("GetDeterminant", MakeFunction(&FTransform::GetDeterminant)) + .Method("SetLocation", MakeFunction(&FTransform::SetLocation)) + .Method("ContainsNaN", MakeFunction(&FTransform::ContainsNaN)) + .Method("IsValid", MakeFunction(&FTransform::IsValid)) + .Function("AreRotationsEqual", MakeFunction(&FTransform::AreRotationsEqual)) + .Function("AreTranslationsEqual", MakeFunction(&FTransform::AreTranslationsEqual)) + .Function("AreScale3DsEqual", MakeFunction(&FTransform::AreScale3DsEqual)) + .Method("RotationEquals", MakeFunction(&FTransform::RotationEquals)) + .Method("TranslationEquals", MakeFunction(&FTransform::TranslationEquals)) + .Method("Scale3DEquals", MakeFunction(&FTransform::Scale3DEquals)) + .Method("Equals", MakeFunction(&FTransform::Equals)) + .Method("EqualsNoScale", MakeFunction(&FTransform::EqualsNoScale)) + .Function("Multiply", MakeFunction(&FTransform::Multiply)) + .Method("SetComponents", MakeFunction(&FTransform::SetComponents)) + .Method("SetIdentity", MakeFunction(&FTransform::SetIdentity)) + .Method("MultiplyScale3D", MakeFunction(&FTransform::MultiplyScale3D)) + .Method("SetTranslation", MakeFunction(&FTransform::SetTranslation)) + .Method("CopyTranslation", MakeFunction(&FTransform::CopyTranslation)) + .Method("ConcatenateRotation", MakeFunction(&FTransform::ConcatenateRotation)) + .Method("AddToTranslation", MakeFunction(&FTransform::AddToTranslation)) + .Function("AddTranslations", MakeFunction(&FTransform::AddTranslations)) + .Function("SubtractTranslations", MakeFunction(&FTransform::SubtractTranslations)) + .Method("SetRotation", MakeFunction(&FTransform::SetRotation)) + .Method("CopyRotation", MakeFunction(&FTransform::CopyRotation)) + .Method("SetScale3D", MakeFunction(&FTransform::SetScale3D)) + .Method("CopyScale3D", MakeFunction(&FTransform::CopyScale3D)) + .Method("SetTranslationAndScale3D", MakeFunction(&FTransform::SetTranslationAndScale3D)) + .Method("Accumulate", + CombineOverloads(MakeOverload(void (FTransform::*)(const FTransform&), &FTransform::Accumulate), + MakeOverload(void (FTransform::*)(const FTransform&, const ScalarRegister&), &FTransform::Accumulate))) + .Method("NormalizeRotation", MakeFunction(&FTransform::NormalizeRotation)) + .Method("IsRotationNormalized", MakeFunction(&FTransform::IsRotationNormalized)) + .Method("GetRotation", MakeFunction(&FTransform::GetRotation)) + .Method("GetTranslation", MakeFunction(&FTransform::GetTranslation)) + .Method("GetScale3D", MakeFunction(&FTransform::GetScale3D)) + .Method("CopyRotationPart", MakeFunction(&FTransform::CopyRotationPart)) + .Method("CopyTranslationAndScale3D", MakeFunction(&FTransform::CopyTranslationAndScale3D)) + .Register(); } }; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector2D_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector2D_Wrap.cpp index d2b61536fd..d009cbbb9a 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector2D_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector2D_Wrap.cpp @@ -8,1423 +8,86 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator< bool (const FVector2D &) __attribute__((thiscall)) const - -// unsupported method : operator> bool (const FVector2D &) __attribute__((thiscall)) const - -// unsupported method : operator<= bool (const FVector2D &) __attribute__((thiscall)) const - -// unsupported method : operator>= bool (const FVector2D &) __attribute__((thiscall)) const - -// unsupported method : operator+= FVector2D (const FVector2D &) __attribute__((thiscall)) - -// unsupported method : operator-= FVector2D (const FVector2D &) __attribute__((thiscall)) - -// unsupported method : operator*= FVector2D (float) __attribute__((thiscall)) - -// unsupported method : operator/= FVector2D (float) __attribute__((thiscall)) - -// unsupported method : operator*= FVector2D (const FVector2D &) __attribute__((thiscall)) - -// unsupported method : operator/= FVector2D (const FVector2D &) __attribute__((thiscall)) - -static void* _FVector2DNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FVector2D* Obj = new FVector2D(); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - FVector2D* Obj = new FVector2D(Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector2D* Obj = new FVector2D(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FVector2D* Obj = new FVector2D(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - ENoInit Arg0 = ENoInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FVector2D* Obj = new FVector2D(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector2D* Obj = new FVector2D(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector2D* Obj = new FVector2D(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FVector2DDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FVector2D* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FVector2DDelete_:%p"), Self); - delete Self; -} -static void FVector2DM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(*Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_BitwiseOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_BitwiseOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator|(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_ExclusiveOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_ExclusiveOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator^(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_op_UnaryNegation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_op_UnaryNegation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_Component(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DS_DotProduct(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector2D::DotProduct(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DS_DistSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector2D::DistSquared(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DS_Distance(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector2D::Distance(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DS_CrossProduct(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector2D::CrossProduct(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_Set(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector2D::M_Set] Attempt to access a NULL self pointer"); - return; - } - Self->Set(Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMax(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetAbsMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetAbsMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAbsMax(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMin(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_SizeSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_SizeSquared] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetRotated(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetRotated] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetRotated(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetSafeNormal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetSafeNormal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSafeNormal(Arg0); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_Normalize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_Normalize] Attempt to access a NULL self pointer"); - return; - } - Self->Normalize(Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_IsNearlyZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_IsNearlyZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNearlyZero(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_ToDirectionAndLength(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsNumber()) - { - FVector2D* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - float Arg1 = PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_ToDirectionAndLength] Attempt to access a NULL self pointer"); - return; - } - Self->ToDirectionAndLength(*Arg0, Arg1); - - PUERTS_NAMESPACE::DataTransfer::UpdateRef(Isolate, Info[1], v8::Number::New(Isolate, Arg1)); - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_IsZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_IsZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsZero(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_IntPoint(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_IntPoint] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IntPoint(); - void* Ptr = new FIntPoint(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_RoundToVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_RoundToVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->RoundToVector(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_ClampAxes(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_ClampAxes] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ClampAxes(Arg0, Arg1); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetSignVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetSignVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSignVector(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_GetAbs(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_GetAbs] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAbs(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_DiagnosticCheckNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_DiagnosticCheckNaN] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector2DM_SphericalToUnitCartesian(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector2D::M_SphericalToUnitCartesian] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SphericalToUnitCartesian(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FVector2DXGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector2D::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector2DXSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector2D::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVector2DYGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector2D::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector2DYSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector2D::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToNumber(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFVector2D { AutoRegisterForFVector2D() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = { - {"X", _FVector2DXGet_, _FVector2DXSet_}, {"Y", _FVector2DYGet_, _FVector2DYSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Addition", FVector2DM_op_Addition}, - {"op_Subtraction", FVector2DM_op_Subtraction}, {"op_Multiply", FVector2DM_op_Multiply}, - {"op_Division", FVector2DM_op_Division}, {"op_BitwiseOr", FVector2DM_op_BitwiseOr}, - {"op_ExclusiveOr", FVector2DM_op_ExclusiveOr}, {"op_Equality", FVector2DM_op_Equality}, - {"op_Inequality", FVector2DM_op_Inequality}, {"op_UnaryNegation", FVector2DM_op_UnaryNegation}, - {"set_Item", FVector2DM_set_Item}, {"get_Item", FVector2DM_get_Item}, {"Component", FVector2DM_Component}, - {"Equals", FVector2DM_Equals}, {"Set", FVector2DM_Set}, {"GetMax", FVector2DM_GetMax}, - {"GetAbsMax", FVector2DM_GetAbsMax}, {"GetMin", FVector2DM_GetMin}, {"Size", FVector2DM_Size}, - {"SizeSquared", FVector2DM_SizeSquared}, {"GetRotated", FVector2DM_GetRotated}, - {"GetSafeNormal", FVector2DM_GetSafeNormal}, {"Normalize", FVector2DM_Normalize}, - {"IsNearlyZero", FVector2DM_IsNearlyZero}, {"ToDirectionAndLength", FVector2DM_ToDirectionAndLength}, - {"IsZero", FVector2DM_IsZero}, {"IntPoint", FVector2DM_IntPoint}, {"RoundToVector", FVector2DM_RoundToVector}, - {"ClampAxes", FVector2DM_ClampAxes}, {"GetSignVector", FVector2DM_GetSignVector}, {"GetAbs", FVector2DM_GetAbs}, - {"ToString", FVector2DM_ToString}, {"InitFromString", FVector2DM_InitFromString}, - {"DiagnosticCheckNaN", FVector2DM_DiagnosticCheckNaN}, {"ContainsNaN", FVector2DM_ContainsNaN}, - {"SphericalToUnitCartesian", FVector2DM_SphericalToUnitCartesian}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"DotProduct", FVector2DS_DotProduct}, - {"DistSquared", FVector2DS_DistSquared}, {"Distance", FVector2DS_Distance}, {"CrossProduct", FVector2DS_CrossProduct}, - {0, 0}}; - - Def.UETypeName = "Vector2D"; - - Def.SetInitialize(_FVector2DNew_); - Def.Finalize = _FVector2DDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FVector2D), MakeConstructor(FVector2D, float, float), + MakeConstructor(FVector2D, float), MakeConstructor(FVector2D, FIntPoint), MakeConstructor(FVector2D, EForceInit), + MakeConstructor(FVector2D, ENoInit), MakeConstructor(FVector2D, const FVector&), + MakeConstructor(FVector2D, const FVector4&))) + .Property("X", MakeProperty(&FVector2D::X)) + .Property("Y", MakeProperty(&FVector2D::Y)) + .Method("op_BitwiseOr", MakeFunction(&FVector2D::operator|)) + .Method("op_ExclusiveOr", MakeFunction(&FVector2D::operator^)) + .Method("op_Equality", MakeFunction(&FVector2D::operator==)) + .Method("op_Inequality", MakeFunction(&FVector2D::operator!=)) + .Method("op_UnaryNegation", SelectFunction(FVector2D(FVector2D::*)() const, &FVector2D::operator-)) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("op_Addition", + CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator+), + MakeOverload(FVector2D(FVector2D::*)(double) const, &FVector2D::operator+))) + .Method("op_Subtraction", + CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator-), + MakeOverload(FVector2D(FVector2D::*)(double) const, &FVector2D::operator-))) + .Method("op_Multiply", CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(double) const, &FVector2D::operator*), + MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator*))) + .Method("op_Division", CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(double) const, &FVector2D::operator/), + MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator/))) + .Method("set_Item", SelectFunction(double& (FVector2D::*) (int32), &FVector2D::operator[])) + .Method("get_Item", SelectFunction(double (FVector2D::*)(int32) const, &FVector2D::operator[])) + .Method("Component", CombineOverloads(MakeOverload(double& (FVector2D::*) (int32), &FVector2D::Component), + MakeOverload(double (FVector2D::*)(int32) const, &FVector2D::Component))) +#else + .Method("op_Addition", + CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator+), + MakeOverload(FVector2D(FVector2D::*)(float) const, &FVector2D::operator+))) + .Method("op_Subtraction", + CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator-), + MakeOverload(FVector2D(FVector2D::*)(float) const, &FVector2D::operator-))) + .Method("op_Multiply", CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(float) const, &FVector2D::operator*), + MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator*))) + .Method("op_Division", CombineOverloads(MakeOverload(FVector2D(FVector2D::*)(float) const, &FVector2D::operator/), + MakeOverload(FVector2D(FVector2D::*)(const FVector2D&) const, &FVector2D::operator/))) + .Method("set_Item", SelectFunction(float& (FVector2D::*) (int32), &FVector2D::operator[])) + .Method("get_Item", SelectFunction(float (FVector2D::*)(int32) const, &FVector2D::operator[])) + .Method("Component", CombineOverloads(MakeOverload(float& (FVector2D::*) (int32), &FVector2D::Component), + MakeOverload(float (FVector2D::*)(int32) const, &FVector2D::Component))) +#endif + .Function("DotProduct", MakeFunction(&FVector2D::DotProduct)) + .Function("DistSquared", MakeFunction(&FVector2D::DistSquared)) + .Function("Distance", MakeFunction(&FVector2D::Distance)) + .Function("CrossProduct", MakeFunction(&FVector2D::CrossProduct)) + .Method("Equals", MakeFunction(&FVector2D::Equals)) + .Method("Set", MakeFunction(&FVector2D::Set)) + .Method("GetMax", MakeFunction(&FVector2D::GetMax)) + .Method("GetAbsMax", MakeFunction(&FVector2D::GetAbsMax)) + .Method("GetMin", MakeFunction(&FVector2D::GetMin)) + .Method("Size", MakeFunction(&FVector2D::Size)) + .Method("SizeSquared", MakeFunction(&FVector2D::SizeSquared)) + .Method("GetRotated", MakeFunction(&FVector2D::GetRotated)) + .Method("GetSafeNormal", MakeFunction(&FVector2D::GetSafeNormal)) + .Method("Normalize", MakeFunction(&FVector2D::Normalize)) + .Method("IsNearlyZero", MakeFunction(&FVector2D::IsNearlyZero)) + .Method("ToDirectionAndLength", + SelectFunction(void (FVector2D::*)(FVector2D&, float&) const, &FVector2D::ToDirectionAndLength)) + .Method("IsZero", MakeFunction(&FVector2D::IsZero)) + .Method("IntPoint", MakeFunction(&FVector2D::IntPoint)) + .Method("RoundToVector", MakeFunction(&FVector2D::RoundToVector)) + .Method("ClampAxes", MakeFunction(&FVector2D::ClampAxes)) + .Method("GetSignVector", MakeFunction(&FVector2D::GetSignVector)) + .Method("GetAbs", MakeFunction(&FVector2D::GetAbs)) + .Method("ToString", MakeFunction(&FVector2D::ToString)) + .Method("InitFromString", MakeFunction(&FVector2D::InitFromString)) + .Method("DiagnosticCheckNaN", MakeFunction(&FVector2D::DiagnosticCheckNaN)) + .Method("ContainsNaN", MakeFunction(&FVector2D::ContainsNaN)) + .Method("SphericalToUnitCartesian", MakeFunction(&FVector2D::SphericalToUnitCartesian)) + .Register(); } }; -AutoRegisterForFVector2D _AutoRegisterForFVector2D_; \ No newline at end of file +AutoRegisterForFVector2D _AutoRegisterForFVector2D_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector4_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector4_Wrap.cpp index 4851c01a92..33c8e8a0e9 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector4_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector4_Wrap.cpp @@ -8,1179 +8,64 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator+= FVector4 (const FVector4 &) __attribute__((thiscall)) - -// unsupported method : operator-= FVector4 (const FVector4 &) __attribute__((thiscall)) - -// unsupported method : operator*= FVector4 (const FVector4 &) __attribute__((thiscall)) - -// unsupported method : operator/= FVector4 (const FVector4 &) __attribute__((thiscall)) - -// unsupported method : operator*= FVector4 (float) __attribute__((thiscall)) - -static void* _FVector4New_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - FVector4* Obj = new FVector4(*Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector4New_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector4* Obj = new FVector4(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector4New_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg3 = Info[3]->ToNumber(Context).ToLocalChecked()->Value(); - FVector4* Obj = new FVector4(Arg0, Arg1, Arg2, Arg3); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector4New_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector2D* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - FVector4* Obj = new FVector4(*Arg0, *Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector4New_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FVector4* Obj = new FVector4(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVector4New_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FVector4Delete_(void* Ptr, void* ClassData, void* EnvData) -{ - FVector4* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FVector4Delete_:%p"), Self); - delete Self; -} -static void FVector4M_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_UnaryNegation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_UnaryNegation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_op_ExclusiveOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_op_ExclusiveOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator^(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Component(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_IsUnit3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_IsUnit3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsUnit3(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_GetSafeNormal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_GetSafeNormal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSafeNormal(Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_GetUnsafeNormal3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_GetUnsafeNormal3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetUnsafeNormal3(); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_ToOrientationRotator(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_ToOrientationRotator] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToOrientationRotator(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_ToOrientationQuat(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_ToOrientationQuat] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToOrientationQuat(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Rotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Rotation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Rotation(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Set(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 4) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg3 = Info[3]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::M_Set] Attempt to access a NULL self pointer"); - return; - } - Self->Set(Arg0, Arg1, Arg2, Arg3); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Size3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Size3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size3(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_SizeSquared3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_SizeSquared3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared3(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_SizeSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_SizeSquared] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_IsNearlyZero3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_IsNearlyZero3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNearlyZero3(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_Reflect3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_Reflect3] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Reflect3(*Arg0); - void* Ptr = new FVector4(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_FindBestAxisVectors3(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked())) - { - FVector4* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - FVector4* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_FindBestAxisVectors3] Attempt to access a NULL self pointer"); - return; - } - Self->FindBestAxisVectors3(*Arg0, *Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVector4M_DiagnosticCheckNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector4::M_DiagnosticCheckNaN] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FVector4XGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector4XSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVector4YGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector4YSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVector4ZGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::Z] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Z); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector4ZSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::Z] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Z = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVector4WGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::W] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->W); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVector4WSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector4::W] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->W = Value->ToNumber(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFVector4 { AutoRegisterForFVector4() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"X", _FVector4XGet_, _FVector4XSet_}, - {"Y", _FVector4YGet_, _FVector4YSet_}, {"Z", _FVector4ZGet_, _FVector4ZSet_}, {"W", _FVector4WGet_, _FVector4WSet_}, - {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"set_Item", FVector4M_set_Item}, {"get_Item", FVector4M_get_Item}, - {"op_UnaryNegation", FVector4M_op_UnaryNegation}, {"op_Addition", FVector4M_op_Addition}, - {"op_Subtraction", FVector4M_op_Subtraction}, {"op_Multiply", FVector4M_op_Multiply}, - {"op_Division", FVector4M_op_Division}, {"op_Equality", FVector4M_op_Equality}, - {"op_Inequality", FVector4M_op_Inequality}, {"op_ExclusiveOr", FVector4M_op_ExclusiveOr}, - {"Component", FVector4M_Component}, {"Equals", FVector4M_Equals}, {"IsUnit3", FVector4M_IsUnit3}, - {"ToString", FVector4M_ToString}, {"InitFromString", FVector4M_InitFromString}, - {"GetSafeNormal", FVector4M_GetSafeNormal}, {"GetUnsafeNormal3", FVector4M_GetUnsafeNormal3}, - {"ToOrientationRotator", FVector4M_ToOrientationRotator}, {"ToOrientationQuat", FVector4M_ToOrientationQuat}, - {"Rotation", FVector4M_Rotation}, {"Set", FVector4M_Set}, {"Size3", FVector4M_Size3}, - {"SizeSquared3", FVector4M_SizeSquared3}, {"Size", FVector4M_Size}, {"SizeSquared", FVector4M_SizeSquared}, - {"ContainsNaN", FVector4M_ContainsNaN}, {"IsNearlyZero3", FVector4M_IsNearlyZero3}, {"Reflect3", FVector4M_Reflect3}, - {"FindBestAxisVectors3", FVector4M_FindBestAxisVectors3}, {"DiagnosticCheckNaN", FVector4M_DiagnosticCheckNaN}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{0, 0}}; - - Def.UETypeName = "Vector4"; - - Def.SetInitialize(_FVector4New_); - Def.Finalize = _FVector4Delete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FVector4, const FVector&, float), + MakeConstructor(FVector4, const FLinearColor&), MakeConstructor(FVector4, float, float, float, float), + MakeConstructor(FVector4, FVector2D, FVector2D), MakeConstructor(FVector4, const FIntVector4&), + MakeConstructor(FVector4, EForceInit))) + .Property("X", MakeProperty(&FVector4::X)) + .Property("Y", MakeProperty(&FVector4::Y)) + .Property("Z", MakeProperty(&FVector4::Z)) + .Property("W", MakeProperty(&FVector4::W)) + .Method("op_UnaryNegation", SelectFunction(FVector4(FVector4::*)() const, &(FVector4::operator-))) + .Method("op_Addition", MakeFunction(&FVector4::operator+)) + .Method("op_Subtraction", SelectFunction(FVector4(FVector4::*)(const FVector4&) const, &(FVector4::operator-))) + .Method("op_Multiply", CombineOverloads(MakeOverload(FVector4(FVector4::*)(float) const, &FVector4::operator*), + MakeOverload(FVector4(FVector4::*)(const FVector4&) const, &FVector4::operator*))) + .Method("op_Division", CombineOverloads(MakeOverload(FVector4(FVector4::*)(float) const, &FVector4::operator/), + MakeOverload(FVector4(FVector4::*)(const FVector4&) const, &FVector4::operator/))) + .Method("op_Equality", MakeFunction(&FVector4::operator==)) + .Method("op_Inequality", MakeFunction(&FVector4::operator!=)) + .Method("op_ExclusiveOr", MakeFunction(&FVector4::operator^)) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("set_Item", SelectFunction(double& (FVector4::*) (int32), &FVector4::operator[])) + .Method("get_Item", SelectFunction(double (FVector4::*)(int32) const, &FVector4::operator[])) + .Method("Component", CombineOverloads(MakeOverload(double& (FVector4::*) (int32), &FVector4::Component), + MakeOverload(const double& (FVector4::*) (int32) const, &FVector4::Component))) +#else + .Method("set_Item", SelectFunction(float& (FVector4::*) (int32), &FVector4::operator[])) + .Method("get_Item", SelectFunction(float (FVector4::*)(int32) const, &FVector4::operator[])) + .Method("Component", CombineOverloads(MakeOverload(float& (FVector4::*) (int32), &FVector4::Component), + MakeOverload(const float& (FVector4::*) (int32) const, &FVector4::Component))) +#endif + .Method("Equals", MakeFunction(&FVector4::Equals)) + .Method("IsUnit3", MakeFunction(&FVector4::IsUnit3)) + .Method("ToString", MakeFunction(&FVector4::ToString)) + .Method("InitFromString", MakeFunction(&FVector4::InitFromString)) + .Method("GetSafeNormal", MakeFunction(&FVector4::GetSafeNormal)) + .Method("GetUnsafeNormal3", MakeFunction(&FVector4::GetUnsafeNormal3)) + .Method("ToOrientationRotator", MakeFunction(&FVector4::ToOrientationRotator)) + .Method("ToOrientationQuat", MakeFunction(&FVector4::ToOrientationQuat)) + .Method("Rotation", MakeFunction(&FVector4::Rotation)) + .Method("Set", MakeFunction(&FVector4::Set)) + .Method("Size3", MakeFunction(&FVector4::Size3)) + .Method("SizeSquared3", MakeFunction(&FVector4::SizeSquared3)) + .Method("Size", MakeFunction(&FVector4::Size)) + .Method("SizeSquared", MakeFunction(&FVector4::SizeSquared)) + .Method("ContainsNaN", MakeFunction(&FVector4::ContainsNaN)) + .Method("IsNearlyZero3", MakeFunction(&FVector4::IsNearlyZero3)) + .Method("Reflect3", MakeFunction(&FVector4::Reflect3)) + .Method("FindBestAxisVectors3", MakeFunction(&FVector4::FindBestAxisVectors3)) + .Method("DiagnosticCheckNaN", MakeFunction(&FVector4::DiagnosticCheckNaN)) + .Register(); } }; -AutoRegisterForFVector4 _AutoRegisterForFVector4_; \ No newline at end of file +AutoRegisterForFVector4 _AutoRegisterForFVector4_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector_Wrap.cpp b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector_Wrap.cpp index 2d3a3183b6..43a3b271be 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/FVector_Wrap.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/FVector_Wrap.cpp @@ -8,3109 +8,135 @@ // gen by puerts gen tools -#include "GenHeaders.h" #include "CoreMinimal.h" -#include "DataTransfer.h" -#include "JSClassRegister.h" - -// unsupported method : operator+= FVector (const FVector &) __attribute__((thiscall)) - -// unsupported method : operator-= FVector (const FVector &) __attribute__((thiscall)) - -// unsupported method : operator*= FVector (float) __attribute__((thiscall)) - -// unsupported method : operator/= FVector (float) __attribute__((thiscall)) - -// unsupported method : operator*= FVector (const FVector &) __attribute__((thiscall)) - -// unsupported method : operator/= FVector (const FVector &) __attribute__((thiscall)) - -static void* _FVectorNew_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - FVector* Obj = new FVector(); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - FVector* Obj = new FVector(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - FVector* Obj = new FVector(Arg0, Arg1, Arg2); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector2D* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - FVector* Obj = new FVector(*Arg0, Arg1); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector4* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector* Obj = new FVector(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FLinearColor* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector* Obj = new FVector(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FIntVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector* Obj = new FVector(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FIntPoint* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - FVector* Obj = new FVector(*Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - FVector* Obj = new FVector(Arg0); - - // UE_LOG(LogTemp, Warning, TEXT("_FVectorNew_:%p"), Obj); - return Obj; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); - return nullptr; -} - -static void _FVectorDelete_(void* Ptr, void* ClassData, void* EnvData) -{ - FVector* Self = static_cast(Ptr); - // UE_LOG(LogTemp, Warning, TEXT("_FVectorDelete_:%p"), Self); - delete Self; -} -static void FVectorM_DiagnosticCheckNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_DiagnosticCheckNaN] Attempt to access a NULL self pointer"); - return; - } - Self->DiagnosticCheckNaN(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_ExclusiveOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_ExclusiveOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator^(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_CrossProduct(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::CrossProduct(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_BitwiseOr(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_BitwiseOr] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator|(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DotProduct(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DotProduct(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Addition(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Addition] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator+(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Subtraction(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Subtraction] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Multiply(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Multiply] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator*(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Division(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Division] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator/(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Equality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Equality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator==(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_Inequality(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_Inequality] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator!=(*Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Equals(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Equals] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Equals(*Arg0, Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_AllComponentsEqual(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_AllComponentsEqual] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->AllComponentsEqual(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_op_UnaryNegation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_op_UnaryNegation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator-(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_set_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_set_Item] Attempt to access a NULL self pointer"); - return; - } - Self->operator[](Arg0); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_get_Item(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_get_Item] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->operator[](Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Component(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Component] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Component(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetComponentForAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetComponentForAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetComponentForAxis(Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_SetComponentForAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - EAxis::Type Arg0 = EAxis::Type(Info[0]->ToInt32(Context).ToLocalChecked()->Value()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_SetComponentForAxis] Attempt to access a NULL self pointer"); - return; - } - Self->SetComponentForAxis(Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Set(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::M_Set] Attempt to access a NULL self pointer"); - return; - } - Self->Set(Arg0, Arg1, Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMax(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetAbsMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetAbsMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAbsMax(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetMin(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetAbsMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetAbsMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAbsMin(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ComponentMin(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ComponentMin] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ComponentMin(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ComponentMax(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ComponentMax] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ComponentMax(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetAbs(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetAbs] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetAbs(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Size(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::M_Size] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_SizeSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_SizeSquared] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Size2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Size2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Size2D(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_SizeSquared2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_SizeSquared2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->SizeSquared2D(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_IsNearlyZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_IsNearlyZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNearlyZero(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_IsZero(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_IsZero] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsZero(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_IsUnit(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_IsUnit] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsUnit(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_IsNormalized(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_IsNormalized] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsNormalized(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Normalize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Normalize] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Normalize(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetUnsafeNormal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetUnsafeNormal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetUnsafeNormal(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetSafeNormal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetSafeNormal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSafeNormal(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetSafeNormal2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetSafeNormal2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSafeNormal2D(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToDirectionAndLength(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsNumber()) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - float Arg1 = PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToDirectionAndLength] Attempt to access a NULL self pointer"); - return; - } - Self->ToDirectionAndLength(*Arg0, Arg1); - - PUERTS_NAMESPACE::DataTransfer::UpdateRef(Isolate, Info[1], v8::Number::New(Isolate, Arg1)); - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetSignVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetSignVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetSignVector(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Projection(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Projection] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Projection(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetUnsafeNormal2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetUnsafeNormal2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetUnsafeNormal2D(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GridSnap(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GridSnap] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GridSnap(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_BoundToCube(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_BoundToCube] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->BoundToCube(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_BoundToBox(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_BoundToBox] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->BoundToBox(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetClampedToSize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetClampedToSize] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClampedToSize(Arg0, Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetClampedToSize2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetClampedToSize2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClampedToSize2D(Arg0, Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetClampedToMaxSize(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetClampedToMaxSize] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClampedToMaxSize(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_GetClampedToMaxSize2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_GetClampedToMaxSize2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->GetClampedToMaxSize2D(Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_AddBounded(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - float Arg1 = Info[1]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_AddBounded] Attempt to access a NULL self pointer"); - return; - } - Self->AddBounded(*Arg0, Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Reciprocal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Reciprocal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Reciprocal(); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_IsUniform(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsNumber()) - { - float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_IsUniform] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->IsUniform(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_MirrorByVector(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_MirrorByVector] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->MirrorByVector(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_MirrorByPlane(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FPlane* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_MirrorByPlane] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->MirrorByPlane(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_RotateAngleAxis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsNumber() && Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value(); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_RotateAngleAxis] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->RotateAngleAxis(Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_CosineAngle2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_CosineAngle2D] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->CosineAngle2D(*Arg0); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ProjectOnTo(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ProjectOnTo] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ProjectOnTo(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ProjectOnToNormal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ProjectOnToNormal] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ProjectOnToNormal(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToOrientationRotator(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToOrientationRotator] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToOrientationRotator(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToOrientationQuat(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToOrientationQuat] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToOrientationQuat(); - void* Ptr = new FQuat(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_Rotation(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_Rotation] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->Rotation(); - void* Ptr = new FRotator(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_FindBestAxisVectors(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - FVector* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_FindBestAxisVectors] Attempt to access a NULL self pointer"); - return; - } - Self->FindBestAxisVectors(*Arg0, *Arg1); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_UnwindEuler(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_UnwindEuler] Attempt to access a NULL self pointer"); - return; - } - Self->UnwindEuler(); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ContainsNaN(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ContainsNaN] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ContainsNaN(); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToText(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToText] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToText(); - auto V8Result = v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*(MethodResult.ToString())), v8::NewStringType::kNormal) - .ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToCompactString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToCompactString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToCompactString(); - auto V8Result = - v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_ToCompactText(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_ToCompactText] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->ToCompactText(); - auto V8Result = v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*(MethodResult.ToString())), v8::NewStringType::kNormal) - .ToLocalChecked(); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_InitFromString(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsString()) - { - const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0]))); - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_InitFromString] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->InitFromString(Arg0); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_UnitCartesianToSpherical(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_UnitCartesianToSpherical] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->UnitCartesianToSpherical(); - void* Ptr = new FVector2D(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorM_HeadingAngle(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 0) - { - if (true) - { - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException( - Isolate, "[FVector::M_HeadingAngle] Attempt to access a NULL self pointer"); - return; - } - auto MethodResult = Self->HeadingAngle(); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_CreateOrthonormalBasis(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( - Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked())) - { - FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()); - FVector* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()); - FVector* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast( - PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked()); - FVector::CreateOrthonormalBasis(*Arg0, *Arg1, *Arg2); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_PointsAreSame(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::PointsAreSame(*Arg0, *Arg1); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_PointsAreNear(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FVector::PointsAreNear(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_PointPlaneDist(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::PointPlaneDist(*Arg0, *Arg1, *Arg2); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_PointPlaneProject(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FPlane* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::PointPlaneProject(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 4) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FVector* Arg3 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::PointPlaneProject(*Arg0, *Arg1, *Arg2, *Arg3); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::PointPlaneProject(*Arg0, *Arg1, *Arg2); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_VectorPlaneProject(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::VectorPlaneProject(*Arg0, *Arg1); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Dist(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::Dist(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Distance(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::Distance(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DistXY(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DistXY(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Dist2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::Dist2D(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DistSquared(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DistSquared(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DistSquaredXY(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DistSquaredXY(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DistSquared2D(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DistSquared2D(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_BoxPushOut(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 2) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::BoxPushOut(*Arg0, *Arg1); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Parallel(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FVector::Parallel(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Coincident(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FVector::Coincident(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Orthogonal(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - float Arg2 = Info[2]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FVector::Orthogonal(*Arg0, *Arg1, Arg2); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Coplanar(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 5) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked()) && - Info[3]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[3]->ToObject(Context).ToLocalChecked()) && - Info[4]->IsNumber()) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - const FVector* Arg3 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[3]->ToObject(Context).ToLocalChecked()); - float Arg4 = Info[4]->ToNumber(Context).ToLocalChecked()->Value(); - auto MethodResult = FVector::Coplanar(*Arg0, *Arg1, *Arg2, *Arg3, Arg4); - auto V8Result = v8::Boolean::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_Triple(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 3) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) && - Info[1]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[1]->ToObject(Context).ToLocalChecked()) && - Info[2]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[2]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - const FVector* Arg1 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[1]->ToObject(Context).ToLocalChecked()); - const FVector* Arg2 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[2]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::Triple(*Arg0, *Arg1, *Arg2); - auto V8Result = v8::Number::New(Isolate, MethodResult); - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_RadiansToDegrees(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::RadiansToDegrees(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void FVectorS_DegreesToRadians(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - if (Info.Length() == 1) - { - if (Info[0]->IsObject() && - - PUERTS_NAMESPACE::DataTransfer::IsInstanceOf(Isolate, Info[0]->ToObject(Context).ToLocalChecked())) - { - const FVector* Arg0 = - PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info[0]->ToObject(Context).ToLocalChecked()); - auto MethodResult = FVector::DegreesToRadians(*Arg0); - void* Ptr = new FVector(MethodResult); - - auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct(Isolate, Context, Ptr, false); - - Info.GetReturnValue().Set(V8Result); - - return; - } - } - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!"); -} - -static void _FVectorXGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::X] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->X); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVectorXSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::X] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->X = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVectorYGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::Y] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Y); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVectorYSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::Y] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Y = Value->ToNumber(Context).ToLocalChecked()->Value(); -} -static void _FVectorZGet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::Z] Attempt to access a NULL self pointer"); - return; - } - - auto V8Result = v8::Number::New(Isolate, Self->Z); - PUERTS_NAMESPACE::DataTransfer::LinkOuter(Context, Info.Holder(), V8Result); - Info.GetReturnValue().Set(V8Result); -} -static void _FVectorZSet_(const v8::FunctionCallbackInfo& Info) -{ - v8::Isolate* Isolate = Info.GetIsolate(); - v8::Local Context = Isolate->GetCurrentContext(); - - auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast(Info.Holder()); - if (!Self) - { - PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FVector::Z] Attempt to access a NULL self pointer"); - return; - } - auto Value = Info[0]; - - Self->Z = Value->ToNumber(Context).ToLocalChecked()->Value(); -} +#include "UsingTypeDecl.hpp" struct AutoRegisterForFVector { AutoRegisterForFVector() { - PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition; - - static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"X", _FVectorXGet_, _FVectorXSet_}, - {"Y", _FVectorYGet_, _FVectorYSet_}, {"Z", _FVectorZGet_, _FVectorZSet_}, {0, 0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"DiagnosticCheckNaN", FVectorM_DiagnosticCheckNaN}, - {"op_ExclusiveOr", FVectorM_op_ExclusiveOr}, {"op_BitwiseOr", FVectorM_op_BitwiseOr}, - {"op_Addition", FVectorM_op_Addition}, {"op_Subtraction", FVectorM_op_Subtraction}, - {"op_Multiply", FVectorM_op_Multiply}, {"op_Division", FVectorM_op_Division}, {"op_Equality", FVectorM_op_Equality}, - {"op_Inequality", FVectorM_op_Inequality}, {"Equals", FVectorM_Equals}, - {"AllComponentsEqual", FVectorM_AllComponentsEqual}, {"op_UnaryNegation", FVectorM_op_UnaryNegation}, - {"set_Item", FVectorM_set_Item}, {"get_Item", FVectorM_get_Item}, {"Component", FVectorM_Component}, - {"GetComponentForAxis", FVectorM_GetComponentForAxis}, {"SetComponentForAxis", FVectorM_SetComponentForAxis}, - {"Set", FVectorM_Set}, {"GetMax", FVectorM_GetMax}, {"GetAbsMax", FVectorM_GetAbsMax}, {"GetMin", FVectorM_GetMin}, - {"GetAbsMin", FVectorM_GetAbsMin}, {"ComponentMin", FVectorM_ComponentMin}, {"ComponentMax", FVectorM_ComponentMax}, - {"GetAbs", FVectorM_GetAbs}, {"Size", FVectorM_Size}, {"SizeSquared", FVectorM_SizeSquared}, - {"Size2D", FVectorM_Size2D}, {"SizeSquared2D", FVectorM_SizeSquared2D}, {"IsNearlyZero", FVectorM_IsNearlyZero}, - {"IsZero", FVectorM_IsZero}, {"IsUnit", FVectorM_IsUnit}, {"IsNormalized", FVectorM_IsNormalized}, - {"Normalize", FVectorM_Normalize}, {"GetUnsafeNormal", FVectorM_GetUnsafeNormal}, - {"GetSafeNormal", FVectorM_GetSafeNormal}, {"GetSafeNormal2D", FVectorM_GetSafeNormal2D}, - {"ToDirectionAndLength", FVectorM_ToDirectionAndLength}, {"GetSignVector", FVectorM_GetSignVector}, - {"Projection", FVectorM_Projection}, {"GetUnsafeNormal2D", FVectorM_GetUnsafeNormal2D}, {"GridSnap", FVectorM_GridSnap}, - {"BoundToCube", FVectorM_BoundToCube}, {"BoundToBox", FVectorM_BoundToBox}, - {"GetClampedToSize", FVectorM_GetClampedToSize}, {"GetClampedToSize2D", FVectorM_GetClampedToSize2D}, - {"GetClampedToMaxSize", FVectorM_GetClampedToMaxSize}, {"GetClampedToMaxSize2D", FVectorM_GetClampedToMaxSize2D}, - {"AddBounded", FVectorM_AddBounded}, {"Reciprocal", FVectorM_Reciprocal}, {"IsUniform", FVectorM_IsUniform}, - {"MirrorByVector", FVectorM_MirrorByVector}, {"MirrorByPlane", FVectorM_MirrorByPlane}, - {"RotateAngleAxis", FVectorM_RotateAngleAxis}, {"CosineAngle2D", FVectorM_CosineAngle2D}, - {"ProjectOnTo", FVectorM_ProjectOnTo}, {"ProjectOnToNormal", FVectorM_ProjectOnToNormal}, - {"ToOrientationRotator", FVectorM_ToOrientationRotator}, {"ToOrientationQuat", FVectorM_ToOrientationQuat}, - {"Rotation", FVectorM_Rotation}, {"FindBestAxisVectors", FVectorM_FindBestAxisVectors}, - {"UnwindEuler", FVectorM_UnwindEuler}, {"ContainsNaN", FVectorM_ContainsNaN}, {"ToString", FVectorM_ToString}, - {"ToText", FVectorM_ToText}, {"ToCompactString", FVectorM_ToCompactString}, {"ToCompactText", FVectorM_ToCompactText}, - {"InitFromString", FVectorM_InitFromString}, {"UnitCartesianToSpherical", FVectorM_UnitCartesianToSpherical}, - {"HeadingAngle", FVectorM_HeadingAngle}, {0, 0}}; - - static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"CrossProduct", FVectorS_CrossProduct}, - {"DotProduct", FVectorS_DotProduct}, {"CreateOrthonormalBasis", FVectorS_CreateOrthonormalBasis}, - {"PointsAreSame", FVectorS_PointsAreSame}, {"PointsAreNear", FVectorS_PointsAreNear}, - {"PointPlaneDist", FVectorS_PointPlaneDist}, {"PointPlaneProject", FVectorS_PointPlaneProject}, - {"VectorPlaneProject", FVectorS_VectorPlaneProject}, {"Dist", FVectorS_Dist}, {"Distance", FVectorS_Distance}, - {"DistXY", FVectorS_DistXY}, {"Dist2D", FVectorS_Dist2D}, {"DistSquared", FVectorS_DistSquared}, - {"DistSquaredXY", FVectorS_DistSquaredXY}, {"DistSquared2D", FVectorS_DistSquared2D}, - {"BoxPushOut", FVectorS_BoxPushOut}, {"Parallel", FVectorS_Parallel}, {"Coincident", FVectorS_Coincident}, - {"Orthogonal", FVectorS_Orthogonal}, {"Coplanar", FVectorS_Coplanar}, {"Triple", FVectorS_Triple}, - {"RadiansToDegrees", FVectorS_RadiansToDegrees}, {"DegreesToRadians", FVectorS_DegreesToRadians}, {0, 0}}; - - Def.UETypeName = "Vector"; - - Def.SetInitialize(_FVectorNew_); - Def.Finalize = _FVectorDelete_; - Def.Properties = Properties; - Def.Methods = Methods; - Def.Functions = Functions; - - PUERTS_NAMESPACE::RegisterJSClass(Def); + puerts::DefineClass() + .Constructor(CombineConstructors(MakeConstructor(FVector), MakeConstructor(FVector, float), + MakeConstructor(FVector, float, float, float), MakeConstructor(FVector, const FVector2D, float), + MakeConstructor(FVector, const FVector4&), MakeConstructor(FVector, const FLinearColor&), + MakeConstructor(FVector, FIntVector), MakeConstructor(FVector, FIntPoint), MakeConstructor(FVector, EForceInit))) + .Property("X", MakeProperty(&FVector::X)) + .Property("Y", MakeProperty(&FVector::Y)) + .Property("Z", MakeProperty(&FVector::Z)) + .Method("DiagnosticCheckNaN", CombineOverloads(MakeOverload(void (FVector::*)() const, &FVector::DiagnosticCheckNaN), + MakeOverload(void (FVector::*)(const TCHAR*) const, &FVector::DiagnosticCheckNaN))) + .Method("op_ExclusiveOr", MakeFunction(&FVector::operator^)) + .Function("CrossProduct", MakeFunction(&FVector::CrossProduct)) + .Method("op_BitwiseOr", MakeFunction(&FVector::operator|)) + .Function("DotProduct", MakeFunction(&FVector::DotProduct)) + .Method("op_Addition", CombineOverloads(MakeOverload(FVector(FVector::*)(const FVector&) const, &FVector::operator+), + MakeOverload(FVector(FVector::*)(float) const, &FVector::operator+))) + .Method( + "op_Subtraction", CombineOverloads(MakeOverload(FVector(FVector::*)(const FVector&) const, &(FVector::operator-)), + MakeOverload(FVector(FVector::*)(float) const, &(FVector::operator-)))) + .Method("op_Multiply", CombineOverloads(MakeOverload(FVector(FVector::*)(float) const, &FVector::operator*), + MakeOverload(FVector(FVector::*)(const FVector&) const, &FVector::operator*))) + .Method("op_Division", CombineOverloads(MakeOverload(FVector(FVector::*)(float) const, &FVector::operator/), + MakeOverload(FVector(FVector::*)(const FVector&) const, &FVector::operator/))) + .Method("op_Equality", MakeFunction(&FVector::operator==)) + .Method("op_Inequality", MakeFunction(&FVector::operator!=)) + .Method("Equals", MakeFunction(&FVector::Equals)) + .Method("AllComponentsEqual", MakeFunction(&FVector::AllComponentsEqual)) + .Method("op_UnaryNegation", SelectFunction(FVector(FVector::*)() const, &(FVector::operator-))) +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2 + .Method("set_Item", SelectFunction(double& (FVector::*) (int32), &FVector::operator[])) + .Method("get_Item", SelectFunction(double (FVector::*)(int32) const, &FVector::operator[])) + .Method("Component", CombineOverloads(MakeOverload(double& (FVector::*) (int32), &FVector::Component), + MakeOverload(double (FVector::*)(int32) const, &FVector::Component))) +#else + .Method("set_Item", SelectFunction(float& (FVector::*) (int32), &FVector::operator[])) + .Method("get_Item", SelectFunction(float (FVector::*)(int32) const, &FVector::operator[])) + .Method("Component", CombineOverloads(MakeOverload(float& (FVector::*) (int32), &FVector::Component), + MakeOverload(float (FVector::*)(int32) const, &FVector::Component))) +#endif + .Method("GetComponentForAxis", MakeFunction(&FVector::GetComponentForAxis)) + .Method("SetComponentForAxis", MakeFunction(&FVector::SetComponentForAxis)) + .Method("Set", MakeFunction(&FVector::Set)) + .Method("GetMax", MakeFunction(&FVector::GetMax)) + .Method("GetAbsMax", MakeFunction(&FVector::GetAbsMax)) + .Method("GetMin", MakeFunction(&FVector::GetMin)) + .Method("GetAbsMin", MakeFunction(&FVector::GetAbsMin)) + .Method("ComponentMin", MakeFunction(&FVector::ComponentMin)) + .Method("ComponentMax", MakeFunction(&FVector::ComponentMax)) + .Method("GetAbs", MakeFunction(&FVector::GetAbs)) + .Method("Size", MakeFunction(&FVector::Size)) + .Method("SizeSquared", MakeFunction(&FVector::SizeSquared)) + .Method("Size2D", MakeFunction(&FVector::Size2D)) + .Method("SizeSquared2D", MakeFunction(&FVector::SizeSquared2D)) + .Method("IsNearlyZero", MakeFunction(&FVector::IsNearlyZero)) + .Method("IsZero", MakeFunction(&FVector::IsZero)) + .Method("IsUnit", MakeFunction(&FVector::IsUnit)) + .Method("IsNormalized", MakeFunction(&FVector::IsNormalized)) + .Method("Normalize", MakeFunction(&FVector::Normalize)) + .Method("GetUnsafeNormal", MakeFunction(&FVector::GetUnsafeNormal)) + .Method("GetSafeNormal", MakeFunction(&FVector::GetSafeNormal)) + .Method("GetSafeNormal2D", MakeFunction(&FVector::GetSafeNormal2D)) + .Method( + "ToDirectionAndLength", SelectFunction(void (FVector::*)(FVector&, float&) const, &FVector::ToDirectionAndLength)) + .Method("GetSignVector", MakeFunction(&FVector::GetSignVector)) + .Method("Projection", MakeFunction(&FVector::Projection)) + .Method("GetUnsafeNormal2D", MakeFunction(&FVector::GetUnsafeNormal2D)) + .Method("GridSnap", MakeFunction(&FVector::GridSnap)) + .Method("BoundToCube", MakeFunction(&FVector::BoundToCube)) + .Method("BoundToBox", MakeFunction(&FVector::BoundToBox)) + .Method("GetClampedToSize", MakeFunction(&FVector::GetClampedToSize)) + .Method("GetClampedToSize2D", MakeFunction(&FVector::GetClampedToSize2D)) + .Method("GetClampedToMaxSize", MakeFunction(&FVector::GetClampedToMaxSize)) + .Method("GetClampedToMaxSize2D", MakeFunction(&FVector::GetClampedToMaxSize2D)) + .Method("AddBounded", MakeFunction(&FVector::AddBounded)) + .Method("Reciprocal", MakeFunction(&FVector::Reciprocal)) + .Method("IsUniform", MakeFunction(&FVector::IsUniform)) + .Method("MirrorByVector", MakeFunction(&FVector::MirrorByVector)) + .Method("MirrorByPlane", MakeFunction(&FVector::MirrorByPlane)) + .Method("RotateAngleAxis", MakeFunction(&FVector::RotateAngleAxis)) + .Method("CosineAngle2D", MakeFunction(&FVector::CosineAngle2D)) + .Method("ProjectOnTo", MakeFunction(&FVector::ProjectOnTo)) + .Method("ProjectOnToNormal", MakeFunction(&FVector::ProjectOnToNormal)) + .Method("ToOrientationRotator", MakeFunction(&FVector::ToOrientationRotator)) + .Method("ToOrientationQuat", MakeFunction(&FVector::ToOrientationQuat)) + .Method("Rotation", MakeFunction(&FVector::Rotation)) + .Method("FindBestAxisVectors", MakeFunction(&FVector::FindBestAxisVectors)) + .Method("UnwindEuler", MakeFunction(&FVector::UnwindEuler)) + .Method("ContainsNaN", MakeFunction(&FVector::ContainsNaN)) + .Method("ToString", MakeFunction(&FVector::ToString)) + .Method("ToText", MakeFunction(&FVector::ToText)) + .Method("ToCompactString", MakeFunction(&FVector::ToCompactString)) + .Method("ToCompactText", MakeFunction(&FVector::ToCompactText)) + .Method("InitFromString", MakeFunction(&FVector::InitFromString)) + .Method("UnitCartesianToSpherical", MakeFunction(&FVector::UnitCartesianToSpherical)) + .Method("HeadingAngle", MakeFunction(&FVector::HeadingAngle)) + .Function("CreateOrthonormalBasis", MakeFunction(&FVector::CreateOrthonormalBasis)) + .Function("PointsAreSame", MakeFunction(&FVector::PointsAreSame)) + .Function("PointsAreNear", MakeFunction(&FVector::PointsAreNear)) + .Function("PointPlaneDist", MakeFunction(&FVector::PointPlaneDist)) + .Function("PointPlaneProject", + CombineOverloads(MakeOverload(FVector(*)(const FVector&, const FPlane&), &FVector::PointPlaneProject), + MakeOverload( + FVector(*)(const FVector&, const FVector&, const FVector&, const FVector&), &FVector::PointPlaneProject), + MakeOverload(FVector(*)(const FVector&, const FVector&, const FVector&), &FVector::PointPlaneProject))) + .Function("VectorPlaneProject", MakeFunction(&FVector::VectorPlaneProject)) + .Function("Dist", MakeFunction(&FVector::Dist)) + .Function("Distance", MakeFunction(&FVector::Distance)) + .Function("DistXY", MakeFunction(&FVector::DistXY)) + .Function("Dist2D", MakeFunction(&FVector::Dist2D)) + .Function("DistSquared", MakeFunction(&FVector::DistSquared)) + .Function("DistSquaredXY", MakeFunction(&FVector::DistSquaredXY)) + .Function("DistSquared2D", MakeFunction(&FVector::DistSquared2D)) + .Function("BoxPushOut", MakeFunction(&FVector::BoxPushOut)) + .Function("Parallel", MakeFunction(&FVector::Parallel)) + .Function("Coincident", MakeFunction(&FVector::Coincident)) + .Function("Orthogonal", MakeFunction(&FVector::Orthogonal)) + .Function("Coplanar", MakeFunction(&FVector::Coplanar)) + .Function("Triple", MakeFunction(&FVector::Triple)) + .Function("RadiansToDegrees", MakeFunction(&FVector::RadiansToDegrees)) + .Function("DegreesToRadians", MakeFunction(&FVector::DegreesToRadians)) + .Register(); } }; -AutoRegisterForFVector _AutoRegisterForFVector_; \ No newline at end of file +AutoRegisterForFVector _AutoRegisterForFVector_; diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/GenHeaders.h b/unreal/Puerts/Source/JsEnv/Private/Gen/GenHeaders.h deleted file mode 100644 index ebb6a9d134..0000000000 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/GenHeaders.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once - -#if !defined(ENGINE_INDEPENDENT_JSENV) -#include "Engine/NetworkObjectList.h" -#include "TimerManager.h" -#include "Materials/MaterialInstanceDynamic.h" -#include "Containers/Array.h" -#include "DisplayDebugHelpers.h" -#include "Engine/BlueprintGeneratedClass.h" -#include "Engine/ActorChannel.h" -#include "Engine/NetConnection.h" -#include "Engine/Canvas.h" -#include "GameFramework/Actor.h" -#include "GameFramework/CameraBlockingVolume.h" -#include "GameFramework/Character.h" -#include "GameFramework/CharacterMovementComponent.h" -#include "GameFramework/CheatManager.h" -#include "GameFramework/Controller.h" -#include "GameFramework/DamageType.h" -#include "GameFramework/DebugTextInfo.h" -#include "GameFramework/DefaultPawn.h" -#include "GameFramework/DefaultPhysicsVolume.h" -#include "GameFramework/EngineMessage.h" -#include "GameFramework/FloatingPawnMovement.h" -#include "GameFramework/ForceFeedbackAttenuation.h" -#include "GameFramework/ForceFeedbackEffect.h" -#include "GameFramework/GameMode.h" -#include "GameFramework/GameModeBase.h" -#include "GameFramework/GameNetworkManager.h" -#include "GameFramework/GameSession.h" -#include "GameFramework/GameState.h" -#include "GameFramework/GameStateBase.h" -#include "GameFramework/GameUserSettings.h" -#include "GameFramework/HUD.h" -#include "GameFramework/HUDHitBox.h" -#include "GameFramework/Info.h" -#include "GameFramework/InputSettings.h" -#include "GameFramework/KillZVolume.h" -#include "GameFramework/LocalMessage.h" -#include "GameFramework/MovementComponent.h" -#include "GameFramework/NavMovementComponent.h" -#include "GameFramework/OnlineReplStructs.h" -#include "GameFramework/OnlineSession.h" -#include "GameFramework/PainCausingVolume.h" -#include "GameFramework/Pawn.h" -#include "GameFramework/PawnMovementComponent.h" -#include "GameFramework/PhysicsVolume.h" -#include "GameFramework/PlayerController.h" -#include "GameFramework/PlayerInput.h" -#include "GameFramework/PlayerMuteList.h" -#include "GameFramework/PlayerStart.h" -#include "GameFramework/PlayerState.h" -#include "GameFramework/ProjectileMovementComponent.h" -#include "GameFramework/RootMotionSource.h" -#include "GameFramework/RotatingMovementComponent.h" -#include "GameFramework/SaveGame.h" -#include "GameFramework/SimpleReticle.h" -#include "GameFramework/SpectatorPawn.h" -#include "GameFramework/SpectatorPawnMovement.h" -#include "GameFramework/SpringArmComponent.h" -#include "GameFramework/TouchInterface.h" -#include "GameFramework/Volume.h" -#include "GameFramework/WorldSettings.h" - -#include "Runtime/Launch/Resources/Version.h" -#endif \ No newline at end of file diff --git a/unreal/Puerts/Source/JsEnv/Private/Gen/UsingTypeDecl.hpp b/unreal/Puerts/Source/JsEnv/Private/Gen/UsingTypeDecl.hpp index 2a79a0b75f..01ace1272e 100644 --- a/unreal/Puerts/Source/JsEnv/Private/Gen/UsingTypeDecl.hpp +++ b/unreal/Puerts/Source/JsEnv/Private/Gen/UsingTypeDecl.hpp @@ -25,4 +25,9 @@ UsingUStruct(FRotator); UsingUStruct(FTransform); UsingUStruct(FVector4); UsingCppType(ScalarRegister); -UsingUStruct(FPlane); \ No newline at end of file +UsingUStruct(FPlane); +UsingUStruct(FFloat16Color); +UsingUStruct(FMatrix); +UsingCppType(TArray); +UsingUStruct(FIntVector4); +UsingCppType(VectorRegister); diff --git a/unreal/Puerts/Source/JsEnv/Public/DataTransfer.h b/unreal/Puerts/Source/JsEnv/Public/DataTransfer.h index a408b7f8e7..bdcfde3502 100644 --- a/unreal/Puerts/Source/JsEnv/Public/DataTransfer.h +++ b/unreal/Puerts/Source/JsEnv/Public/DataTransfer.h @@ -181,6 +181,33 @@ struct TScriptStructTraits } }; +template <> +struct TScriptStructTraits +{ + static UScriptStruct* Get() + { + return GetScriptStructInCoreUObject(TEXT("Matrix")); + } +}; + +template <> +struct TScriptStructTraits +{ + static UScriptStruct* Get() + { + return GetScriptStructInCoreUObject(TEXT("Float16Color")); + } +}; + +template <> +struct TScriptStructTraits +{ + static UScriptStruct* Get() + { + return GetScriptStructInCoreUObject(TEXT("IntVector4")); + } +}; + template using ToVoid = void; diff --git a/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp b/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp index 287471156c..1b5d67d795 100644 --- a/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp +++ b/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp @@ -536,6 +536,16 @@ struct Converter::value> } }; +template +struct Converter::value>::type> : Converter +{ +}; + } // namespace v8_impl +template +struct ScriptTypeName::value>::type> : ScriptTypeName +{ +}; + } // namespace PUERTS_NAMESPACE \ No newline at end of file