Author: ArcRiley
Date: 2008-02-19 15:48:39 -0500 (Tue, 19 Feb 2008)
New Revision: 957

Added:
   trunk/pysoy/src/scenes/_prerunField.pxi
   trunk/pysoy/src/scenes/_runField.pxi
Removed:
   trunk/pysoy/src/_core/_callback.pxi
   trunk/pysoy/src/_core/_prerunField.pxi
   trunk/pysoy/src/_core/_runField.pxi
Modified:
   trunk/pysoy/src/_core/soy._core.pyx
   trunk/pysoy/src/scenes/soy.scenes.pxd
   trunk/pysoy/src/scenes/soy.scenes.pyx
Log:
#930 : moved _prerunField and _runField


Deleted: trunk/pysoy/src/_core/_callback.pxi
===================================================================
--- trunk/pysoy/src/_core/_callback.pxi 2008-02-19 20:35:04 UTC (rev 956)
+++ trunk/pysoy/src/_core/_callback.pxi 2008-02-19 20:48:39 UTC (rev 957)
@@ -1,64 +0,0 @@
-# PySoy _callback
-#
-# Copyright (C) 2006,2007,2008 PySoy Group
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, see http://www.gnu.org/licenses
-#
-# $Id$
-
-cdef soy._internals.PointerSet _callfields
-cdef ode.dJointGroupID _contactgroup
-
-_callfields   = soy._internals.PointerSet()
-_contactgroup = ode.dJointGroupCreate(0)
-
-cdef void _callback(void* data, ode.dGeomID o1, ode.dGeomID o2) :
-  cdef int c, f
-  cdef ode.dBodyID b1, b2
-  cdef soy.bodies._bodies.Body bo1, bo2
-  cdef ode.dContactGeom cg
-  cdef ode.dContact ct
-  cdef ode.dJointID j
-  # Get associated bodies
-  b1 = ode.dGeomGetBody(o1)
-  b2 = ode.dGeomGetBody(o2)
-  # Do not continue if we can't do anything with our collisions
-  if b1 == NULL or b2 == NULL :
-    return
-  # Wham!
-  c = ode.dCollide(o1, o2, 1, &cg, sizeof(cg))
-  if c > 0 :
-    # Get the Body objects
-    bo1 = <soy.bodies._bodies.Body> ode.dBodyGetData(b1)
-    bo2 = <soy.bodies._bodies.Body> ode.dBodyGetData(b2)
-    f = 0
-    # activate any fields present...
-    if isinstance(bo1, soy.bodies.fields.Field) :
-      f = 1
-      if not (<soy.bodies.fields.Field> bo1)._exert(bo2) :
-        _callfields._insert(<void*> bo1)
-    if isinstance(bo2, soy.bodies.fields.Field) :
-      f = 1
-      if not (<soy.bodies.fields.Field> bo2)._exert(bo1) :
-        _callfields._insert(<void*> bo2)
-    # if neither shape is a field
-    if f == 0 :
-      ct.geom = cg
-      # surface parameters should have an exposed interface on soy.shapes.Shape
-      # this code should pull parameters from there.
-      ct.surface.mode = ode.dContactBounce
-      ct.surface.bounce = 0.8
-      ct.surface.bounce_vel = 0
-      j = ode.dJointCreateContact(bo1._scene._worldID, _contactgroup, &ct)
-      ode.dJointAttach(j, bo1._bodyID, bo2._bodyID)

Deleted: trunk/pysoy/src/_core/_prerunField.pxi
===================================================================
--- trunk/pysoy/src/_core/_prerunField.pxi      2008-02-19 20:35:04 UTC (rev 
956)
+++ trunk/pysoy/src/_core/_prerunField.pxi      2008-02-19 20:48:39 UTC (rev 
957)
@@ -1,21 +0,0 @@
-# PySoy _prerunField
-#
-# Copyright (C) 2006,2007,2008 PySoy Group
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, see http://www.gnu.org/licenses
-#
-# $Id$
-
-cdef void _prerunField(void* key, void* value, void* user_data) :
-  (<soy.bodies.fields.Field> key)._give(1)

Deleted: trunk/pysoy/src/_core/_runField.pxi
===================================================================
--- trunk/pysoy/src/_core/_runField.pxi 2008-02-19 20:35:04 UTC (rev 956)
+++ trunk/pysoy/src/_core/_runField.pxi 2008-02-19 20:48:39 UTC (rev 957)
@@ -1,21 +0,0 @@
-# PySoy _runField
-#
-# Copyright (C) 2006,2007,2008 PySoy Group
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, see http://www.gnu.org/licenses
-#
-# $Id$
-
-cdef void _runField(void* key, void* value, void* user_data) :
-  (<soy.bodies.fields.Field> key)._commit()

Modified: trunk/pysoy/src/_core/soy._core.pyx
===================================================================
--- trunk/pysoy/src/_core/soy._core.pyx 2008-02-19 20:35:04 UTC (rev 956)
+++ trunk/pysoy/src/_core/soy._core.pyx 2008-02-19 20:48:39 UTC (rev 957)
@@ -49,9 +49,6 @@
 
 # These must be last and in this order
 include "quit.pxi"
-include "_callback.pxi"
 include "_coreLoop.pxi"
 include "_EventLoop.pxi"
-include "_runField.pxi"
-include "_prerunField.pxi"
 include "_init.pxi"

Copied: trunk/pysoy/src/scenes/_prerunField.pxi (from rev 956, 
trunk/pysoy/src/_core/_prerunField.pxi)
===================================================================
--- trunk/pysoy/src/scenes/_prerunField.pxi                             (rev 0)
+++ trunk/pysoy/src/scenes/_prerunField.pxi     2008-02-19 20:48:39 UTC (rev 
957)
@@ -0,0 +1,21 @@
+# PySoy _prerunField
+#
+# Copyright (C) 2006,2007,2008 PySoy Group
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 3 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, see http://www.gnu.org/licenses
+#
+# $Id$
+
+cdef void _prerunField(void* key, void* value, void* user_data) :
+  (<soy.bodies.fields.Field> key)._give(1)

Copied: trunk/pysoy/src/scenes/_runField.pxi (from rev 956, 
trunk/pysoy/src/_core/_runField.pxi)
===================================================================
--- trunk/pysoy/src/scenes/_runField.pxi                                (rev 0)
+++ trunk/pysoy/src/scenes/_runField.pxi        2008-02-19 20:48:39 UTC (rev 
957)
@@ -0,0 +1,21 @@
+# PySoy _runField
+#
+# Copyright (C) 2006,2007,2008 PySoy Group
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 3 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, see http://www.gnu.org/licenses
+#
+# $Id$
+
+cdef void _runField(void* key, void* value, void* user_data) :
+  (<soy.bodies.fields.Field> key)._commit()

Modified: trunk/pysoy/src/scenes/soy.scenes.pxd
===================================================================
--- trunk/pysoy/src/scenes/soy.scenes.pxd       2008-02-19 20:35:04 UTC (rev 
956)
+++ trunk/pysoy/src/scenes/soy.scenes.pxd       2008-02-19 20:48:39 UTC (rev 
957)
@@ -23,6 +23,9 @@
 cimport py
 cimport soy._internals
 
+cdef void _prerunField(void*, void*, void*)
+cdef void _runField(void*, void*, void*)
+
 cdef class Scene (soy._internals.Loopable) :
   cdef ode.dWorldID               _worldID
   cdef ode.dSpaceID               _spaceID

Modified: trunk/pysoy/src/scenes/soy.scenes.pyx
===================================================================
--- trunk/pysoy/src/scenes/soy.scenes.pyx       2008-02-19 20:35:04 UTC (rev 
956)
+++ trunk/pysoy/src/scenes/soy.scenes.pyx       2008-02-19 20:48:39 UTC (rev 
957)
@@ -38,4 +38,6 @@
 cimport soy.bodies.fields
 cimport soy.bodies.lights
 
+include "_prerunField.pxi"
+include "_runField.pxi"
 include "Scene.pxi"

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to