26 lines
654 B
C++
26 lines
654 B
C++
#pragma once
|
|
|
|
#include "scene/3d/node_3d.h"
|
|
#include "terrain_editor/terrain_primitive.h"
|
|
|
|
class PointPrimitiveNode : public Node3D {
|
|
GDCLASS(PointPrimitiveNode, Node3D);
|
|
static void _bind_methods();
|
|
void on_underlying_changed();
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
public:
|
|
void preview_transform_changes();
|
|
void push_transform_changes();
|
|
void set_primitive(Ref<PointPrimitive> primitive);
|
|
Ref<PointPrimitive> get_primitive() const;
|
|
|
|
private:
|
|
Vector3 last_pushed_position{};
|
|
bool pushing_change{ false };
|
|
Ref<PointPrimitive> primitive{};
|
|
Callable underlying_changed_callable{ callable_mp(this, &self_type::on_underlying_changed) };
|
|
};
|