1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-02 06:45:33 +00:00

starting scale function

This commit is contained in:
gugus 2012-05-21 10:58:04 +02:00
parent 420cd53be0
commit ca9224ed7f
4 changed files with 14 additions and 0 deletions

View file

@ -196,4 +196,9 @@ namespace MWWorld
{
return "";
}
void adjustScale(float& x, float& y, float& z)
{
}
}

View file

@ -193,6 +193,8 @@ namespace MWWorld
virtual std::string getEnchantment (const MWWorld::Ptr& ptr) const;
///< @return the enchantment ID if the object is enchanted, otherwise an empty string
/// (default implementation: return empty string)
virtual void adjustScale(float& x, float& y, float& z);
};
}

View file

@ -611,6 +611,11 @@ namespace MWWorld
mPhysics->moveObject (ptr.getRefData().getHandle(), Ogre::Vector3 (x, y, z));
}
void World::scaleObject (Ptr ptr, float x, float y, float z)
{
MWWorld::Class::get(ptr).adjustScale(x,y,z);
}
void World::indexToPosition (int cellX, int cellY, float &x, float &y, bool centre) const
{
const int cellSize = 8192;

View file

@ -222,6 +222,8 @@ namespace MWWorld
void moveObject (Ptr ptr, float x, float y, float z);
void scaleObject (Ptr ptr, float x, float y, float z);
void indexToPosition (int cellX, int cellY, float &x, float &y, bool centre = false) const;
///< Convert cell numbers to position.