Bottle 2D - Lua API 1.0.0
All you need to create games using bottle2D.
|
A base class containing common functions to all physic objects. More...
#include <header.hpp>
Public Member Functions | |
bool | IsPointInside (Vector2D ponumber) |
Return true if the point is inside the object, false otherwise. | |
nil | SetEventFunction (luaObject luaFunction) |
Set the event function name (fnName should be the name of an existing lua function). | |
luaObject | GetEventFunction () |
Get the event function name. | |
number | GetPhysicGroup () |
Get the physic group associated to the object. | |
bool | IsIntersect (PhysicObject obj) |
Return true if the object collide the given object. | |
luaObject | IsIntersectWithGroup (number phGroup) |
Return the list of objects that collide the given physic group. | |
Public Attributes | |
std::string | eventFunction |
Acces the event function name (fnName should be the name of an existing lua function). |
A base class containing common functions to all physic objects.
luaObject PhysicObject::GetEventFunction | ( | ) |
Get the event function name.
number PhysicObject::GetPhysicGroup | ( | ) |
Get the physic group associated to the object.
bool PhysicObject::IsIntersect | ( | PhysicObject | obj | ) |
Return true if the object collide the given object.
luaObject PhysicObject::IsIntersectWithGroup | ( | number | phGroup | ) |
Return the list of objects that collide the given physic group.
bool PhysicObject::IsPointInside | ( | Vector2D | ponumber | ) |
Return true if the point is inside the object, false otherwise.
nil PhysicObject::SetEventFunction | ( | luaObject | luaFunction | ) |
Set the event function name (fnName should be the name of an existing lua function).
Function prototype should be : function fnName(thisObject : PhysicObject, theOtherObject : PhysicObject, intersectionPosition : Vector2D, penetrationVector : Vector2D)
Where :
std::string PhysicObject::eventFunction |
Acces the event function name (fnName should be the name of an existing lua function).