Not sure what I'm doing wrong here: My registration:
ScriptManager::engine->RegisterObjectMethod("Sphere", "bool intersects( const Sphere &in) const", asMETHODPR(Ogre::Sphere, intersects, (const Ogre::Sphere&), bool),asCALL_THISCALL);
ScriptManager::engine->RegisterObjectMethod("Sphere", "bool intersects( const Plane& in ) const", asMETHODPR(Ogre::Sphere, intersects, (const Ogre::Plane&), bool),asCALL_THISCALL);
ScriptManager::engine->RegisterObjectMethod("Sphere", "bool intersects( const Vector3& in ) const", asMETHODPR(Ogre::Sphere, intersects, (const Ogre::Vector3&), bool),asCALL_THISCALL);
ScriptManager::engine->RegisterObjectMethod("Sphere", "bool intersects( const AxisAlignedBox& in ) const", asMETHODPR(Ogre::Sphere, intersects, (const Ogre::AxisAlignedBox&), bool),asCALL_THISCALL);
Ogre source (inlined in header):
/** Returns whether or not this sphere interects a box. */
bool intersects(const AxisAlignedBox& box) const
{
return Math::intersects(*this, box);
}
/** Returns whether or not this sphere interects a plane. */
bool intersects(const Plane& plane) const
{
return Math::intersects(*this, plane);
}
/** Returns whether or not this sphere interects a point. */
bool intersects(const Vector3& v) const
{
return ((v - mCenter).squaredLength() <= Math::Sqr(mRadius));
}
Result when I try to compile:
Error 1 error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Ogre::Sphere::* )(const Ogre::Sphere&)' c:\rakengine\source\engine\script\scriptsphere.cpp 26
Error 2 error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Ogre::Sphere::* )(const Ogre::Plane &)' c:\rakengine\source\engine\script\scriptsphere.cpp 27
Error 3 error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Ogre::Sphere::* )(const Ogre::Vector3 &)' c:\rakengine\source\engine\script\scriptsphere.cpp 28
Error 4 error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Ogre::Sphere::* )(const Ogre::AxisAlignedBox &)' c:\rakengine\source\engine\script\scriptsphere.cpp 29