Commit a0709c15 authored by hybrid's avatar hybrid

Fixed a bug in the terrain mesh generation.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1408 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3807fcf3
...@@ -31,9 +31,6 @@ namespace scene ...@@ -31,9 +31,6 @@ namespace scene
{ {
public: public:
//! Destructor
virtual ~IMeshManipulator() {}
//! Flips the direction of surfaces. //! Flips the direction of surfaces.
/** Changes backfacing triangles to frontfacing /** Changes backfacing triangles to frontfacing
triangles and vice versa. triangles and vice versa.
...@@ -63,13 +60,13 @@ namespace scene ...@@ -63,13 +60,13 @@ namespace scene
virtual void recalculateNormals(IMeshBuffer* buffer, bool smooth = false, bool angleWeighted = false) const = 0; virtual void recalculateNormals(IMeshBuffer* buffer, bool smooth = false, bool angleWeighted = false) const = 0;
//! Scales the whole mesh. //! Scales the whole mesh.
/** \param mesh: Mesh on which the operation is performed. /** \param mesh Mesh on which the operation is performed.
\param scale: Scale factor. */ \param scale Scale factor. */
virtual void scaleMesh(IMesh* mesh, const core::vector3df& scale) const = 0; virtual void scaleMesh(IMesh* mesh, const core::vector3df& scale) const = 0;
//! Applies a transformation //! Applies a transformation
/** \param mesh: Mesh on which the operation is performed. /** \param mesh Mesh on which the operation is performed.
\param m: transformation matrix. */ \param m transformation matrix. */
virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const = 0; virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const = 0;
//! Clones a static IMesh into a modifiable SMesh. //! Clones a static IMesh into a modifiable SMesh.
......
...@@ -880,7 +880,7 @@ namespace scene ...@@ -880,7 +880,7 @@ namespace scene
of triangles created depends on the size of this texture, so use a small of triangles created depends on the size of this texture, so use a small
heightmap to increase rendering speed. heightmap to increase rendering speed.
\param stretchSize: Parameter defining how big a is pixel on the heightmap. \param stretchSize: Parameter defining how big a is pixel on the heightmap.
\param maxHeight: Defines how height a white pixel on the heighmap is. \param maxHeight: Defines how high a white pixel on the heighmap is.
\param defaultVertexBlockSize: Defines the initial dimension between vertices. \param defaultVertexBlockSize: Defines the initial dimension between vertices.
\return Returns null if the creation failed. The reason could be that you \return Returns null if the creation failed. The reason could be that you
specified some invalid parameters, that a mesh with that name already specified some invalid parameters, that a mesh with that name already
......
...@@ -178,9 +178,9 @@ IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture, ...@@ -178,9 +178,9 @@ IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture,
buffer->Indices.reallocate((blockSize.Height-1)*(blockSize.Width-1)*6); buffer->Indices.reallocate((blockSize.Height-1)*(blockSize.Width-1)*6);
// add indices of vertex block // add indices of vertex block
s32 c1 = 0;
for (y=0; y<blockSize.Height-1; ++y) for (y=0; y<blockSize.Height-1; ++y)
{ {
s32 c1 = 0;
for (s32 x=0; x<blockSize.Width-1; ++x) for (s32 x=0; x<blockSize.Width-1; ++x)
{ {
const s32 c = c1 + x; const s32 c = c1 + x;
......
...@@ -58,7 +58,7 @@ endif ...@@ -58,7 +58,7 @@ endif
ifdef PROFILE ifdef PROFILE
CXXFLAGS += -pg CXXFLAGS += -pg
endif endif
CFLAGS := -fexpensive-optimizations -O3 -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES CFLAGS := -fexpensive-optimizations -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
sharedlib sharedlib_win32 : CXXFLAGS += -fpic sharedlib sharedlib_win32 : CXXFLAGS += -fpic
sharedlib sharedlib_win32 : CFLAGS += -fpic sharedlib sharedlib_win32 : CFLAGS += -fpic
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment