summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/proximity_group_3d.cpp9
-rw-r--r--scene/3d/proximity_group_3d.h10
-rw-r--r--scene/3d/xr_nodes.cpp36
-rw-r--r--scene/3d/xr_nodes.h28
4 files changed, 20 insertions, 63 deletions
diff --git a/scene/3d/proximity_group_3d.cpp b/scene/3d/proximity_group_3d.cpp
index cdc88abf4c..1a0677c603 100644
--- a/scene/3d/proximity_group_3d.cpp
+++ b/scene/3d/proximity_group_3d.cpp
@@ -179,14 +179,5 @@ void ProximityGroup3D::_bind_methods() {
};
ProximityGroup3D::ProximityGroup3D() {
- group_version = 0;
- dispatch_mode = MODE_PROXY;
-
- cell_size = 1.0;
- grid_radius = Vector3(1, 1, 1);
set_notify_transform(true);
};
-
-ProximityGroup3D::~ProximityGroup3D(){
-
-};
diff --git a/scene/3d/proximity_group_3d.h b/scene/3d/proximity_group_3d.h
index 780c65e92b..dd3a2f0a87 100644
--- a/scene/3d/proximity_group_3d.h
+++ b/scene/3d/proximity_group_3d.h
@@ -49,14 +49,14 @@ public:
void _notification(int p_what);
- DispatchMode dispatch_mode;
+ DispatchMode dispatch_mode = MODE_PROXY;
Map<StringName, uint32_t> groups;
String group_name;
- float cell_size;
- Vector3 grid_radius;
- uint32_t group_version;
+ float cell_size = 1.0;
+ Vector3 grid_radius = Vector3(1, 1, 1);
+ uint32_t group_version = 0;
void add_groups(int *p_cell, String p_base, int p_depth);
void _new_group(StringName p_name);
@@ -78,7 +78,7 @@ public:
void broadcast(String p_name, Variant p_params);
ProximityGroup3D();
- ~ProximityGroup3D();
+ ~ProximityGroup3D() {}
};
VARIANT_ENUM_CAST(ProximityGroup3D::DispatchMode);
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index f9f6b6905c..f4a514cdd6 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "xr_nodes.h"
+
#include "core/input/input.h"
#include "servers/xr/xr_interface.h"
#include "servers/xr_server.h"
@@ -168,14 +169,6 @@ Vector<Plane> XRCamera3D::get_frustum() const {
return cm.get_projection_planes(get_camera_transform());
};
-XRCamera3D::XRCamera3D(){
- // nothing to do here yet for now..
-};
-
-XRCamera3D::~XRCamera3D(){
- // nothing to do here yet for now..
-};
-
////////////////////////////////////////////////////////////////////////////////////////////////////
void XRController3D::_notification(int p_what) {
@@ -382,16 +375,6 @@ String XRController3D::get_configuration_warning() const {
return String();
};
-XRController3D::XRController3D() {
- controller_id = 1;
- is_active = true;
- button_states = 0;
-};
-
-XRController3D::~XRController3D(){
- // nothing to do here yet for now..
-};
-
////////////////////////////////////////////////////////////////////////////////////////////////////
void XRAnchor3D::_notification(int p_what) {
@@ -522,15 +505,6 @@ Ref<Mesh> XRAnchor3D::get_mesh() const {
return mesh;
}
-XRAnchor3D::XRAnchor3D() {
- anchor_id = 1;
- is_active = true;
-};
-
-XRAnchor3D::~XRAnchor3D(){
- // nothing to do here yet for now..
-};
-
////////////////////////////////////////////////////////////////////////////////////////////////////
String XROrigin3D::get_configuration_warning() const {
@@ -615,11 +589,3 @@ void XROrigin3D::_notification(int p_what) {
}
}
};
-
-XROrigin3D::XROrigin3D() {
- tracked_camera = nullptr;
-};
-
-XROrigin3D::~XROrigin3D(){
- // nothing to do here yet for now..
-};
diff --git a/scene/3d/xr_nodes.h b/scene/3d/xr_nodes.h
index 4685328f16..4d4f82aa38 100644
--- a/scene/3d/xr_nodes.h
+++ b/scene/3d/xr_nodes.h
@@ -57,8 +57,8 @@ public:
virtual Vector3 project_position(const Point2 &p_point, float p_z_depth) const;
virtual Vector<Plane> get_frustum() const;
- XRCamera3D();
- ~XRCamera3D();
+ XRCamera3D() {}
+ ~XRCamera3D() {}
};
/*
@@ -71,9 +71,9 @@ class XRController3D : public Node3D {
GDCLASS(XRController3D, Node3D);
private:
- int controller_id;
- bool is_active;
- int button_states;
+ int controller_id = 1;
+ bool is_active = true;
+ int button_states = 0;
Ref<Mesh> mesh;
protected:
@@ -99,8 +99,8 @@ public:
String get_configuration_warning() const;
- XRController3D();
- ~XRController3D();
+ XRController3D() {}
+ ~XRController3D() {}
};
/*
@@ -112,8 +112,8 @@ class XRAnchor3D : public Node3D {
GDCLASS(XRAnchor3D, Node3D);
private:
- int anchor_id;
- bool is_active;
+ int anchor_id = 1;
+ bool is_active = true;
Vector3 size;
Ref<Mesh> mesh;
@@ -135,8 +135,8 @@ public:
String get_configuration_warning() const;
- XRAnchor3D();
- ~XRAnchor3D();
+ XRAnchor3D() {}
+ ~XRAnchor3D() {}
};
/*
@@ -151,7 +151,7 @@ class XROrigin3D : public Node3D {
GDCLASS(XROrigin3D, Node3D);
private:
- XRCamera3D *tracked_camera;
+ XRCamera3D *tracked_camera = nullptr;
protected:
void _notification(int p_what);
@@ -166,8 +166,8 @@ public:
float get_world_scale() const;
void set_world_scale(float p_world_scale);
- XROrigin3D();
- ~XROrigin3D();
+ XROrigin3D() {}
+ ~XROrigin3D() {}
};
#endif /* XR_NODES_H */