diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp deleted file mode 100644 index dea60f6c..00000000 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * - * @author Mamadou Babaei - * - * @section LICENSE - * - * (The MIT License) - * - * Copyright (c) 2020 - 2023 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 "SenseGlove/Components/SGGrabComponent.h" - -struct USGGrabComponent::FImpl -{ - /************************ - * Static methods - ************************/ - - /************************ - * Owner object - ************************/ - - USGGrabComponent* Owner; - - /************************ - * Constructor / Destructor - ************************/ - - explicit FImpl(USGGrabComponent* InOwner); - ~FImpl(); - - /************************ - * Default copy constructor & copy assignment operator - ************************/ - - FImpl(const FImpl& Rhs) = default; - FImpl& operator=(const FImpl& Rhs) = default; - - /************************ - * Methods - ************************/ -}; - -bool USGGrabComponent::IsGrabbable(const AActor* Actor) -{ - if (ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!"))) - { - return false; - } - - const USGGrabComponent* GrabComponent = Cast( - Actor->GetComponentByClass(USGGrabComponent::StaticClass())); - if (!IsValid(GrabComponent)) - { - return false; - } - - return true; -} - -USGGrabComponent::USGGrabComponent(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer), - Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) -{ -} - -USGGrabComponent::FImpl::FImpl(USGGrabComponent* InOwner) - : Owner(InOwner) -{ -} - -USGGrabComponent::FImpl::~FImpl() = default; - -void USGGrabComponent::FImplDeleter::operator()(const FImpl* P) const -{ - delete P; -} \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h b/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h deleted file mode 100644 index 58f8d9bc..00000000 --- a/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file - * - * @author Mamadou Babaei - * - * @section LICENSE - * - * (The MIT License) - * - * Copyright (c) 2020 - 2023 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 - * - * - */ - - -#pragma once - -#include "Components/SceneComponent.h" -#include "Templates/UniquePtr.h" - -#include "SGGrabComponent.generated.h" - -class AActor; - -UCLASS(Blueprintable, BlueprintType, meta=(BlueprintSpawnableComponent)) -class SENSEGLOVE_API USGGrabComponent : public USceneComponent -{ - GENERATED_UCLASS_BODY() - -public: - static bool IsGrabbable(const AActor* Actor); - -private: - struct FImpl; - - struct FImplDeleter - { - void operator()(const FImpl* P) const; - }; - - TUniquePtr Pimpl; - FImplDeleter PimplDeleter; - -public: -}; \ No newline at end of file diff --git a/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp b/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp deleted file mode 100644 index 6969783b..00000000 --- a/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp +++ /dev/null @@ -1,46 +0,0 @@ - -/** - * @file - * - * @author Mamadou Babaei - * - * @section LICENSE - * - * (The MIT License) - * - * Copyright (c) 2020 - 2023 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 - * - * A data class containing the minimum required data for a hand's forward - * kinematics. - * Used in both kinematics and calibration. - */ - - -#include "SGKismet/SGGrabComponentKismetLibrary.h" - -#include "SenseGlove/Components/SGGrabComponent.h" - -bool UGrabComponentKismetLibrary::IsGrabbable(const AActor* Actor) -{ - return USGGrabComponent::IsGrabbable(Actor); -} \ No newline at end of file diff --git a/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h b/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h deleted file mode 100644 index 286ff74d..00000000 --- a/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file - * - * @author Mamadou Babaei - * - * @section LICENSE - * - * (The MIT License) - * - * Copyright (c) 2020 - 2023 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 - * - * A data class containing the minimum required data for a hand's forward - * kinematics. - * Used in both kinematics and calibration. - */ - - -#pragma once - -#include "SGKismet/SGBlueprintFunctionLibrary.h" - -#include "SGGrabComponentKismetLibrary.generated.h" - -class AActor; -class UGrabComponent; - -UCLASS(meta=(ScriptName = "SesneGloveGrabComponentKismetLibrary")) -class SENSEGLOVEKISMET_API UGrabComponentKismetLibrary final : public USGBlueprintFunctionLibrary -{ - GENERATED_BODY() - -public: - UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") - static bool IsGrabbable(const AActor* Actor); -}; \ No newline at end of file