Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
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 2260 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!
Legends of Yore - The Casual Retro Roguelike
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


Medals: 1
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


Medals: 1
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


Medals: 1
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.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (50 views)
2014-04-15 18:08:23

BurntPizza (46 views)
2014-04-15 03:46:01

UprightPath (62 views)
2014-04-14 17:39:50

UprightPath (44 views)
2014-04-14 17:35:47

Porlus (61 views)
2014-04-14 15:48:38

tom_mai78101 (85 views)
2014-04-10 04:04:31

BurntPizza (143 views)
2014-04-08 23:06:04

tom_mai78101 (242 views)
2014-04-05 13:34:39

trollwarrior1 (201 views)
2014-04-04 12:06:45

CJLetsGame (208 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!