Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (135)
games submitted by our members
Games in WIP (593)
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  
  Synchronizing of xith3d and odejava objects  (Read 1504 times)
0 Members and 1 Guest are viewing this topic.
Offline arne

Senior Devvie

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

« Posted 2005-05-03 15:01:33 »


I came across having objects whose render-geometry is different from the bounds, because the bounds are much simpler. Because of these differences, the Positions of the objects weren't the same any more (espascially when having more xith-objects for one Odejava object), so I wasn't able to use Xith3DDisplayObject, so I wrote my own DisplayTransformable, which manages exactly that.

Is anybody interested in that code?

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

Senior Devvie

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

« Reply #1 - Posted 2005-05-04 15:56:39 »

Yes, I'm interested.
I would include it in Gamma.
Request the Developer role in Gamma and I will approve it ASAP so you can apport your contributions ( if you want, of course ).

"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 Devvie

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

« Reply #2 - Posted 2005-05-04 17:58:25 »

I requested Developer role now, lets see ...
BTW Is there already content added to the cvs? ... it looks so empty

If anybody else is interested I could put a link here too, but I think it's better when such stuff is all at one place together.

:: JOODE :: Xith3d :: OdeJava ::
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #3 - Posted 2005-05-05 21:32:52 »

Can you use Xith3DDisplayObject if you encapsulate your geometry in a TG which moves it into the correct position?

That's what I do and it works well.  Perhaps your method may save a few matrix calculations though?

Please post the code, I'm interested in seeing it.


Offline arne

Senior Devvie

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

« Reply #4 - Posted 2005-05-06 05:40:11 »

It's actually not much(It's what a transformGroup would be doing anyways), so here is it:
public class DisplaySync implements DisplayTransformable {
    Matrix4f diff;
    Matrix4f temp;
    TransformGroup g;
    Transform3D t;
    /** Creates a new instance of DisplaySync */
    public DisplaySync(TransformGroup g, Placeable p) {
        this.g = g;
        t = g.getTransform();
        diff = new Matrix4f();
        temp = new Matrix4f();
        //GeomTransform's Quaternion  doesn't initialize correctly -  so something special here
        if(p instanceof GeomTransform) {
            diff = new Matrix4f();
            ((GeomTransform) p).getTransform(diff);
        else diff.set(p.getQuaternion(), p.getPosition(),1);

    public void setTransform(Vector3f position, Quat4f quaternion) {
        temp.set(quaternion, position, 1);

:: JOODE :: Xith3d :: OdeJava ::
Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #5 - Posted 2005-05-06 23:24:54 »

So is this better than encapsulating the geom inside a TG with the offset?


Offline arne

Senior Devvie

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

« Reply #6 - Posted 2005-05-07 07:12:43 »

yeah - I'd say so, cause you don't have to create a new tg. And people without very much Matrix knowledge could get proplems there. Please note, that the GeomTransform "Bug" is also work-rounded, here. From the performance side, I think there is no difference.

:: JOODE :: Xith3d :: OdeJava ::
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.

Olo (9 views)
2015-01-25 18:44:22

Robo11 (19 views)
2015-01-25 06:14:26

basil_ (26 views)
2015-01-17 22:29:32

wxwsk8er (24 views)
2015-01-16 21:42:21

wxwsk8er (20 views)
2015-01-16 20:44:20

basil_ (25 views)
2015-01-14 09:46:59

basil_ (21 views)
2015-01-14 09:46:52

wxwsk8er (32 views)
2015-01-13 20:42:16

wxwsk8er (34 views)
2015-01-13 03:23:59

vctt (55 views)
2015-01-12 03:21:07
2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17 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‑
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!