summaryrefslogtreecommitdiff
path: root/src/mesh.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
committerKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
commit6a76c226e10e92c3e3339096f07f8ab065e2098b (patch)
tree396d9083f5f76ebb5ba96df113ba68046c2487df /src/mesh.h
parent569156b01302ea4ba45d11ff5524b62dbc6a9aa0 (diff)
downloadminetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.gz
minetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.bz2
minetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.zip
The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
Diffstat (limited to 'src/mesh.h')
-rw-r--r--src/mesh.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesh.h b/src/mesh.h
index 33e072927..57166235e 100644
--- a/src/mesh.h
+++ b/src/mesh.h
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MESH_HEADER
#include "common_irrlicht.h"
+#include <string>
/*
Create a new cube mesh.
@@ -48,6 +49,11 @@ scene::IAnimatedMesh* createExtrudedMesh(video::ITexture *texture,
void scaleMesh(scene::IMesh *mesh, v3f scale);
/*
+ Translate each vertex coordinate by the specified vector.
+*/
+void translateMesh(scene::IMesh *mesh, v3f vec);
+
+/*
Set a constant color for all vertices in the mesh
*/
void setMeshColor(scene::IMesh *mesh, const video::SColor &color);
@@ -63,4 +69,20 @@ void setMeshColorByNormalXYZ(scene::IMesh *mesh,
const video::SColor &colorY,
const video::SColor &colorZ);
+/*
+ Render a mesh to a texture.
+ Returns NULL if render-to-texture failed.
+*/
+video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
+ IrrlichtDevice *device,
+ core::dimension2d<u32> dim,
+ std::string texture_name,
+ v3f camera_position,
+ v3f camera_lookat,
+ core::CMatrix4<f32> camera_projection_matrix,
+ video::SColorf ambient_light,
+ v3f light_position,
+ video::SColorf light_color,
+ f32 light_radius);
+
#endif