void ULeapSwipeGesture::SetGesture(const Leap::SwipeGesture &Gesture) { //Super ULeapGesture::SetGesture(Gesture); Private->Gesture = Gesture; Direction = ConvertLeapToUE(Private->Gesture.direction()); Position = ConvertAndScaleLeapToUE(Private->Gesture.position()); Speed = ScaleLeapToUE(Private->Gesture.speed()); StartPosition = ConvertAndScaleLeapToUE(Private->Gesture.startPosition()); //Convenience BasicDirection = LeapBasicVectorDirection(Direction); }
void ULeapBone::SetBone(const Leap::Bone &Bone) { Private->Bone = Bone; Basis = ConvertLeapBasisMatrix(Private->Bone.basis()); Center = ConvertAndScaleLeapToUE(Private->Bone.center()); Direction = ConvertLeapToUE(Private->Bone.direction()); //Orientation = FRotationMatrix::MakeFromZX(PalmNormal*-1.f, Direction).Rotator(); use GetOrientation() IsValid = Private->Bone.isValid(); Length = ScaleLeapToUE(Private->Bone.length()); NextJoint = ConvertAndScaleLeapToUE(Private->Bone.nextJoint()); PrevJoint = ConvertAndScaleLeapToUE(Private->Bone.prevJoint()); Type = ConvertBoneType(Private->Bone.type()); Width = ScaleLeapToUE(Private->Bone.width()); }
void ULeapInteractionBox::SetInteractionBox(const Leap::InteractionBox &InteractionBox) { Private->InteractionBox = InteractionBox; Center = ConvertAndScaleLeapToUE(Private->InteractionBox.center()); Depth = Private->InteractionBox.depth(); Height = Private->InteractionBox.height(); IsValid = Private->InteractionBox.isValid(); Width = Private->InteractionBox.width(); }
void ULeapScreenTapGesture::SetGesture(const Leap::ScreenTapGesture &Gesture) { //Super ULeapGesture::SetGesture(Gesture); Private->Gesture = Gesture; Direction = ConvertLeapToUE(Private->Gesture.direction()); Position = ConvertAndScaleLeapToUE(Private->Gesture.position()); Progress = Private->Gesture.progress(); //Convenience BasicDirection = LeapBasicVectorDirection(Direction); }
FVector ULeapInteractionBox::NormalizePoint(FVector Vector, bool Clamp) const { Leap::Vector LeapVector = ConvertAndScaleUEToLeap(Vector); return (ConvertAndScaleLeapToUE(Private->InteractionBox.normalizePoint(LeapVector, Clamp))); }