CARLA
 
载入中...
搜索中...
未找到
BaseVegetationActor.h
浏览该文件的文档.
1// Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#include "GameFramework/Actor.h"
11
12#include "BaseVegetationActor.generated.h"
13
14USTRUCT(BlueprintType)
16{
17 GENERATED_BODY()
18 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
19 float Beta = 0.5f;
20
21 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
22 float Alpha = 0.f;
23
24 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
25 FVector Gravity = FVector(0,0,-1);
26
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
28 float BaseSpringStrength = 10000.f;
29
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
31 float MinSpringStrength = 2000.f;
32
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
34 float HorizontalFallof = 0.1f;
35
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
37 float VerticalFallof = 0.1f;
38
39 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
40 float RestFactor = 0.5f;
41
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
43 float DeltaTimeOverride = -1.f;
44
45 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
46 float CollisionForceParameter = 10.f;
47
48 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
49 float CollisionForceMinVel = 1.f;
50
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
52 float ForceDistanceFalloffExponent = 1.f;
53 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
54 float ForceMaxDistance = 180.f;
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
56 float MinForceFactor = 0.01;
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
58 float LineTraceMaxDistance = 180.f;
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
60 float CapsuleRadius = 6.0f;
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
62 float MinBoneLength = 10.f;
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
64 FVector SpringStrengthMulFactor = FVector(1,1,1);
65 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
66 float VehicleCenterZOffset = 120.f;
67
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
70
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation Component")
72 bool bAutoComputeStrength = true;
73
74};
75
76UCLASS()
77class CARLA_API ABaseVegetationActor : public AActor
78{
79 GENERATED_BODY()
80
81public:
82
83 virtual void BeginPlay() override;
84
85 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spring Based Vegetation")
87
88 UFUNCTION(BlueprintCallable, CallInEditor, Category = "Spring Based Vegetation")
89 void GetParametersFromComponent();
90
91 UFUNCTION(BlueprintCallable, CallInEditor, Category = "Spring Based Vegetation")
92 void SetParametersToComponent();
93
94 UFUNCTION(BlueprintCallable, CallInEditor, Category = "Spring Based Vegetation")
95 void UpdateSkeletonAndParameters();
96
97};