summaryrefslogtreecommitdiffstats
path: root/AssetLoader/interface/GLTFLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'AssetLoader/interface/GLTFLoader.h')
-rw-r--r--AssetLoader/interface/GLTFLoader.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/AssetLoader/interface/GLTFLoader.h b/AssetLoader/interface/GLTFLoader.h
index 402559e..9aba237 100644
--- a/AssetLoader/interface/GLTFLoader.h
+++ b/AssetLoader/interface/GLTFLoader.h
@@ -46,9 +46,22 @@ DILIGENT_BEGIN_NAMESPACE(GLTF)
#if DILIGENT_CPP_INTERFACE
class ResourceManager;
+
+ struct GLTF_Transform;
#else
struct ResourceManager;
typedef struct ResourceManager ResourceManager;
+
+ struct GLTF_Transform
+ {
+ float Translation[3];
+ float _pad0;
+ float Scale[3];
+ float _pad1;
+ float Rotation[4];
+ float Matrix[4*4];
+ };
+ typedef struct GLTF_Transform GLTF_Transform;
#endif
struct GLTF_ResourceCacheUseInfo
@@ -169,6 +182,14 @@ DILIGENT_BEGIN_INTERFACE1(IGLTFModel)
VIRTUAL ITexture* METHOD(GetTexture)(THIS_ Uint32 Index) PURE;
+ VIRTUAL bool METHOD(GetNodeIndex)(THIS_ const char* Name, Uint32* Idx) CONST PURE;
+
+ VIRTUAL void METHOD(GetNodeTransform)(THIS_ Uint32 Idx, GLTF_Transform* Transform) PURE;
+
+ VIRTUAL void METHOD(SetNodeTransform)(THIS_ Uint32 Idx, GLTF_Transform* Transform) PURE;
+
+ VIRTUAL void METHOD(UpdateTransforms)(THIS) PURE;
+
VIRTUAL Uint32 METHOD(GetFirstIndexLocation)(THIS) CONST PURE;
VIRTUAL Uint32 METHOD(GetBaseVertex)(THIS) CONST PURE;
@@ -185,6 +206,10 @@ DILIGENT_END_INTERFACE
# define IGLTFModel_Transform(This, ...) CALL_IFACE_METHOD(GLTF_Model, Transform, This, __VA_ARGS__)
# define IGLTFModel_GetBuffer(This, ...) CALL_IFACE_METHOD(GLTF_Model, GetBuffer, This, __VA_ARGS__)
# define IGLTFModel_GetTexture(This, ...) CALL_IFACE_METHOD(GLTF_Model, GetTexture, This, __VA_ARGS__)
+# define IGLTFModel_GetNodeIndex(This, ...) CALL_IFACE_METHOD(GLTF_Model, GetNodeIndex, This, __VA_ARGS__)
+# define IGLTFModel_GetNodeTransform(This, ...) CALL_IFACE_METHOD(GLTF_Model, GetNodeTransform, This, __VA_ARGS__)
+# define IGLTFModel_SetNodeTransform(This, ...) CALL_IFACE_METHOD(GLTF_Model, SetNodeTransform, This, __VA_ARGS__)
+# define IGLTFModel_UpdateTransforms(This) CALL_IFACE_METHOD(GLTF_Model, UpdateTransforms, This)
# define IGLTFModel_GetFirstIndexLocation(This) CALL_IFACE_METHOD(GLTF_Model, GetFirstIndexLocation, This)
# define IGLTFModel_GetBaseVertex(This) CALL_IFACE_METHOD(GLTF_Model, GetBaseVertex, This)