From 1a978f33de33a50e7b53e360e8514f4aeb7d83da Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Thu, 9 Feb 2023 21:16:49 +0100 Subject: [PATCH] add senseglove module base classes --- .../SenseGlove/Animation/SGAnimInstance.cpp | 52 ++++++++++++++++++ .../Animation/SGAnimInstanceProxy.cpp | 36 +++++++++++++ .../SenseGlove/GameFramework/SGCharacter.cpp | 42 +++++++++++++++ .../GameFramework/SGGameModeBase.cpp | 46 ++++++++++++++++ .../GameFramework/SGPlayerController.cpp | 42 +++++++++++++++ .../SenseGlove/Animation/SGAnimInstance.h | 54 +++++++++++++++++++ .../Animation/SGAnimInstanceProxy.h | 46 ++++++++++++++++ .../SenseGlove/GameFramework/SGCharacter.h | 46 ++++++++++++++++ .../SenseGlove/GameFramework/SGGameModeBase.h | 46 ++++++++++++++++ .../GameFramework/SGPlayerController.h | 46 ++++++++++++++++ 10 files changed, 456 insertions(+) create mode 100644 Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstance.cpp create mode 100644 Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstanceProxy.cpp create mode 100644 Source/SenseGlove/Private/SenseGlove/GameFramework/SGCharacter.cpp create mode 100644 Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp create mode 100644 Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp create mode 100644 Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstance.h create mode 100644 Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstanceProxy.h create mode 100644 Source/SenseGlove/Public/SenseGlove/GameFramework/SGCharacter.h create mode 100644 Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h create mode 100644 Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h diff --git a/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstance.cpp b/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstance.cpp new file mode 100644 index 00000000..25d6386f --- /dev/null +++ b/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstance.cpp @@ -0,0 +1,52 @@ +/** + * @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/Animation/SGAnimInstance.h" + +USGAnimInstance::USGAnimInstance(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + +} + +void USGAnimInstance::NativeInitializeAnimation() +{ + Super::NativeInitializeAnimation(); +} + +FSGAnimInstanceProxy* USGAnimInstance::CreateAnimInstanceProxy() +{ + return new FSGAnimInstanceProxy(); +} \ No newline at end of file diff --git a/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstanceProxy.cpp b/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstanceProxy.cpp new file mode 100644 index 00000000..5a3a93e6 --- /dev/null +++ b/Source/SenseGlove/Private/SenseGlove/Animation/SGAnimInstanceProxy.cpp @@ -0,0 +1,36 @@ +/** + * @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/Animation/SGAnimInstanceProxy.h" \ No newline at end of file diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGCharacter.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGCharacter.cpp new file mode 100644 index 00000000..03ccdcec --- /dev/null +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGCharacter.cpp @@ -0,0 +1,42 @@ +/** + * @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/GameFramework/SGCharacter.h" + +ASGCharacter::ASGCharacter(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + +} \ No newline at end of file diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp new file mode 100644 index 00000000..c1d6f690 --- /dev/null +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp @@ -0,0 +1,46 @@ +/** + * @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/GameFramework//SGGameModeBase.h" + +#include "SenseGlove/GameFramework/SGCharacter.h" +#include "SenseGlove/GameFramework/SGPlayerController.h" + +ASGGameModeBase::ASGGameModeBase(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + DefaultPawnClass = ASGCharacter::StaticClass(); + PlayerControllerClass = ASGPlayerController::StaticClass(); +} \ No newline at end of file diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp new file mode 100644 index 00000000..ed3539c7 --- /dev/null +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp @@ -0,0 +1,42 @@ +/** + * @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/GameFramework/SGPlayerController.h" + +ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + +} \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstance.h b/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstance.h new file mode 100644 index 00000000..e1feccce --- /dev/null +++ b/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstance.h @@ -0,0 +1,54 @@ +/** + * @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 "Animation/AnimInstance.h" + +#include "SenseGlove/Animation/SGAnimInstanceProxy.h" + +#include "SGAnimInstance.generated.h" + +UCLASS(Transient, Blueprintable, HideCategories=SGAnimInstance, BlueprintType, Meta=(BlueprintThreadSafe), Within=SkeletalMeshComponent) +class SENSEGLOVE_API USGAnimInstance : public UAnimInstance +{ + GENERATED_UCLASS_BODY() + +public: + virtual void NativeInitializeAnimation() override; + +protected: + virtual FSGAnimInstanceProxy* CreateAnimInstanceProxy() override; +}; \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstanceProxy.h b/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstanceProxy.h new file mode 100644 index 00000000..2ad2b356 --- /dev/null +++ b/Source/SenseGlove/Public/SenseGlove/Animation/SGAnimInstanceProxy.h @@ -0,0 +1,46 @@ +/** + * @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 "Animation/AnimInstanceProxy.h" + +#include "SGAnimInstanceProxy.generated.h" + +USTRUCT() +struct SENSEGLOVE_API FSGAnimInstanceProxy : public FAnimInstanceProxy +{ + GENERATED_USTRUCT_BODY() +}; \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/GameFramework/SGCharacter.h b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGCharacter.h new file mode 100644 index 00000000..7192979c --- /dev/null +++ b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGCharacter.h @@ -0,0 +1,46 @@ +/** + * @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 "GameFramework/Character.h" + +#include "SGCharacter.generated.h" + +UCLASS(Config=Game, BlueprintType) +class SENSEGLOVE_API ASGCharacter : public ACharacter +{ + GENERATED_UCLASS_BODY() +}; \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h new file mode 100644 index 00000000..167730d5 --- /dev/null +++ b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h @@ -0,0 +1,46 @@ +/** + * @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 "GameFramework/GameModeBase.h" + +#include "SGGameModeBase.generated.h" + +UCLASS(Config=Game, NotPlaceable, BlueprintType, Blueprintable, Transient) +class SENSEGLOVE_API ASGGameModeBase : public AGameModeBase +{ + GENERATED_UCLASS_BODY() +}; \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h new file mode 100644 index 00000000..7c484c7b --- /dev/null +++ b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h @@ -0,0 +1,46 @@ +/** + * @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 "GameFramework/PlayerController.h" + +#include "SGPlayerController.generated.h" + +UCLASS(Config=Game, BlueprintType, Blueprintable) +class SENSEGLOVE_API ASGPlayerController : public APlayerController +{ + GENERATED_UCLASS_BODY() +}; \ No newline at end of file