mirror of
https://github.com/Relintai/props.git
synced 2024-11-14 10:17:30 +01:00
Added 2 more virtual methods to PropDataEntry.
This commit is contained in:
parent
acc9a386e1
commit
39892b4a7c
@ -33,6 +33,8 @@ SOFTWARE.
|
|||||||
#define Spatial Node3D
|
#define Spatial Node3D
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../prop_mesher.h"
|
||||||
|
|
||||||
Transform PropDataEntry::get_transform() const {
|
Transform PropDataEntry::get_transform() const {
|
||||||
return _transform;
|
return _transform;
|
||||||
}
|
}
|
||||||
@ -59,6 +61,12 @@ Node *PropDataEntry::processor_get_node_for(const Transform &transform) {
|
|||||||
bool PropDataEntry::processor_evaluate_children() {
|
bool PropDataEntry::processor_evaluate_children() {
|
||||||
return call("_processor_evaluate_children");
|
return call("_processor_evaluate_children");
|
||||||
}
|
}
|
||||||
|
bool PropDataEntry::only_contains_mesh() {
|
||||||
|
return call("_only_contains_mesh");
|
||||||
|
}
|
||||||
|
void PropDataEntry::add_to_mesher(Ref<PropMesher> mesher) {
|
||||||
|
call("_add_to_mesher", mesher);
|
||||||
|
}
|
||||||
|
|
||||||
bool PropDataEntry::_processor_handles(Node *node) {
|
bool PropDataEntry::_processor_handles(Node *node) {
|
||||||
return false;
|
return false;
|
||||||
@ -71,6 +79,11 @@ Node *PropDataEntry::_processor_get_node_for(const Transform &transform) {
|
|||||||
bool PropDataEntry::_processor_evaluate_children() {
|
bool PropDataEntry::_processor_evaluate_children() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool PropDataEntry::_only_contains_mesh() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
void PropDataEntry::_add_to_mesher(Ref<PropMesher> mesher) {
|
||||||
|
}
|
||||||
|
|
||||||
PropDataEntry::PropDataEntry() {
|
PropDataEntry::PropDataEntry() {
|
||||||
}
|
}
|
||||||
@ -99,13 +112,21 @@ void PropDataEntry::_bind_methods() {
|
|||||||
|
|
||||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "evaluate"), "_processor_evaluate_children"));
|
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "evaluate"), "_processor_evaluate_children"));
|
||||||
|
|
||||||
|
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "is"), "_only_contains_mesh"));
|
||||||
|
BIND_VMETHOD(MethodInfo("_add_to_mesher", PropertyInfo(Variant::OBJECT, "mesher", PROPERTY_HINT_RESOURCE_TYPE, "PropMesher")));
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("processor_handles", "node"), &PropDataEntry::processor_handles);
|
ClassDB::bind_method(D_METHOD("processor_handles", "node"), &PropDataEntry::processor_handles);
|
||||||
ClassDB::bind_method(D_METHOD("processor_process", "prop_data", "node", "transform"), &PropDataEntry::processor_process);
|
ClassDB::bind_method(D_METHOD("processor_process", "prop_data", "node", "transform"), &PropDataEntry::processor_process);
|
||||||
ClassDB::bind_method(D_METHOD("processor_get_node_for", "prop_data"), &PropDataEntry::processor_get_node_for);
|
ClassDB::bind_method(D_METHOD("processor_get_node_for", "prop_data"), &PropDataEntry::processor_get_node_for);
|
||||||
ClassDB::bind_method(D_METHOD("processor_evaluate_children"), &PropDataEntry::processor_evaluate_children);
|
ClassDB::bind_method(D_METHOD("processor_evaluate_children"), &PropDataEntry::processor_evaluate_children);
|
||||||
|
ClassDB::bind_method(D_METHOD("only_contains_mesh"), &PropDataEntry::only_contains_mesh);
|
||||||
|
ClassDB::bind_method(D_METHOD("add_to_mesher", "mesher"), &PropDataEntry::add_to_mesher);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_processor_handles", "node"), &PropDataEntry::_processor_handles);
|
ClassDB::bind_method(D_METHOD("_processor_handles", "node"), &PropDataEntry::_processor_handles);
|
||||||
ClassDB::bind_method(D_METHOD("_processor_process", "prop_data", "node", "transform"), &PropDataEntry::_processor_process);
|
ClassDB::bind_method(D_METHOD("_processor_process", "prop_data", "node", "transform"), &PropDataEntry::_processor_process);
|
||||||
ClassDB::bind_method(D_METHOD("_processor_get_node_for", "transform"), &PropDataEntry::_processor_get_node_for);
|
ClassDB::bind_method(D_METHOD("_processor_get_node_for", "transform"), &PropDataEntry::_processor_get_node_for);
|
||||||
ClassDB::bind_method(D_METHOD("_processor_evaluate_children"), &PropDataEntry::_processor_evaluate_children);
|
ClassDB::bind_method(D_METHOD("_processor_evaluate_children"), &PropDataEntry::_processor_evaluate_children);
|
||||||
|
ClassDB::bind_method(D_METHOD("_only_contains_mesh"), &PropDataEntry::_only_contains_mesh);
|
||||||
|
ClassDB::bind_method(D_METHOD("_add_to_mesher", "mesher"), &PropDataEntry::_add_to_mesher);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ SOFTWARE.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class PropData;
|
class PropData;
|
||||||
|
class PropMesher;
|
||||||
|
|
||||||
class PropDataEntry : public Resource {
|
class PropDataEntry : public Resource {
|
||||||
GDCLASS(PropDataEntry, Resource);
|
GDCLASS(PropDataEntry, Resource);
|
||||||
@ -54,11 +55,15 @@ public:
|
|||||||
void processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);
|
void processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);
|
||||||
Node *processor_get_node_for(const Transform &transform);
|
Node *processor_get_node_for(const Transform &transform);
|
||||||
bool processor_evaluate_children();
|
bool processor_evaluate_children();
|
||||||
|
bool only_contains_mesh();
|
||||||
|
void add_to_mesher(Ref<PropMesher> mesher);
|
||||||
|
|
||||||
virtual bool _processor_handles(Node *node);
|
virtual bool _processor_handles(Node *node);
|
||||||
virtual void _processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);
|
virtual void _processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);
|
||||||
virtual Node *_processor_get_node_for(const Transform &transform);
|
virtual Node *_processor_get_node_for(const Transform &transform);
|
||||||
virtual bool _processor_evaluate_children();
|
virtual bool _processor_evaluate_children();
|
||||||
|
virtual bool _only_contains_mesh();
|
||||||
|
virtual void _add_to_mesher(Ref<PropMesher> mesher);
|
||||||
|
|
||||||
PropDataEntry();
|
PropDataEntry();
|
||||||
~PropDataEntry();
|
~PropDataEntry();
|
||||||
|
Loading…
Reference in New Issue
Block a user