summaryrefslogtreecommitdiff
path: root/scene/3d/skeleton_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/skeleton_3d.h')
-rw-r--r--scene/3d/skeleton_3d.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index 0bccd3f8fc..c54f89d3ce 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -31,7 +31,7 @@
#ifndef SKELETON_3D_H
#define SKELETON_3D_H
-#include "core/rid.h"
+#include "core/templates/rid.h"
#include "scene/3d/node_3d.h"
#include "scene/resources/skin.h"
@@ -66,18 +66,12 @@ public:
};
class Skeleton3D : public Node3D {
-
GDCLASS(Skeleton3D, Node3D);
private:
friend class SkinReference;
- Set<SkinReference *> skin_bindings;
-
- void _skin_changed();
-
struct Bone {
-
String name;
bool enabled;
@@ -118,6 +112,10 @@ private:
}
};
+ Set<SkinReference *> skin_bindings;
+
+ void _skin_changed();
+
bool animate_physical_bones;
Vector<Bone> bones;
Vector<int> process_order;
@@ -130,13 +128,11 @@ private:
// bind helpers
Array _get_bound_child_nodes_to_bone(int p_bone) const {
-
Array bound;
List<Node *> children;
get_bound_child_nodes_to_bone(p_bone, &children);
for (int i = 0; i < children.size(); i++) {
-
bound.push_back(children[i]);
}
return bound;
@@ -153,7 +149,6 @@ protected:
public:
enum {
-
NOTIFICATION_UPDATE_SKELETON = 50
};
@@ -200,9 +195,14 @@ public:
void localize_rests(); // used for loaders and tools
int get_process_order(int p_idx);
+ Vector<int> get_bone_process_orders();
Ref<SkinReference> register_skin(const Ref<Skin> &p_skin);
+ // Helper functions
+ Transform bone_transform_to_world_transform(Transform p_transform);
+ Transform world_transform_to_bone_transform(Transform p_transform);
+
#ifndef _3D_DISABLED
// Physical bone API
@@ -216,7 +216,7 @@ public:
PhysicalBone3D *get_physical_bone_parent(int p_bone);
private:
- /// This is a slow API os it's cached
+ /// This is a slow API, so it's cached
PhysicalBone3D *_get_physical_bone_parent(int p_bone);
void _rebuild_physical_bones_cache();