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
master
hybrid 2007-09-25 16:06:06 +00:00
parent 5ecfec331a
commit 429220dace
13 changed files with 12 additions and 21 deletions

View File

@ -28,6 +28,9 @@ namespace gui
{
public:
// destructor
virtual ~IGUIElementFactory() {}
//! adds an element to the gui environment based on its type id
/** \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.

View File

@ -28,6 +28,8 @@ namespace scene
{
public:
virtual ~ISceneNodeAnimatorFactory() {}
//! creates a scene node animator based on its type id
/** \param type: Type of the scene node animator to add.
\param target: Target scene node of the new animator.

View File

@ -29,6 +29,8 @@ namespace scene
{
public:
virtual ~ISceneNodeFactory() {}
//! adds a scene node to the scene graph based on its type id
/** \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.

View File

@ -67,7 +67,7 @@ public:
//! 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
/** This is useful because it is much faster than getLength(). */

View File

@ -39,11 +39,6 @@ CDefaultGUIElementFactory::CDefaultGUIElementFactory(IGUIEnvironment* env)
}
CDefaultGUIElementFactory::~CDefaultGUIElementFactory()
{
}
//! adds an element to the env based on its type id
IGUIElement* CDefaultGUIElementFactory::addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent)
{

View File

@ -23,7 +23,7 @@ namespace gui
public:
CDefaultGUIElementFactory(IGUIEnvironment* env);
~CDefaultGUIElementFactory();
//! adds an element to the gui environment based on its type id
/** \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.

View File

@ -32,11 +32,6 @@ CDefaultSceneNodeAnimatorFactory::CDefaultSceneNodeAnimatorFactory(ISceneManager
}
CDefaultSceneNodeAnimatorFactory::~CDefaultSceneNodeAnimatorFactory()
{
}
//! creates a scene node animator based on its type id
ISceneNodeAnimator* CDefaultSceneNodeAnimatorFactory::createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target)
{

View File

@ -20,7 +20,6 @@ namespace scene
public:
CDefaultSceneNodeAnimatorFactory(ISceneManager* mgr);
~CDefaultSceneNodeAnimatorFactory();
//! creates a scene node animator based on its type id
/** \param type: Type of the scene node animator to add.

View File

@ -47,11 +47,6 @@ CDefaultSceneNodeFactory::CDefaultSceneNodeFactory(ISceneManager* mgr)
}
CDefaultSceneNodeFactory::~CDefaultSceneNodeFactory()
{
}
//! adds a scene node to the scene graph based on its type id
ISceneNode* CDefaultSceneNodeFactory::addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent)
{

View File

@ -22,7 +22,6 @@ namespace scene
public:
CDefaultSceneNodeFactory(ISceneManager* mgr);
~CDefaultSceneNodeFactory();
//! adds a scene node to the scene graph based on its type id
/** \param type: Type of the scene node to add.

View File

@ -90,7 +90,7 @@ IReadFile* CFileSystem::createAndOpenFile(const c8* filename)
//! Creates an IReadFile interface for treating memory like a file.
IReadFile* CFileSystem::createMemoryReadFile(void* memory, s32 len,
const c8* fileName, bool deleteMemoryWhenDropped)
const c8* fileName, bool deleteMemoryWhenDropped)
{
if (!memory)
return 0;

View File

@ -2222,7 +2222,6 @@ ISceneManager* createSceneManager(video::IVideoDriver* driver,
}
} // end namespace scene
} // end namespace irr

View File

@ -225,6 +225,7 @@ namespace scene
return true;
}
//! Initializes the terrain data. Loads the vertices from the heightMapFile
bool CTerrainSceneNode::loadHeightMapRAW( io::IReadFile* file, s32 bitsPerPixel, video::SColor vertexColor, s32 smoothFactor )
{
@ -382,6 +383,7 @@ namespace scene
return true;
}
//! Sets the scale of the scene node.
//! \param scale: New scale of the node
void CTerrainSceneNode::setScale(const core::vector3df& scale)