add missing nova glove hand profile wrappers in layer 3/4 of the api and also more documentation

This commit is contained in:
Mamadou Babaei
2022-11-18 15:02:55 +01:00
parent 3ba496aa49
commit f8969d79b7
4 changed files with 115 additions and 4 deletions
@@ -107,6 +107,24 @@ USGNovaGloveHandProfile* USGNovaGloveHandProfile::NewNovaGloveHandProfile(
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
}
USGNovaGloveHandProfile* USGNovaGloveHandProfile::Default(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
SGCoreImpl_FSGNovaGloveHandProfileImpl_Default(&OutNovaGloveHandProfileImplContainer, bRightHanded);
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
}
USGNovaGloveHandProfile* USGNovaGloveHandProfile::Deserialize(UObject* Outer, const FString& SerializedString)
{
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
FSGIC_FString SerializedStringContainer{SerializedString};
SGCoreImpl_FSGNovaGloveHandProfileImpl_Deserialize(&OutNovaGloveHandProfileImplContainer,
&SerializedStringContainer);
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
}
USGNovaGloveHandProfile::USGNovaGloveHandProfile()
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -29,7 +29,8 @@
*
* @section DESCRIPTION
*
*
* Input for Nova kinematics to calculate a HandPose.
* Output of calibration algorithms.
*/
@@ -48,6 +49,9 @@
class FSGNovaGloveHandProfileImpl;
/**
* Contains user-specific data for the Nova to convert sensor data into a hand pose.
*/
UCLASS(BlueprintType)
class SENSEGLOVECORE_API USGNovaGloveHandProfile final : public UObject
{
@@ -58,11 +62,28 @@ public:
UObject* Outer, const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl);
public:
/**
* The default constructor.
*/
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(UObject* Outer);
/**
* Create a new instance of a Nova-Profile.
*/
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator);
public:
/**
* Creates a default Nova Profile for a left or right hand.
*/
static USGNovaGloveHandProfile* Default(UObject* Outer, bool bRightHanded);
/**
* Convert a string notation of a NovaGloveHandProfile into a new instance.
*/
static USGNovaGloveHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
private:
struct FImpl;
@@ -75,8 +96,14 @@ private:
FImplDeleter PimplDeleter;
public:
/**
* The default constructor.
*/
USGNovaGloveHandProfile();
/**
* Create a new instance of a Nova-Profile.
*/
USGNovaGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator);
public:
@@ -104,15 +131,30 @@ public:
const FSGNovaGloveHandProfileImpl& ToNovaGloveHandProfileImpl() const;
public:
/**
* Whether this profile was created for a right- or left hand.
*/
bool IsRight() const;
/**
* Interpolation sets to convert sensor data into a hand pose.
*/
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
public:
/**
*
*/
bool Equals(const USGNovaGloveHandProfile* NovaGloveHandProfile) const;
/**
*
*/
void Reset();
public:
/**
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
*/
FString SGSerialize() const;
};
@@ -49,6 +49,18 @@ USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::MakeNovaGloveHand
return USGNovaGloveHandProfile::NewNovaGloveHandProfile(WorldContextObject, bRightHanded, Interpolator);
}
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::Default(UObject* WorldContextObject,
const bool bRightHanded)
{
return USGNovaGloveHandProfile::Default(WorldContextObject, bRightHanded);
}
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::Deserialize(UObject* WorldContextObject,
const FString& SerializedString)
{
return USGNovaGloveHandProfile::Deserialize(WorldContextObject, SerializedString);
}
bool USGNovaGloveHandProfileKismetLibrary::IsRight(const USGNovaGloveHandProfile* NovaGloveHandProfile)
{
return NovaGloveHandProfile->IsRight();
@@ -29,7 +29,8 @@
*
* @section DESCRIPTION
*
*
* Input for Nova kinematics to calculate a HandPose.
* Output of calibration algorithms.
*/
@@ -42,35 +43,73 @@
class USGHandInterpolator;
class USGNovaGloveHandProfile;
/**
* Contains user-specific data for the Nova to convert sensor data into a hand pose.
*/
UCLASS(meta=(ScriptName = "SesneGloveNovaGloveHandProfileKismetLibrary"))
class SENSEGLOVECOREKISMET_API USGNovaGloveHandProfileKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
/**
* The default constructor.
*/
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
meta=(WorldContext="WorldContextObject"))
static USGNovaGloveHandProfile* MakeNovaGloveHandProfile(UObject* WorldContextObject);
UFUNCTION(BlueprintPure, DisplayName="Make Nova Glove Hand Profile",
/**
* Create a new instance of a Nova-Profile.
*/
UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Hand Profile",
Category="SenseGlove | Core | Nova | Nova Glove Hand Profile", meta=(WorldContext="WorldContextObject"))
static USGNovaGloveHandProfile* MakeNovaGloveHandProfile_bRH_I(
UObject* WorldContextObject, bool bRightHanded, const USGHandInterpolator* Interpolator);
/**
* Creates a default Nova Profile for a left or right hand.
*/
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
meta=(WorldContext="WorldContextObject"))
static USGNovaGloveHandProfile* Default(UObject* WorldContextObject, bool bRightHanded);
/**
* Convert a string notation of a NovaGloveHandProfile into a new instance.
*/
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
meta=(WorldContext="WorldContextObject"))
static USGNovaGloveHandProfile* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
/**
* Whether this profile was created for a right- or left hand.
*/
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
static bool IsRight(const USGNovaGloveHandProfile* NovaGloveHandProfile);
/**
* Interpolation sets to convert sensor data into a hand pose.
*/
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
meta=(WorldContext="WorldContextObject"))
static USGHandInterpolator* GetInterpolationSet(UObject* WorldContextObject,
const USGNovaGloveHandProfile* NovaGloveHandProfile);
/**
*
*/
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
static bool Equals(const USGNovaGloveHandProfile* A, const USGNovaGloveHandProfile* B);
/**
*
*/
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
static void Reset(UPARAM(ref) USGNovaGloveHandProfile* NovaGloveHandProfile);
/**
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
*/
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
static FString SGSerialize(const USGNovaGloveHandProfile* NovaGloveHandProfile);
};