Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (405)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Multiple Geoms for the Same Body [JOODE]  (Read 1977 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Posted 2007-06-15 17:51:05 »

Hi everyone,

this day I've been working hard on XPAL (Xith3D Physics Abstraction Layer, for those who don't follow) and I came accross the problem of having a Body with multiple shapes.
As I see it, it could be done in several ways (classified in order of increasing coolness) :
- I remember there was a fixed Joint in ODE but that would require multiple bodies, would be needlessly slow, and probably unstable.
- By hand, the Body refers to nothing, and the users just detect collisions for the Geoms he wants, then update the pos/rot of the Geoms from the pos/rot of the Body
- By having a list of Geoms referred in Body instead of just one. But that would require that the Geom have two position/rotation : one position/rotation relative to the body (which doesn't change with stepping), and another absolute (world coordinate, is updated each step with the Body's own position/rotation)
- By simply using a Space, but that would also require that the Geom have two position/rotation (relative to Space pos/rot, and world coord).

The solution I prefer is the last one (Space), but it needs changes in JOODE to be implemented.

So, JOODE devs (thomas, arne, ..) what do you think about that ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #1 - Posted 2007-06-15 20:33:07 »

Quote
- By having a list of Geoms referred in Body instead of just one. But that would require that the Geom have two position/rotation : one position/rotation relative to the body (which doesn't change with stepping), and another absolute (world coordinate, is updated each step with the Body's own position/rotation)
that sounds like GeomTransform. But I don't know, if it works already.

Quote
By simply using a Space, but that would also require that the Geom have two position/rotation (relative to Space pos/rot, and world coord).
I don't follow you. The class Space groups geoms, that can collide with each other, so how do you want to force fixed positions into there?

I think using GeomTransform is the easiest way, because it's not as trivial as it first looks to have several geoms in one body, because the problem the solver has to solve gets modified.

:: JOODE :: Xith3d :: OdeJava ::
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #2 - Posted 2007-06-16 15:18:13 »

that sounds like GeomTransform. But I don't know, if it works already.
Ah yeah, forgot that.

I don't follow you. The class Space groups geoms, that can collide with each other, so how do you want to force fixed positions into there?
Yeah, you're right. So that's a bad idea.

I think using GeomTransform is the easiest way, because it's not as trivial as it first looks to have several geoms in one body, because the problem the solver has to solve gets modified.
Well, I don't see it as a more difficult problem for the solver because the solver doesn't know from which geom the  contact joint comes (IIRC), so if contact points come from one geom or several shouldn't make a too big difference.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #3 - Posted 2007-06-17 02:07:21 »

right, so GeomTransform should be fairly understandable (and fixable, if it doesn't run Wink ) - ohh and we should add a test in Space, that Geoms belonging to the same Body cannot collide.

:: JOODE :: Xith3d :: OdeJava ::
Offline t_larkworthy

Senior Member


Projects: 1


Google App Engine Rocks!


« Reply #4 - Posted 2007-06-19 17:39:13 »

Oh yeah. GeomTransform is the way to go...

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline t_larkworthy

Senior Member


Projects: 1


Google App Engine Rocks!


« Reply #5 - Posted 2007-07-19 15:10:57 »

Quote
and fixable, if it doesn't run 
I have used it ow and it worked fine, including the collider. I added support in the XithConverter

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline t_larkworthy

Senior Member


Projects: 1


Google App Engine Rocks!


« Reply #6 - Posted 2007-07-19 15:48:15 »

Arne, you seem to have an intuatition with matrix transformation etc. I wonder if you could improve the GeomTransform class (or create a v2 one) that runs off a 4x4 matrix? It would be good if Geoms could be deliberatly rescaled as well as rotated and translated, thus we would have support for elispses and rhomboids etc.

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (60 views)
2013-05-17 21:29:12

alaslipknot (69 views)
2013-05-16 21:24:48

gouessej (99 views)
2013-05-16 00:53:38

gouessej (96 views)
2013-05-16 00:17:58

theagentd (107 views)
2013-05-15 15:01:13

theagentd (98 views)
2013-05-15 15:00:54

StreetDoggy (144 views)
2013-05-14 15:56:26

kutucuk (166 views)
2013-05-12 17:10:36

kutucuk (165 views)
2013-05-12 15:36:09

UnluckyDevil (175 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.082 seconds with 21 queries.