mirror of
https://github.com/Relintai/voxelman.git
synced 2025-04-25 21:25:00 +02:00
Bit more work on porting PropTool.
This commit is contained in:
parent
e45e3875f8
commit
d672f997ba
@ -22,6 +22,58 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "prop_tool_mesh.h"
|
#include "prop_tool_mesh.h"
|
||||||
|
|
||||||
|
Ref<PropDataMesh> PropToolMesh::get_data() {
|
||||||
|
return _prop_mesh;
|
||||||
|
}
|
||||||
|
void PropToolMesh::set_data(const Ref<PropDataMesh> &data) {
|
||||||
|
_prop_mesh = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<Texture> PropToolMesh::get_texture() {
|
||||||
|
return _texture;
|
||||||
|
}
|
||||||
|
void PropToolMesh::set_texture(const Ref<Texture> &tex) {
|
||||||
|
_texture = tex;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PropToolMesh::get_snap_to_mesh() const {
|
||||||
|
return _snap_to_mesh;
|
||||||
|
}
|
||||||
|
void PropToolMesh::set_snap_to_mesh(const bool value) {
|
||||||
|
_snap_to_mesh = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 PropToolMesh::get_snap_axis() const {
|
||||||
|
return _snap_axis;
|
||||||
|
}
|
||||||
|
void PropToolMesh::set_snap_axis(const Vector3 &value) {
|
||||||
|
_snap_axis = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<MeshDataResource> PropToolMesh::get_prop_mesh() {
|
||||||
|
return _prop_mesh;
|
||||||
|
}
|
||||||
|
void PropToolMesh::set_prop_mesh(const Ref<MeshDataResource> &data) {
|
||||||
|
_prop_mesh = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropToolMesh::generate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
PropToolMesh::PropToolMesh() {
|
||||||
|
bool _snap_to_mesh;
|
||||||
|
}
|
||||||
|
PropToolMesh::~PropToolMesh() {
|
||||||
|
_prop_mesh.unref();
|
||||||
|
_material.unref();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropToolMesh::set_generate(bool value) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropToolMesh::_bind_methods() {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
tool
|
tool
|
||||||
extends MeshInstance
|
extends MeshInstance
|
||||||
|
@ -45,6 +45,9 @@ public:
|
|||||||
bool get_snap_to_mesh() const;
|
bool get_snap_to_mesh() const;
|
||||||
void set_snap_to_mesh(const bool value);
|
void set_snap_to_mesh(const bool value);
|
||||||
|
|
||||||
|
Vector3 get_snap_axis() const;
|
||||||
|
void set_snap_axis(const Vector3 &value);
|
||||||
|
|
||||||
Ref<MeshDataResource> get_prop_mesh();
|
Ref<MeshDataResource> get_prop_mesh();
|
||||||
void set_prop_mesh(const Ref<MeshDataResource> &data);
|
void set_prop_mesh(const Ref<MeshDataResource> &data);
|
||||||
|
|
||||||
@ -60,8 +63,10 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ref<PropDataMesh> _prop_mesh;
|
Ref<PropDataMesh> _prop_mesh;
|
||||||
|
Ref<Texture> _texture;
|
||||||
Ref<SpatialMaterial> _material;
|
Ref<SpatialMaterial> _material;
|
||||||
bool _snap_to_mesh;
|
bool _snap_to_mesh;
|
||||||
|
Vector3 _snap_axis;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user