Commits

Anonymous committed c89be50

last summit code:add some codes related to collision detection(including liang clipping, aabb clipping test, point-in-rectshape detecting...)

Comments (0)

Files changed (1)

src/pgWorldObject.c

 #include "pgWorldObject.h"
 #include "pgBodyObject.h"
 #include "pgJointObject.h"
+#include <structmember.h>
 
 #define MAX_SOLVE_INTERAT 20
 
 static PyObject* _world_test_noargs(pgWorldObject *world)
 {
 	/* Do some things here */
-	Py_RETURN_NONE;
+	//Py_RETURN_NONE;
+	PyObject* result;
+	result = Py_BuildValue("s","world test");
+	return result;
 }
 
 static PyObject* _world_test_args(pgWorldObject *world, PyObject *args)
 	{ NULL, NULL, 0, NULL } /* The NULL sentinel is important! */
 };
 
+static PyMemberDef _pgWorld_members[] = 
+{
+	{"damping",T_DOUBLE,offsetof(pgWorldObject,fDamping),0,""},
+	
+};
+
 static PyTypeObject pgWorldType =
 {
 	PyObject_HEAD_INIT(NULL)
 	0,                          /* tp_iter */
 	0,                          /* tp_iternext */
 	_pgWorld_methods,           /* tp_methods */
-	0,                          /* tp_members */
+	_pgWorld_members,           /* tp_members */
 	0,                          /* tp_getset */
 	0,                          /* tp_base */
 	0,                          /* tp_dict */