[clutter-box2dmm: 2/10] Manually wrapped getting the actors involved in a Clutter::Box2D::Box2DCollision * clutter-box2d/sr



commit 336995862f56496156c28a60ceb9c1bbb50bb5c0
Author: Aidan Delaney <aidan phoric eu>
Date:   Sun Mar 4 20:41:55 2012 +0000

    Manually wrapped getting the actors involved in a Clutter::Box2D::Box2DCollision
     * clutter-box2d/src/box2d.{hg,ccg}: Added get_actor1() and get_actor2()

 clutter-box2d/src/box2d.ccg |   12 ++++++++++++
 clutter-box2d/src/box2d.hg  |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/clutter-box2d/src/box2d.ccg b/clutter-box2d/src/box2d.ccg
index 9150467..3bf58c6 100644
--- a/clutter-box2d/src/box2d.ccg
+++ b/clutter-box2d/src/box2d.ccg
@@ -22,6 +22,18 @@ namespace Clutter
 namespace Box2D
 {
 
+Glib::RefPtr<Clutter::Actor> Box2DCollision::get_actor1()
+{
+  Glib::RefPtr<Clutter::Actor> actor1 = Glib::wrap((this->gobj())->actor1, false);
+  return actor1;
+}
+
+Glib::RefPtr<Clutter::Actor> Box2DCollision::get_actor2()
+{
+  Glib::RefPtr<Clutter::Actor> actor2 = Glib::wrap((this->gobj())->actor2, false);
+  return actor2;
+}
+
 void Box2D::set_child_linear_velocity(const Glib::RefPtr<Clutter::Actor>& actor, const Clutter::Vertex& linear_velocity)
 {
   set_child_property(actor, "linear-velocity", linear_velocity);
diff --git a/clutter-box2d/src/box2d.hg b/clutter-box2d/src/box2d.hg
index 26c74c3..09fc27e 100644
--- a/clutter-box2d/src/box2d.hg
+++ b/clutter-box2d/src/box2d.hg
@@ -43,6 +43,9 @@ protected:
 
 public:
   _WRAP_CREATE()
+
+  Glib::RefPtr<Clutter::Actor> get_actor1();
+  Glib::RefPtr<Clutter::Actor> get_actor2();
 };
 
 class Box2DChild :



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]