scene::IMeshCache misunderstandings

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

scene::IMeshCache misunderstandings

Post by greenya »

Hello!
I was looking into scene::IMeshCache and see something that i do not understand; please help me to get the logic:

/* we remember that scene::IMesh is base class for scene::IAnimatedMesh */

we have

Code: Select all

   addMesh (const io::path &name, IAnimatedMesh *mesh)
PROBLEM1: actually we cannot add IMesh (!); we should have ability only to add IMesh, and this will cover all other derived classes (for example IAnimatedMesh)

we have

Code: Select all

   virtual s32 getMeshIndex (const IMesh *const mesh) 
   virtual s32 getMeshIndex (const IAnimatedMesh *const mesh)
PROBLEM2: we do not need second overloading, because IMesh covers IAnimatedMesh (since it is inherited from IMesh)
/* the same for getMeshName(), removeMesh() and renameMesh() -- we have useless overloadings */
Post Reply