mirror of https://github.com/axmolengine/axmol.git
fix lua binding again!!
This commit is contained in:
parent
da2683aad9
commit
a4a108f766
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue