Commit 1fda9980 authored by hybrid's avatar hybrid

Add vertex optimization algorithm submitted by curaga

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4048 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b34352de
...@@ -284,6 +284,17 @@ namespace scene ...@@ -284,6 +284,17 @@ namespace scene
virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh, virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh,
scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0; scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0;
//! Vertex cache optimization according to the Forsyth paper
/** More information can be found at
http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
The function is thread-safe (read: you can optimize several
meshes in different threads).
\param mesh Source mesh for the operation.
\return A new mesh optimized for the vertex cache. */
virtual IMesh* createForsythOptimizedMesh(const IMesh *mesh) const = 0;
//! Apply a manipulator on the Meshbuffer //! Apply a manipulator on the Meshbuffer
/** \param func A functor defining the mesh manipulation. /** \param func A functor defining the mesh manipulation.
\param buffer The Meshbuffer to apply the manipulator to. \param buffer The Meshbuffer to apply the manipulator to.
......
This diff is collapsed.
...@@ -83,6 +83,9 @@ public: ...@@ -83,6 +83,9 @@ public:
//! create a new AnimatedMesh and adds the mesh to it //! create a new AnimatedMesh and adds the mesh to it
virtual IAnimatedMesh * createAnimatedMesh(scene::IMesh* mesh,scene::E_ANIMATED_MESH_TYPE type) const; virtual IAnimatedMesh * createAnimatedMesh(scene::IMesh* mesh,scene::E_ANIMATED_MESH_TYPE type) const;
//! create a mesh optimized for the vertex cache
virtual IMesh* createForsythOptimizedMesh(const scene::IMesh *mesh) const;
}; };
} // end namespace scene } // end namespace scene
......
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