Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (169)
games submitted by our members
Games in WIP (647)
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 2551 times)
0 Members and 1 Guest are viewing this topic.
Offline Daath

Junior Devvie

Java games rock!

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

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

Senior Devvie

« Reply #1 - Posted 2003-11-27 12: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 Devvie

Java games rock!

« Reply #2 - Posted 2003-11-27 13: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 Devvie

« Reply #3 - Posted 2003-11-27 13: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 22: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


Offline DavidYazel

Junior Devvie

Java games rock!

« Reply #5 - Posted 2003-11-27 22: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

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

Junior Devvie

Java games rock!

« Reply #6 - Posted 2003-11-27 23: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 Spiffy Duke »

Medals: 272
Projects: 25
Exp: 18 years

Coder, Trainee Pixel Artist, Game Reviewer

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

Interesting point Daath,

Isn't a frustrum culling a given in Xith?


Offline Daath

Junior Devvie

Java games rock!

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

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

Junior Devvie

Java games rock!

« Reply #9 - Posted 2003-11-28 14: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 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 Devvie

Java games rock!

« Reply #10 - Posted 2003-11-28 20: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 :

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

Senior Devvie

« Reply #11 - Posted 2003-12-01 20: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 Devvie

Speak Java!

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

Agree with abies. They make some confusion.


Yuri Vl. Gushchin
JProof Group
Offline Daath

Junior Devvie

Java games rock!

« Reply #13 - Posted 2003-12-02 13: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 Devvie

« Reply #14 - Posted 2003-12-02 18: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.

KaiHH (15 views)
2015-07-07 11:39:58

deepthought (54 views)
2015-06-30 15:39:44

deepthought (57 views)
2015-06-30 15:39:09

deepthought (66 views)
2015-06-30 15:36:52

Za\'Anzabar (44 views)
2015-06-29 05:44:54

TritonDreyja (50 views)
2015-06-24 17:10:40

CopyableCougar4 (52 views)
2015-06-23 00:34:45

BurntPizza (58 views)
2015-06-21 20:36:46

cookiecompiler (100 views)
2015-06-11 15:42:53

cookiecompiler (58 views)
2015-06-11 15:41:14
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

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 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!