summaryrefslogtreecommitdiffstats
path: root/modules/gltf/structures/gltf_accessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gltf/structures/gltf_accessor.h')
-rw-r--r--modules/gltf/structures/gltf_accessor.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/modules/gltf/structures/gltf_accessor.h b/modules/gltf/structures/gltf_accessor.h
index 6b1734601a..1a3a2cb494 100644
--- a/modules/gltf/structures/gltf_accessor.h
+++ b/modules/gltf/structures/gltf_accessor.h
@@ -39,13 +39,24 @@ struct GLTFAccessor : public Resource {
GDCLASS(GLTFAccessor, Resource);
friend class GLTFDocument;
+public:
+ enum GLTFAccessorType {
+ TYPE_SCALAR,
+ TYPE_VEC2,
+ TYPE_VEC3,
+ TYPE_VEC4,
+ TYPE_MAT2,
+ TYPE_MAT3,
+ TYPE_MAT4,
+ };
+
private:
GLTFBufferViewIndex buffer_view = -1;
int byte_offset = 0;
int component_type = 0;
bool normalized = false;
int count = 0;
- GLTFType type = GLTFType::TYPE_SCALAR;
+ GLTFAccessorType accessor_type = GLTFAccessorType::TYPE_SCALAR;
Vector<double> min;
Vector<double> max;
int sparse_count = 0;
@@ -74,8 +85,11 @@ public:
int get_count();
void set_count(int p_count);
+ GLTFAccessorType get_accessor_type();
+ void set_accessor_type(GLTFAccessorType p_accessor_type);
+
int get_type();
- void set_type(int p_type);
+ void set_type(int p_accessor_type);
Vector<double> get_min();
void set_min(Vector<double> p_min);
@@ -102,4 +116,6 @@ public:
void set_sparse_values_byte_offset(int p_sparse_values_byte_offset);
};
+VARIANT_ENUM_CAST(GLTFAccessor::GLTFAccessorType);
+
#endif // GLTF_ACCESSOR_H