feat: implemented point primitive gizmo
This commit is contained in:
parent
60865b74c7
commit
dfbe37a2e7
15 changed files with 330 additions and 60 deletions
23
modules/terrain_editor/point_primitive_node.h
Normal file
23
modules/terrain_editor/point_primitive_node.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#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) };
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue