gnomemm r1674 - in clutter-box2dmm/trunk: . clutter-box2d/src examples/bridge examples/chain



Author: murrayc
Date: Sun Aug 10 15:56:00 2008
New Revision: 1674
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1674&view=rev

Log:
2008-08-10  Murray Cumming  <murrayc murrayc com>

* clutter-box2d/src/box2d.hg: Rename add_revolute_joint2() to 
be a add_revolute_joint() overload.
* examples/bridge/main.cc:
* examples/chain/main.cc: Adapted.

Modified:
   clutter-box2dmm/trunk/ChangeLog
   clutter-box2dmm/trunk/clutter-box2d/src/box2d.hg
   clutter-box2dmm/trunk/examples/bridge/main.cc
   clutter-box2dmm/trunk/examples/chain/main.cc

Modified: clutter-box2dmm/trunk/clutter-box2d/src/box2d.hg
==============================================================================
--- clutter-box2dmm/trunk/clutter-box2d/src/box2d.hg	(original)
+++ clutter-box2dmm/trunk/clutter-box2d/src/box2d.hg	Sun Aug 10 15:56:00 2008
@@ -49,22 +49,16 @@
   _WRAP_METHOD(bool get_simulating() const, clutter_box2d_get_simulating)
 
   //TODO: Wrap ClutterBox2DJoint properly - ideally it would be a registered type, with hidden implementation.
-  _WRAP_METHOD(ClutterBox2DJoint* add_revolute_joint(const Glib::RefPtr<Clutter::Actor>& actor1,
-                                                     const Glib::RefPtr<Clutter::Actor>& actor2,
-                                                     const ClutterVertex *anchor1,
-                                                     const ClutterVertex *anchor2,
-                                                     double reference_angle), clutter_box2d_add_revolute_joint)
+  _WRAP_METHOD(ClutterBox2DJoint* add_revolute_joint(const Glib::RefPtr<Clutter::Actor>& actor1, const Glib::RefPtr<Clutter::Actor>& actor2, const ClutterVertex* anchor1, const ClutterVertex* anchor2, double reference_angle), clutter_box2d_add_revolute_joint)
 
 
-  _WRAP_METHOD(ClutterBox2DJoint* add_revolute_joint2(const Glib::RefPtr<Clutter::Actor>& actor1,
-                                                      const Glib::RefPtr<Clutter::Actor>& actor2,
-                                                      const ClutterVertex *anchor), clutter_box2d_add_revolute_joint2)
+  _WRAP_METHOD(ClutterBox2DJoint* add_revolute_joint(const Glib::RefPtr<Clutter::Actor>& actor1, const Glib::RefPtr<Clutter::Actor>& actor2, const ClutterVertex *anchor), clutter_box2d_add_revolute_joint2)
 
 
   _WRAP_METHOD(ClutterBox2DJoint* add_distance_joint(const Glib::RefPtr<Clutter::Actor>& actor1,
                                                      const Glib::RefPtr<Clutter::Actor>& actor2,
-                                                     const ClutterVertex *anchor1,
-                                                     const ClutterVertex *anchor2,
+                                                     const ClutterVertex* anchor1,
+                                                     const ClutterVertex* anchor2,
                                                      double length, double frequency, double damping_ratio), clutter_box2d_add_distance_joint)
 
 
@@ -72,7 +66,7 @@
                                                       const Glib::RefPtr<Clutter::Actor>& actor2,
                                                       const ClutterVertex *anchor1,
                                                       const ClutterVertex *anchor2,
-                                                      double min_length, double max_length, const ClutterVertex *axis), clutter_box2d_add_prismatic_joint)
+                                                      double min_length, double max_length, const ClutterVertex* axis), clutter_box2d_add_prismatic_joint)
 
 
   _WRAP_METHOD(ClutterBox2DJoint* add_mouse_joint(const Glib::RefPtr<Clutter::Actor>& actor, ClutterVertex    *target), clutter_box2d_add_mouse_joint)

Modified: clutter-box2dmm/trunk/examples/bridge/main.cc
==============================================================================
--- clutter-box2dmm/trunk/examples/bridge/main.cc	(original)
+++ clutter-box2dmm/trunk/examples/bridge/main.cc	Sun Aug 10 15:56:00 2008
@@ -84,7 +84,7 @@
     box2d->set_child_property(box, "mode", (int)Clutter::Box2D::BOX2D_DYNAMIC);
 
     ClutterVertex anchor = { CLUTTER_UNITS_FROM_FLOAT (20 + 20 * i), CLUTTER_UNITS_FROM_FLOAT (y) };
-    box2d->add_revolute_joint2(prev_actor, box, &anchor);
+    box2d->add_revolute_joint(prev_actor, box, &anchor);
    
     prev_actor = box;
   }
@@ -98,7 +98,7 @@
 
   ClutterVertex anchor = { CLUTTER_UNITS_FROM_FLOAT (20 + 20 * num_planks),
              CLUTTER_UNITS_FROM_FLOAT (y) };
-  box2d->add_revolute_joint2(prev_actor, box, &anchor);
+  box2d->add_revolute_joint(prev_actor, box, &anchor);
 
   box2d->set_simulating();
 

Modified: clutter-box2dmm/trunk/examples/chain/main.cc
==============================================================================
--- clutter-box2dmm/trunk/examples/chain/main.cc	(original)
+++ clutter-box2dmm/trunk/examples/chain/main.cc	Sun Aug 10 15:56:00 2008
@@ -62,7 +62,7 @@
   add_cage(box2d, true /* roof */);
 
   int y = 50;
-  const int num_links = stage->get_height() / 20 - 2;
+  int num_links = stage->get_height() / 20 - 2;
   if((stage->get_width() / 20) < num_links)
     num_links = stage->get_width() / 20;
 



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