summaryrefslogtreecommitdiff
path: root/src/mesh.h
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-11-21 08:41:21 +0100
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-11-23 00:51:08 +0100
commit016448331061f87a63b8f9ef33671d81e8922ad1 (patch)
treea768373184e59fe96793814a6f0a532bfb740c26 /src/mesh.h
parent21464639b3f593ddc35b0283becc0c7c9b05dcac (diff)
downloadminetest-016448331061f87a63b8f9ef33671d81e8922ad1.tar.gz
minetest-016448331061f87a63b8f9ef33671d81e8922ad1.tar.bz2
minetest-016448331061f87a63b8f9ef33671d81e8922ad1.zip
Port createForsythOptimizedMesh from Irrlicht 1.8
Mesh rotation helpers.
Diffstat (limited to 'src/mesh.h')
-rw-r--r--src/mesh.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesh.h b/src/mesh.h
index 29f5ec76c..761842b0d 100644
--- a/src/mesh.h
+++ b/src/mesh.h
@@ -65,6 +65,13 @@ void setMeshColorByNormalXYZ(scene::IMesh *mesh,
void rotateMeshBy6dFacedir(scene::IMesh *mesh, int facedir);
/*
+ Rotate the mesh around the axis and given angle in degrees.
+*/
+void rotateMeshXYby (scene::IMesh *mesh, f64 degrees);
+void rotateMeshXZby (scene::IMesh *mesh, f64 degrees);
+void rotateMeshYZby (scene::IMesh *mesh, f64 degrees);
+
+/*
Clone the mesh.
*/
scene::IMesh* cloneMesh(scene::IMesh *src_mesh);
@@ -79,4 +86,11 @@ scene::IMesh* convertNodeboxNodeToMesh(ContentFeatures *f);
*/
void recalculateBoundingBox(scene::IMesh *src_mesh);
+/*
+ Vertex cache optimization according to the Forsyth paper:
+ http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
+ Ported from irrlicht 1.8
+*/
+scene::IMesh* createForsythOptimizedMesh(const scene::IMesh *mesh);
+
#endif