本文整理汇总了C++中AABB::get方法的典型用法代码示例。如果您正苦于以下问题:C++ AABB::get方法的具体用法?C++ AABB::get怎么用?C++ AABB::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AABB
的用法示例。
在下文中一共展示了AABB::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: contains
int AABB::contains(State & state, b2AABB * object){
AABB * interfaceAABB = state.getInterface<AABB>("LuaBox2D_AABB");
b2AABB * other = interfaceAABB->get(1);
if (other != nullptr){
state.stack->push<bool>(object->Contains(*other));
return 1;
}else{
return 0;
}
}
示例2: queryAABB
int World::queryAABB(State & state, b2World * object){
if (state.stack->is<LUA_TUSERDATA>(1) && state.stack->is<LUA_TUSERDATA>(2)){
QueryCallback * interfaceQueryCallback = state.getInterface<QueryCallback>("LuaBox2D_QueryCallback");
AABB * interfaceAABB = state.getInterface<AABB>("LuaBox2D_AABB");
LuaBox2DQueryCallback * callback = interfaceQueryCallback->get(1);
b2AABB * aabb = interfaceAABB->get(2);
if (callback != nullptr && aabb != nullptr){
object->QueryAABB(callback, *aabb);
}
}
return 0;
}
示例3: combine
int AABB::combine(State & state, b2AABB * object){
AABB * interfaceAABB = state.getInterface<AABB>("LuaBox2D_AABB");
b2AABB * a = interfaceAABB->get(1);
b2AABB * b = interfaceAABB->get(2);
if (a != nullptr){
if (b != nullptr){
object->Combine(*a);
}else{
object->Combine(*a, *b);
}
}
return 0;
}