aboutsummaryrefslogtreecommitdiff
path: root/src/mesh.h
diff options
context:
space:
mode:
authorsapier <sapier at gmx dot net>2012-02-04 12:41:25 +0100
committersapier <sapier at gmx dot net>2012-02-04 12:41:25 +0100
commit77df09540c4d7eadef760779e123af88a48aafaa (patch)
treefebf1009328d30c31a14a1a1ca1600e99b4c3e6b /src/mesh.h
parent3454e6779337d8523ae76c7fa16eb8c565aa2381 (diff)
parenta1eb2836c0764829ebad1462432bb3c5f32750df (diff)
downloadminetest-77df09540c4d7eadef760779e123af88a48aafaa.tar.xz
Merge remote branch 'upstream/master' into sapier_experimental
Conflicts: src/scriptapi.cpp
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 b22ccc318..631dc0cca 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.
@@ -67,6 +68,11 @@ scene::IAnimatedMesh* createPlantMesh(v3f scale);
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);
@@ -82,4 +88,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