terrain-editor/modules/terrain_editor/point_primitive_node.h

24 lines
586 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 push_transform_changes();
void set_primitive(Ref<PointPrimitive> primitive);
Ref<PointPrimitive> get_primitive() const;
private:
bool pushing_change{ false };
Ref<PointPrimitive> primitive{};
Callable underlying_changed_callable{ callable_mp(this, &self_type::on_underlying_changed) };
};