You need to sign in or sign up before continuing.
Commit 429220da authored by hybrid's avatar hybrid

Added a cast in vector2d to make MSVC happy with integer vectors. Added...

Added a cast in vector2d to make MSVC happy with integer vectors. Added virtual destructors in factory interfaces.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1002 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5ecfec33
...@@ -28,6 +28,9 @@ namespace gui ...@@ -28,6 +28,9 @@ namespace gui
{ {
public: public:
// destructor
virtual ~IGUIElementFactory() {}
//! adds an element to the gui environment based on its type id //! adds an element to the gui environment based on its type id
/** \param type: Type of the element to add. /** \param type: Type of the element to add.
\param parent: Parent scene node of the new element, can be null to add to the root. \param parent: Parent scene node of the new element, can be null to add to the root.
......
...@@ -28,6 +28,8 @@ namespace scene ...@@ -28,6 +28,8 @@ namespace scene
{ {
public: public:
virtual ~ISceneNodeAnimatorFactory() {}
//! creates a scene node animator based on its type id //! creates a scene node animator based on its type id
/** \param type: Type of the scene node animator to add. /** \param type: Type of the scene node animator to add.
\param target: Target scene node of the new animator. \param target: Target scene node of the new animator.
......
...@@ -29,6 +29,8 @@ namespace scene ...@@ -29,6 +29,8 @@ namespace scene
{ {
public: public:
virtual ~ISceneNodeFactory() {}
//! adds a scene node to the scene graph based on its type id //! adds a scene node to the scene graph based on its type id
/** \param type: Type of the scene node to add. /** \param type: Type of the scene node to add.
\param parent: Parent scene node of the new node, can be null to add the scene node to the root. \param parent: Parent scene node of the new node, can be null to add the scene node to the root.
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
//! Returns the length of the vector //! Returns the length of the vector
//! \return Returns the length of the vector. //! \return Returns the length of the vector.
T getLength() const { return (T)sqrt(X*X + Y*Y); } T getLength() const { return (T)sqrt((f64)(X*X + Y*Y)); }
//! Returns the squared length of this vector //! Returns the squared length of this vector
/** This is useful because it is much faster than getLength(). */ /** This is useful because it is much faster than getLength(). */
......
...@@ -39,11 +39,6 @@ CDefaultGUIElementFactory::CDefaultGUIElementFactory(IGUIEnvironment* env) ...@@ -39,11 +39,6 @@ CDefaultGUIElementFactory::CDefaultGUIElementFactory(IGUIEnvironment* env)
} }
CDefaultGUIElementFactory::~CDefaultGUIElementFactory()
{
}
//! adds an element to the env based on its type id //! adds an element to the env based on its type id
IGUIElement* CDefaultGUIElementFactory::addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent) IGUIElement* CDefaultGUIElementFactory::addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent)
{ {
......
...@@ -23,7 +23,7 @@ namespace gui ...@@ -23,7 +23,7 @@ namespace gui
public: public:
CDefaultGUIElementFactory(IGUIEnvironment* env); CDefaultGUIElementFactory(IGUIEnvironment* env);
~CDefaultGUIElementFactory();
//! adds an element to the gui environment based on its type id //! adds an element to the gui environment based on its type id
/** \param type: Type of the element to add. /** \param type: Type of the element to add.
\param parent: Parent scene node of the new element, can be null to add to the root. \param parent: Parent scene node of the new element, can be null to add to the root.
......
...@@ -32,11 +32,6 @@ CDefaultSceneNodeAnimatorFactory::CDefaultSceneNodeAnimatorFactory(ISceneManager ...@@ -32,11 +32,6 @@ CDefaultSceneNodeAnimatorFactory::CDefaultSceneNodeAnimatorFactory(ISceneManager
} }
CDefaultSceneNodeAnimatorFactory::~CDefaultSceneNodeAnimatorFactory()
{
}
//! creates a scene node animator based on its type id //! creates a scene node animator based on its type id
ISceneNodeAnimator* CDefaultSceneNodeAnimatorFactory::createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target) ISceneNodeAnimator* CDefaultSceneNodeAnimatorFactory::createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target)
{ {
......
...@@ -20,7 +20,6 @@ namespace scene ...@@ -20,7 +20,6 @@ namespace scene
public: public:
CDefaultSceneNodeAnimatorFactory(ISceneManager* mgr); CDefaultSceneNodeAnimatorFactory(ISceneManager* mgr);
~CDefaultSceneNodeAnimatorFactory();
//! creates a scene node animator based on its type id //! creates a scene node animator based on its type id
/** \param type: Type of the scene node animator to add. /** \param type: Type of the scene node animator to add.
......
...@@ -47,11 +47,6 @@ CDefaultSceneNodeFactory::CDefaultSceneNodeFactory(ISceneManager* mgr) ...@@ -47,11 +47,6 @@ CDefaultSceneNodeFactory::CDefaultSceneNodeFactory(ISceneManager* mgr)
} }
CDefaultSceneNodeFactory::~CDefaultSceneNodeFactory()
{
}
//! adds a scene node to the scene graph based on its type id //! adds a scene node to the scene graph based on its type id
ISceneNode* CDefaultSceneNodeFactory::addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent) ISceneNode* CDefaultSceneNodeFactory::addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent)
{ {
......
...@@ -22,7 +22,6 @@ namespace scene ...@@ -22,7 +22,6 @@ namespace scene
public: public:
CDefaultSceneNodeFactory(ISceneManager* mgr); CDefaultSceneNodeFactory(ISceneManager* mgr);
~CDefaultSceneNodeFactory();
//! adds a scene node to the scene graph based on its type id //! adds a scene node to the scene graph based on its type id
/** \param type: Type of the scene node to add. /** \param type: Type of the scene node to add.
......
...@@ -90,7 +90,7 @@ IReadFile* CFileSystem::createAndOpenFile(const c8* filename) ...@@ -90,7 +90,7 @@ IReadFile* CFileSystem::createAndOpenFile(const c8* filename)
//! Creates an IReadFile interface for treating memory like a file. //! Creates an IReadFile interface for treating memory like a file.
IReadFile* CFileSystem::createMemoryReadFile(void* memory, s32 len, IReadFile* CFileSystem::createMemoryReadFile(void* memory, s32 len,
const c8* fileName, bool deleteMemoryWhenDropped) const c8* fileName, bool deleteMemoryWhenDropped)
{ {
if (!memory) if (!memory)
return 0; return 0;
......
...@@ -2222,7 +2222,6 @@ ISceneManager* createSceneManager(video::IVideoDriver* driver, ...@@ -2222,7 +2222,6 @@ ISceneManager* createSceneManager(video::IVideoDriver* driver,
} }
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
...@@ -225,6 +225,7 @@ namespace scene ...@@ -225,6 +225,7 @@ namespace scene
return true; return true;
} }
//! Initializes the terrain data. Loads the vertices from the heightMapFile //! Initializes the terrain data. Loads the vertices from the heightMapFile
bool CTerrainSceneNode::loadHeightMapRAW( io::IReadFile* file, s32 bitsPerPixel, video::SColor vertexColor, s32 smoothFactor ) bool CTerrainSceneNode::loadHeightMapRAW( io::IReadFile* file, s32 bitsPerPixel, video::SColor vertexColor, s32 smoothFactor )
{ {
...@@ -382,6 +383,7 @@ namespace scene ...@@ -382,6 +383,7 @@ namespace scene
return true; return true;
} }
//! Sets the scale of the scene node. //! Sets the scale of the scene node.
//! \param scale: New scale of the node //! \param scale: New scale of the node
void CTerrainSceneNode::setScale(const core::vector3df& scale) void CTerrainSceneNode::setScale(const core::vector3df& scale)
......
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