fix lua binding again!!

This commit is contained in:
lvlong 2014-12-25 14:04:41 +08:00
parent da2683aad9
commit a4a108f766
4 changed files with 6 additions and 6 deletions

View File

@ -259,7 +259,7 @@ void Camera::enableFrustumCulling(bool enalbe, bool clipZ)
_frustum.setClipZ(clipZ);
}
bool Camera::isVisibleInFrustum(const AABB& aabb) const
bool Camera::isVisibleInFrustum(const AABB* aabb) const
{
if (_enableFrustumCulling)
{
@ -268,7 +268,7 @@ bool Camera::isVisibleInFrustum(const AABB& aabb) const
_frustum.initFrustum(this);
_frustumDirty = false;
}
return !_frustum.isOutOfFrustum(aabb);
return !_frustum.isOutOfFrustum(*aabb);
}
return true;
}

View File

@ -144,7 +144,7 @@ public:
/**
* Is this aabb visible in frustum
*/
bool isVisibleInFrustum(const AABB& aabb)const;
bool isVisibleInFrustum(const AABB* aabb)const;
//override
virtual void onEnter() override;

View File

@ -538,7 +538,7 @@ static Texture2D * getDummyTexture()
void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
// camera clipping
if(!Camera::getVisitingCamera()->isVisibleInFrustum(this->getAABB()))
if(!Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB()))
return;
if (_skeleton)

View File

@ -60904,9 +60904,9 @@ int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S)
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::AABB arg0;
const cocos2d::AABB* arg0;
ok &= luaval_to_object<cocos2d::AABB>(tolua_S, 2, "cc.AABB",&arg0);
ok &= luaval_to_object<const cocos2d::AABB>(tolua_S, 2, "cc.AABB",&arg0);
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr);