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); _frustum.setClipZ(clipZ);
} }
bool Camera::isVisibleInFrustum(const AABB& aabb) const bool Camera::isVisibleInFrustum(const AABB* aabb) const
{ {
if (_enableFrustumCulling) if (_enableFrustumCulling)
{ {
@ -268,7 +268,7 @@ bool Camera::isVisibleInFrustum(const AABB& aabb) const
_frustum.initFrustum(this); _frustum.initFrustum(this);
_frustumDirty = false; _frustumDirty = false;
} }
return !_frustum.isOutOfFrustum(aabb); return !_frustum.isOutOfFrustum(*aabb);
} }
return true; return true;
} }

View File

@ -144,7 +144,7 @@ public:
/** /**
* Is this aabb visible in frustum * Is this aabb visible in frustum
*/ */
bool isVisibleInFrustum(const AABB& aabb)const; bool isVisibleInFrustum(const AABB* aabb)const;
//override //override
virtual void onEnter() 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) void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{ {
// camera clipping // camera clipping
if(!Camera::getVisitingCamera()->isVisibleInFrustum(this->getAABB())) if(!Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB()))
return; return;
if (_skeleton) if (_skeleton)

View File

@ -60904,9 +60904,9 @@ int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S)
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 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) if(!ok)
{ {
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr);