people, mops

This commit is contained in:
2023-12-19 14:20:05 +05:00
parent a43d779dcc
commit 9fd28ffdb0
87 changed files with 3835 additions and 3 deletions
@@ -0,0 +1,40 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/SplineComponent.h"
#include "MySplineComponent.generated.h"
/**
*
*/
UCLASS(ClassGroup = Utility, ShowCategories = (Mobility), HideCategories = (Physics, Collision, Lighting, Rendering, Mobile), meta = (BlueprintSpawnableComponent, ShortTooltip="add approximate function to construction script, optionally drawApproximatedSplineDebug. Then use getRealLocationByDistance instead of getLocationByDistance"))
class UApproximatedSplineComponent : public USplineComponent
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = Approximation)
FVector getRealLocationByDistance(double distance, ESplineCoordinateSpace::Type space);
UFUNCTION(BlueprintCallable, Category = Approximation)
FRotator getRealRotationByDistance(double distance, ESplineCoordinateSpace::Type space);
UFUNCTION(BlueprintCallable, Category = Approximation)
/*transform scale always 1 as I never used it*/
FTransform getRealTransformByDistance(double distance, ESplineCoordinateSpace::Type space);
UPROPERTY(VisibleInstanceOnly,BlueprintReadOnly, Category = Approximation)
int numOfApproximatedPoints;
private:
/**optimizetolerance in % is threshold for removing unnesesary approximated points on stright parts of spline*/
UFUNCTION(BlueprintCallable, Category = Spline)
void approximate(int precision = 10, double optimizeTolerance = 0.1);
UFUNCTION(BlueprintCallable, Category = Spline)
void drawApproximatedSplineDebug(float pointSize = 50, FLinearColor lineColor = FLinearColor(0, 0, 1), float debugDuration = 0, float thickness = 0);
UPROPERTY()
TMap<double, FTransform> map;
};
@@ -0,0 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
class FapproximatedSplineModule : public IModuleInterface
{
public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};