148 lines
4.9 KiB
C++
148 lines
4.9 KiB
C++
/**
|
|
* @file
|
|
*
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
*
|
|
* @section LICENSE
|
|
*
|
|
* (The MIT License)
|
|
*
|
|
* Copyright (c) 2020 - 2022 SenseGlove
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*
|
|
* @section DESCRIPTION
|
|
*
|
|
*
|
|
*/
|
|
|
|
|
|
#include "SGCoreKismet/SGInterpolationSetKismetLibrary.h"
|
|
|
|
#include "SGCore/SGInterpolationSet.h"
|
|
|
|
USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet(UObject* WorldContextObject)
|
|
{
|
|
return USGInterpolationSet::NewInterpolationSet(WorldContextObject);
|
|
}
|
|
|
|
USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet_F1_F2_T1_T2(
|
|
UObject* WorldContextObject, const float From1, const float From2, const float To1, const float To2)
|
|
{
|
|
return USGInterpolationSet::NewInterpolationSet(WorldContextObject, From1, From2, To1, To2);
|
|
}
|
|
|
|
USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet_F1_F2_T1_T2_M_M(
|
|
UObject* WorldContextObject,
|
|
const float From1, const float From2, const float To1, const float To2, const float Min, const float Max)
|
|
{
|
|
return USGInterpolationSet::NewInterpolationSet(WorldContextObject, From1, From2, To1, To2, Min, Max);
|
|
}
|
|
|
|
USGInterpolationSet* USGInterpolationSetKismetLibrary::Deserialize(UObject* WorldContextObject,
|
|
const FString& SerializedString)
|
|
{
|
|
return USGInterpolationSet::Deserialize(WorldContextObject, SerializedString);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetX0(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetX0();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetX0(USGInterpolationSet* InterpolationSet, const float X0)
|
|
{
|
|
InterpolationSet->SetX0(X0);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetX1(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetX1();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetX1(USGInterpolationSet* InterpolationSet, const float X1)
|
|
{
|
|
InterpolationSet->SetX1(X1);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetY0(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetY0();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetY0(USGInterpolationSet* InterpolationSet, const float Y0)
|
|
{
|
|
InterpolationSet->SetY0(Y0);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetY1(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetY1();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetY1(USGInterpolationSet* InterpolationSet, const float Y1)
|
|
{
|
|
InterpolationSet->SetY1(Y1);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetMin(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetMin();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetMin(USGInterpolationSet* InterpolationSet, const float Min)
|
|
{
|
|
InterpolationSet->SetMin(Min);
|
|
}
|
|
|
|
float USGInterpolationSetKismetLibrary::GetMax(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->GetMax();
|
|
}
|
|
|
|
void USGInterpolationSetKismetLibrary::SetMax(USGInterpolationSet* InterpolationSet, const float Max)
|
|
{
|
|
InterpolationSet->SetMax(Max);
|
|
}
|
|
|
|
int32 USGInterpolationSetKismetLibrary::Get(const USGInterpolationSet* InterpolationSet, const float Value,
|
|
const bool bLimit, const bool bNormalizeAngle)
|
|
{
|
|
return InterpolationSet->Get(Value, bLimit, bNormalizeAngle);
|
|
}
|
|
|
|
bool USGInterpolationSetKismetLibrary::Equals(const USGInterpolationSet* A, const USGInterpolationSet* B)
|
|
{
|
|
return A->Equals(B);
|
|
}
|
|
|
|
FString USGInterpolationSetKismetLibrary::ToString(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->ToString();
|
|
}
|
|
|
|
FString USGInterpolationSetKismetLibrary::ToString_bL(const USGInterpolationSet* InterpolationSet, const bool bLimits)
|
|
{
|
|
return InterpolationSet->ToString(bLimits);
|
|
}
|
|
|
|
FString USGInterpolationSetKismetLibrary::SGSerialize(const USGInterpolationSet* InterpolationSet)
|
|
{
|
|
return InterpolationSet->SGSerialize();
|
|
} |