mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Added get/setGroupIndex (#129) and get/setFixedRotation (#113). Also fixed 3000 auto.lua-related warnings in MSVC.
This commit is contained in:
@@ -183,6 +183,20 @@ namespace box2d
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Shape::setGroupIndex(int index)
|
||||
{
|
||||
b2FilterData f = shape->GetFilterData();
|
||||
f.groupIndex = (uint16)index;
|
||||
shape->SetFilterData(f);
|
||||
shape->GetBody()->GetWorld()->Refilter(shape);
|
||||
}
|
||||
|
||||
int Shape::getGroupIndex() const
|
||||
{
|
||||
b2FilterData f = shape->GetFilterData();
|
||||
return f.groupIndex;
|
||||
}
|
||||
|
||||
int Shape::getCategory(lua_State * L)
|
||||
{
|
||||
return pushBits(L, shape->GetFilterData().categoryBits);
|
||||
|
||||
Reference in New Issue
Block a user