summaryrefslogtreecommitdiffstats
path: root/scene/resources/surface_tool.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-10-14 01:01:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-10-14 01:01:25 -0300
commita84ba9c853f972f8e666b17f3e0f875b7282e6c1 (patch)
tree70a5d44acbecc93011333d13dd51b1786d42eae3 /scene/resources/surface_tool.h
parent13a848e332092b40956739a08fa0dac3357db950 (diff)
downloadredot-engine-a84ba9c853f972f8e666b17f3e0f875b7282e6c1.tar.gz
Collada
-=-=-=- -Fixed some DAE import & export bugs -Changed Collada exporter to use the mesh loops API -Added tangent export to Collada exporter -Added triangulation option to Collada exporter -Changed a little how normalmaps are handled in shader. Not sure if it's working properly, be careful. -Fixed some strange bug with kinematic bodies #776 -Fix release compilaiton issues #782
Diffstat (limited to 'scene/resources/surface_tool.h')
-rw-r--r--scene/resources/surface_tool.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index fe82d3a4ce..fc5940145b 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -30,7 +30,7 @@
#define SURFACE_TOOL_H
#include "scene/resources/mesh.h"
-
+#include "mikktspace.h"
class SurfaceTool : public Reference {
@@ -82,6 +82,14 @@ private:
void _create_list(const Ref<Mesh>& p_existing, int p_surface, List<Vertex> *r_vertex, List<int> *r_index,int &lformat);
+
+ //mikktspace callbacks
+ static int mikktGetNumFaces(const SMikkTSpaceContext * pContext);
+ static int mikktGetNumVerticesOfFace(const SMikkTSpaceContext * pContext, const int iFace);
+ static void mikktGetPosition(const SMikkTSpaceContext * pContext, float fvPosOut[], const int iFace, const int iVert);
+ static void mikktGetNormal(const SMikkTSpaceContext * pContext, float fvNormOut[], const int iFace, const int iVert);
+ static void mikktGetTexCoord(const SMikkTSpaceContext * pContext, float fvTexcOut[], const int iFace, const int iVert);
+ static void mikktSetTSpaceBasic(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert);
protected:
static void _bind_methods();