Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  Bounding objects  (Read 2122 times)
0 Members and 1 Guest are viewing this topic.
Offline Daath

Junior Member




Java games rock!


« Posted 2003-11-27 12:35:16 »

Just wanna ask if there any plans for implementing BoundingPolytope, BoundingSphere, BoundingBox and BoundingLeaf .
Offline abies

Senior Member





« Reply #1 - Posted 2003-11-27 13:34:23 »

BoundingSphere is already implemented. As for the rest, AFAIK engine currently depends on everything being BoundingSphere.

Real question is if all this functionality is really needed ? Bounding sphere has a benefit of being very fast to check, and what even more important, to transform, because it is not oriented. BoundedBox would be nice in case of AABB, but after transforming to world space, it will be not so clean. As for the BoundingPolytope, only benefit for it I can see is to have a good shape for picking - kind of simplified mesh. For FOV checks it is probably an overkill.

BoundingLeaf - no idea, AFAIK there is no scoping implemented currently.

Artur Biesiadowski
Offline Daath

Junior Member




Java games rock!


« Reply #2 - Posted 2003-11-27 14:04:41 »

every time I ask about something answer is ..well is it really needed? ....ok I shall stop  asking then and go for a while to jogl and see what is there next spring  Sad
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline abies

Senior Member





« Reply #3 - Posted 2003-11-27 14:28:18 »

Please remember that I'm not a xith3d developer, so my opinions are in no way official.

Artur Biesiadowski
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #4 - Posted 2003-11-27 23:27:49 »

So what do you need them for?

If you present a good use case for needing them, I'm sure they'll get added to the todo list.

Quite possibly the reason you are being asked if it's needed is because you are the first to need it  Smiley

Will.

Offline DavidYazel

Junior Member




Java games rock!


« Reply #5 - Posted 2003-11-27 23:47:19 »

Hey Daath, do I detect some anger there?  We havea  huge list of stuff to do, so the question was certainly directed at helping us determine priorities.

Currently there are 3 bounding types supported.  Frustum, BoundingSphere and BoundingBox.  Internally we convert bounding boxes into bounding spheres when we compute the virtual to world bounds, but you can certainly supply bounding boxes as your shape bounds if you want.

Are you  interested in :

1. Using non-spherical bounds for FOV culling?

2. Using them for some sort of internal computations, like constraining a particle system to a non box, non sphere shape?

3. Using them for geometry clipping? (whihc BTW we do not support yet)

4. Some other use?

David Yazel
Xith3D Project Founder
http://xith3d.dev.java.net

It may look complicated, but in the end it is just a bunch of triangles
Offline Daath

Junior Member




Java games rock!


« Reply #6 - Posted 2003-11-28 00:49:24 »

Dave ...anger that's not me ....rather everyday summarization of my luck  Smiley

Ok then, why would I then care about this ..well I just happened to use BoundingPolytope for frustum cullling in my previous code ( plus BoudingSphere) - set planes to it and ask if intersect is in or out - I know there are other ways to achieve same goal, but I just asked, that's all...if it is not there I shall adapt.
Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #7 - Posted 2003-11-28 06:04:12 »

Interesting point Daath,

Isn't a frustrum culling a given in Xith?

Kev

Offline Daath

Junior Member




Java games rock!


« Reply #8 - Posted 2003-11-28 15:24:11 »

yes you ask it nicely please cull this quadtree for me every frame  Grin and it would do it
Offline Daath

Junior Member




Java games rock!


« Reply #9 - Posted 2003-11-28 15:40:36 »

but surely it can be done with (at least I hope I have not tried it yet)
.
.
view.extractFrustum( frustum, canvas3d );
           Classifier.Classification classify = frustum.classify( boundsSphere );

           if ( ( classify == Classifier.OUTSIDE ) ) {
 .
.
.
.
in j3d one couldnt use built in FC since TG from which you we re trying to extract planes was not in sync so I use that method and eventuallly run into even simpler way looking in to j3d.org source code . I am just lazy programmer and didnt wanna change much of the existing code that's all.  Cheesy But obviously that is special case and in 99.9% you can leave that activity to xith3d inner working
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Daath

Junior Member




Java games rock!


« Reply #10 - Posted 2003-11-28 21:50:36 »

ok that worked but now I need to exctract "eye" vector components from it - any ideas how?

 in another words how should I modify my code to get  equivalent of j3d code :
 universe.getViewingPlatform().getViewPlatformTransform().getTransform(transform3D);

 update 3  Grin
 got this one as well.  No more questions -- for now  Smiley
Offline abies

Senior Member





« Reply #11 - Posted 2003-12-01 21:06:28 »

Just to let you know, I have started to play with BoundingBox, trying to make it usable. Currently it is broken in many places - interesections, classifications working wrong, data duplicated, new objects allocated everywhere, a lot of methods unimplemented. I'm at the same time doing some corrections in Sphere/BoundingSphere.

BTW, are BoundingBox/BoundingSphere from com.xith3d.spatial.bounds package needed for anything ? They are sure way for introducing some errors when mistaken with com.xith3d.scenegraph versions... They should be at least renamed, preferably removed (after merging).

Artur Biesiadowski
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #12 - Posted 2003-12-02 12:54:38 »

Agree with abies. They make some confusion.

Yuri

Yuri Vl. Gushchin
JProof Group
Offline Daath

Junior Member




Java games rock!


« Reply #13 - Posted 2003-12-02 14:11:40 »

agree as well, the only question is which ones should get removed. I am only guessing that bounding objects will eventually get used for colision detection and if that is a case then I would rather use(leave) those in spacial.bounds package. But that might be just matter of taste.
Offline abies

Senior Member





« Reply #14 - Posted 2003-12-02 19:10:15 »

I plan to make spatial package Box/Sphere objects very smart - containing almost all logic. Then BoundingBox/BoundingSphere from scenegraph package would be just a subclass which would dispatch Bounds interface calls to correct supercalls. With almost all the logic moved to Box/Sphere, there would be no reason to have BoundingBox/BoundingSphere inside spatial package.

Artur Biesiadowski
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.

pw (22 views)
2014-07-24 01:59:36

Riven (20 views)
2014-07-23 21:16:32

Riven (17 views)
2014-07-23 21:07:15

Riven (20 views)
2014-07-23 20:56:16

ctomni231 (48 views)
2014-07-18 06:55:21

Zero Volt (44 views)
2014-07-17 23:47:54

danieldean (35 views)
2014-07-17 23:41:23

MustardPeter (38 views)
2014-07-16 23:30:00

Cero (53 views)
2014-07-16 00:42:17

Riven (52 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!