37 lines
938 B
C++
37 lines
938 B
C++
#pragma once
|
|
|
|
#include "scene/3d/path_3d.h"
|
|
#include "terrain/shared_mutex.h"
|
|
#include "terrain/terrain_modifier.h"
|
|
|
|
class TerrainModifierPath : public TerrainModifier {
|
|
GDCLASS(TerrainModifierPath, TerrainModifier);
|
|
static void _bind_methods();
|
|
void curves_changed();
|
|
bool update_bounds();
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
public:
|
|
float evaluate_at(Vector2 world_coordinate, float before) override;
|
|
void path_changed();
|
|
void children_changed();
|
|
PackedStringArray get_configuration_warnings() const override;
|
|
|
|
private:
|
|
SharedMutex lock{};
|
|
Path3D *path{ nullptr };
|
|
Transform3D global_path_transform{};
|
|
Ref<Curve3D> path_buffer{};
|
|
Ref<Curve> curve_left_buffer{};
|
|
Ref<Curve> curve_left{};
|
|
Ref<Curve> curve_right_buffer{};
|
|
Ref<Curve> curve_right{};
|
|
|
|
public:
|
|
void set_curve_left(Ref<Curve> curve);
|
|
Ref<Curve> get_curve_left() const;
|
|
void set_curve_right(Ref<Curve> curve);
|
|
Ref<Curve> get_curve_right() const;
|
|
};
|