[tuhopuu-devel] A couple simple patches.

Patrick tuhopuu-devel@blender.org
Mon, 24 Nov 2003 22:43:21 -0800


This is a multi-part message in MIME format.
--------------070705000209060603070708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

My first patches related to the game engine. 

pySuspendOde.diff adds back in the commands 
suspendDynamics()/restoreDynamics() in order to control whether an 
object is controlled by ODE physics or not.  There was a comment above 
that said not to do it the way I did it.  I basically just patch through 
and call the Ode suspend/resume body commands on the body controlled by 
the object.  It could have reprecussions if the object is connected to 
another, so we might want to change this in the future, but for now 
there is nothing wrong with accomplishing it this way.

meshBoundType.diff replaces a few buttons that got lost in the gui 
switch.  I didn't put them in a good place but couldn't really find a 
nice place to stick them in.  I suppose thats why they got axed?  They 
control the bounding type that is used for Ode meshes.

I'm new so please verify that the patches are in the right format, thanks.

Is kester around?  I'd like to talk to him about the collision 
detection.  Currently, we are really missing box/sphere/ray vs. polygon 
soup collisions.  I've been reading a bit on ODE and it looks like they 
are possible, but I'm not sure how I would go about adding them.  Have 
they been omitted for a reason, or have you jost not gotten around to 
adding it? 

Thanks for you're great work so far.


--------------070705000209060603070708
Content-Type: text/plain;
 name="meshBoundType.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="meshBoundType.diff"

? source/blender/deflate/intern/zconf.h
? source/blender/deflate/intern/zlib.h
? source/blender/inflate/intern/zconf.h
? source/blender/inflate/intern/zlib.h
? source/blender/writestreamglue/intern/zconf.h
? source/blender/writestreamglue/intern/zlib.h
Index: source/blender/src/buttons_editing.c
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/source/blender/src/buttons_editing.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 buttons_editing.c
375c375,379
< 
---
> 
> 	uiDefButS(block, TOG|BIT|0, REDRAWVIEW3D, "Bounds",		10, 200, 130, 17, &ob->dtx, 0, 0, 0, 0, "Display bounding object");
> 	uiDefButS(block, MENU, REDRAWVIEW3D, "Bounding volume%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Polyheder",
> 																10, 222, 130, 17, &ob->boundtype, 0, 0, 0, 0, "Choose between bound objects");
> 	

--------------070705000209060603070708
Content-Type: text/plain;
 name="pySuspendOde.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pySuspendOde.diff"

Index: source/kesterji/Physics/BlOde/OdePhysicsController.cpp
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu2/source/kesterji/Physics/BlOde/OdePhysicsController.cpp,v
retrieving revision 1.2
diff -r1.2 OdePhysicsController.cpp
589a590
> //Simple suspend/resume of physics for this object by directly calling the ODE commands
592c593,598
< 
---
>   if (m_OdeSuspendDynamics==false)
>   {
>     m_OdeSuspendDynamics = true;
>     dBodyDisable(m_bodyId);
>     //cout << "Ode dynamics suspended";
>   }
597c603,608
< 
---
>   if (m_OdeSuspendDynamics==true)
>   {
>     m_OdeSuspendDynamics = false;
>     dBodyEnable(m_bodyId);
>     //cout << "Ode dynamics resumed";
>   }

--------------070705000209060603070708--