CollisionShape2D.pkg 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. $#include "CollisionShape2D.h"
  2. class CollisionShape2D : Component
  3. {
  4. void SetSensor(bool sensor);
  5. void SetCategoryBits(unsigned short categoryBits);
  6. void SetMaskBits(unsigned short maskBits);
  7. void SetGroupIndex(short groupIndex);
  8. void SetDensity(float density);
  9. void SetFriction(float friction);
  10. void SetRestitution(float restitution);
  11. void SetCircle(float radius, const Vector2& center = Vector2::ZERO);
  12. void SetBox(const Vector2& halfSize, const Vector2& center = Vector2::ZERO);
  13. void SetBox(float halfWidth, float halfHeight, const Vector2& center = Vector2::ZERO);
  14. void SetChain(const PODVector<Vector2>& vertices);
  15. void SetPolygon(const PODVector<Vector2>& vertices);
  16. void SetEdge(const Vector2& vertex1, const Vector2& vertex2);
  17. bool IsSensor() const;
  18. unsigned short GetCategoryBits() const;
  19. unsigned short GetMaskBits() const;
  20. short GetGroupIndex() const;
  21. float GetDensity() const;
  22. float GetFriction() const;
  23. float GetRestitution() const;
  24. float GetMass() const;
  25. float GetInertia() const;
  26. Vector2 GetMassCenter() const;
  27. tolua_property__is_set bool sensor;
  28. tolua_property__get_set unsigned short categoryBits;
  29. tolua_property__get_set unsigned short maskBits;
  30. tolua_property__get_set short groupIndex;
  31. tolua_property__get_set float density;
  32. tolua_property__get_set float friction;
  33. tolua_property__get_set float restitution;
  34. tolua_readonly tolua_property__get_set float mass;
  35. tolua_readonly tolua_property__get_set float inertia;
  36. tolua_readonly tolua_property__get_set Vector2 massCenter;
  37. };