Ok, bounds are completely broken for me as seen in this thread. In my game I’m going to need to have some sort of 3D sound system that’ll let the user know where fights are going on, and be able to increase the volume of the fights as the user gets closer. I’m also going to need to use some collision system (either odejava or Alonzo’s). I’m also going to use a HUD via the Foreground node. This is really about it. Do I need to be able to use Xith’s bounds for any of these things (or possibly other things I haven’t thought of)?
getVworldBounds() in Node works fine for me. This method will return you a world-space BoundingSphere enveloping everything below the node in the scene graph. The call is cheap because the world-space bounds are updated and maintained when any TransformGroup above the node is modified.
[quote]getVworldBounds() in Node works fine for me. This method will return you a world-space BoundingSphere enveloping everything below the node in the scene graph. The call is cheap because the world-space bounds are updated and maintained when any TransformGroup above the node is modified.
[/quote]
I’m not sure I understand you, how am I supposed to use this method?
It doesn’t sound like you NEED bounds for any of the described operations, but they could be useful for culling out sounds from far away sources etc… I was just pointing out that if you do decide to use bounds, the getVworldBounds() method works well.
[quote]It doesn’t sound like you NEED bounds for any of the described operations, but they could be useful for culling out sounds from far away sources etc… I was just pointing out that if you do decide to use bounds, the getVworldBounds() method works well.
[/quote]
Ok, but how do I use it?
That depends on the application
What specifically are you trying to do?
I’m trying to add bounds to anything. Look at the thread I linked to in the first post. Ships, planets, etc.
The bounds are automatically generated. For example, if you create a Shape3D s that represents a ship, calling s.getVworldBounds() will give you an instance of a BoundingSphere which encompasses the ship. The BoundingSphere will be in world-space coordinates, so it can be compared with any other BoundingSpheres obtained similarly. Hope this helps 
[quote]The bounds are automatically generated. For example, if you create a Shape3D s that represents a ship, calling s.getVworldBounds() will give you an instance of a BoundingSphere which encompasses the ship. The BoundingSphere will be in world-space coordinates, so it can be compared with any other BoundingSpheres obtained similarly. Hope this helps 
[/quote]
Ok but is its position accurate? As shown in the other thread, when you show the bounds they are completely off target.
Yes, the positions are accurate. You could verify this by placing a sphere at each location with the specified radius. The bounds objects displayed by setShowBounds() do seem to be wrong.
[quote]Yes, the positions are accurate. You could verify this by placing a sphere at each location with the specified radius. The bounds objects displayed by setShowBounds() do seem to be wrong.
[/quote]
Wow, thank you, you are the first person to acknowledge that this problem exists, it’s not just me going crazy after all 
We talked about this on IM just the other day and I’m sure we agreed it sound like a problem with Xith?
Anyway, you do actually NEED bounds, not least for view frustrum culling.
Kev
[quote]We talked about this on IM just the other day and I’m sure we agreed it sound like a problem with Xith?
Anyway, you do actually NEED bounds, not least for view frustrum culling.
Kev
[/quote]
Oh, I guess I wasn’t sure if you had actually tried to do this on your end and reproduced the same results. Thanks for the reply though, I didn’t really realize bounds were used like this, but now that you mention it, it makes perfect sense
So I guess they are safe to use after all.
Hi,
[quote]I’m sure we agreed it sound like a problem with Xith?
[/quote]
Test case?
Yuri