minor code improvements and clean up
This commit is contained in:
@@ -50,18 +50,18 @@ public:
|
||||
static FORCEINLINE float TransformToSenseGlove(const int32 Movement, const float Direction)
|
||||
{
|
||||
// 0 = twist, 1 = flexion/extension, 2 = abduction
|
||||
return FMath::DegreesToRadians(Movement != 1 ? Direction * -1.0f : Direction);
|
||||
return FMath::DegreesToRadians(Movement != 1 ? -Direction : Direction);
|
||||
}
|
||||
|
||||
static FORCEINLINE FVector TransformToSenseGlove(const FVector& Vector)
|
||||
{
|
||||
return FMath::DegreesToRadians(FVector(Vector.Y * -1.0f, Vector.X, Vector.Z));
|
||||
return FMath::DegreesToRadians(FVector(-Vector.Y, Vector.X, Vector.Z));
|
||||
}
|
||||
|
||||
template<typename V>
|
||||
static FORCEINLINE V TransformToSenseGlove(const FVector& Vector)
|
||||
{
|
||||
return FMath::DegreesToRadians(V(Vector.Y * -1.0f, Vector.X, Vector.Z));
|
||||
return FMath::DegreesToRadians(V(-Vector.Y, Vector.X, Vector.Z));
|
||||
}
|
||||
|
||||
static FORCEINLINE float TransformToUnreal(const float Radians)
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
/// values require validation.
|
||||
|
||||
// 0 = twist, 1 = flexion/extension, 2 = abduction
|
||||
return Movement != 1 ? Direction * -1.0f : Direction;
|
||||
return Movement != 1 ? -Direction : Direction;
|
||||
}
|
||||
|
||||
static FORCEINLINE constexpr float TransformToUnreal(const ESGFingerMovement Movement, const float Direction)
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
/// Which flexions should be ignored?
|
||||
return (Movement != ESGFingerMovement::McpFlexion && Movement != ESGFingerMovement::PipFlexion && Movement !=
|
||||
ESGFingerMovement::PipFlexion)
|
||||
? Direction * -1.0f
|
||||
? -Direction
|
||||
: Direction;
|
||||
}
|
||||
|
||||
@@ -108,19 +108,19 @@ public:
|
||||
Movement != ESGThumbMovement::CmcFlexion
|
||||
&& Movement != ESGThumbMovement::McpFlexion
|
||||
&& Movement != ESGThumbMovement::IpFlexion
|
||||
? Direction * -1.0f
|
||||
? -Direction
|
||||
: Direction);
|
||||
}
|
||||
|
||||
static FORCEINLINE FVector TransformToUnreal(const FVector& Vector)
|
||||
{
|
||||
return FMath::RadiansToDegrees(FVector(Vector.Y * -1.0f, Vector.X, Vector.Z));
|
||||
return FMath::RadiansToDegrees(FVector(-Vector.Y, Vector.X, Vector.Z));
|
||||
}
|
||||
|
||||
template<typename V>
|
||||
static FORCEINLINE FVector TransformToUnreal(const V& Vector)
|
||||
{
|
||||
return FMath::RadiansToDegrees(FVector(Vector.GetY() * -1.0f, Vector.GetX(), Vector.GetZ()));
|
||||
return FMath::RadiansToDegrees(FVector(-Vector.GetY(), Vector.GetX(), Vector.GetZ()));
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user