int GIIHelper::_setVertexTransform( lua_State *L){ MOAILuaState state (L); if ( !state.CheckParams ( 1, "U" )) return 0; MOAITransformBase* trans = state.GetLuaObject< MOAITransformBase >(1, true); if ( trans ) { MOAIGfxDevice::Get().SetVertexTransform( MOAIGfxDevice::VTX_WORLD_TRANSFORM, trans->GetLocalToWorldMtx() ); } return 0; }
//----------------------------------------------------------------// bool MOAICollisionShape::Overlap ( const MOAITransformBase& t0, const ZLQuad& q0, const MOAITransformBase& t1, const ZLQuad& q1, ZLBox& bounds ) { ZLQuad tq0 = q0; tq0.Transform ( t0.GetLocalToWorldMtx ()); ZLQuad tq1 = q1; tq1.Transform ( t1.GetLocalToWorldMtx ()); ZLRect rect; bool result = tq0.Intersect ( tq1, rect ); bounds.Init ( rect, ZLBox::PLANE_XY, 0.0f, 0.0f ); return result; }