Scheduling Bounds of a Behavior
6 Message(s) by 3 Author(s) originally posted in 3d java
| From: Thomas Partsch |
Date: Tuesday, December 19, 2006
|
Hi there!
In Daniel Selmans book "JAVA 3D Programming" (ISBN 1930110359) there is
an example given for
scheduling bounds for a behavior (page 165):
There is a behavior that rotates a
wheel only if the car is within 20
meters of the viewer. That is, if the Bounds for the Behavior intersect
the ViewPlatform's activation region.
My question is now: What are the parameters for the Bounds? Radius is 20
meters, of course, but where is the origin of that BoundingSphere
(considering it'd be a BoundingSphere)?
Regards,
Thomas
| From: Matthias |
Date: Tuesday, December 19, 2006
|
On Tue, 19 Dec 2006 13:40:58 +0100, Thomas Partsch
wrote in message:
My question is now: What are the parameters for the Bounds? Radius is 20
meters, of course, but where is the origin of that BoundingSphere
(considering it'd be a BoundingSphere)?
Hi,
I am totally guessing, but I'd think the camera origin?
hth
Matthias
ps. Is turning a car's wheels or not really so important
performance-wise? I mean.. the wheels must be rendered
no matter whether they turn or not.
| From: Thomas Partsch |
Date: Tuesday, December 19, 2006
|
Matthias schrieb:
On Tue, 19 Dec 2006 13:40:58 +0100, Thomas Partsch
wrote in message:
My question is now: What are the parameters for the Bounds? Radius is 20
meters, of course, but where is the origin of that BoundingSphere
(considering it'd be a BoundingSphere)?
Hi,
I am totally guessing, but I'd think the camera origin?
hth
Matthias
ps. Is turning a car's wheels or not really so important
performance-wise? I mean.. the wheels must be rendered
no matter whether they turn or not.
Hi Matthias!
Do not ask me about performance. The example given is from the book. This
is all about explaining Behaviors not writing a performant application.
In JAVA 3D
API (application
programming interface)Specifation it is said, that the ViewPlatform's
activation region is a BoundingSphere around the ViewPlatform. If the
Behavior is only activated if the Behavior's Bounds intersect the
ViewPlatforms Bounds, I'd guess, the Behavior's Bounds origin'd
be the origin of the wheel. Can you follow my thought?
| From: Matthias |
Date: Wednesday, December 20, 2006
|
On Tue, 19 Dec 2006 20:24:36 +0100, Thomas Partsch
wrote in message:
In JAVA 3D API (application programming interface)Specifation it is said, that the ViewPlatform's
activation region is a BoundingSphere around the ViewPlatform. If the
Behavior is only activated if the Behavior's Bounds intersect the
ViewPlatforms Bounds, I'd guess, the Behavior's Bounds origin'd
be the origin of the wheel. Can you follow my thought?
Hi Thomas
as far as I understand the meaning of view
platform is more or
less what in some other 3d
software is called camera meaning the
location from where you are actually viewing your 3d scene: therefore
your statement'd imply that the BoundingSphere's origin is at
your camera (essentially at the
point your 'eyes' look at the 3d
scene) and the Behaviour is activated when your wheels get close to
your viewpoint. (So I think it is the other way round you described it
above)
However this is crude guessing, i'm here because i do not really
know JAVA 3d and because I want to learn a
bit .. however this
group isn't very active
greetings
matthias
| From: sanbikinoraion |
Date: Wednesday, December 20, 2006
|
My question is now: What are the parameters for the Bounds? Radius is 20
meters, of course, but where is the origin of that BoundingSphere
(considering it'd be a BoundingSphere)?
Contrary to the other responders, I believe that the origin of the
bounding sphere to get the desired effect should be the origin of the
car. This is why:
I believe that behaviours are triggered when their bounding sphere
intersects the viewplatform's origin, rather than the other way round.
Thinking about it, this is the way that makes sense: if you set the
behaviour's origin to be that of the viewplatform, how'd you know
where the behaviour was located?
For a car that may move around your scene
graph you will either have to
have the behaviour update the origin of the scheduling bounds whenever
it moves or use a bit of cleverness due to the way JAVA will pass
point3ds by
reference rather than value: you can get the point3d that
represents the origin of the car and set it to be the origin of the
scheduling bounds. That way, whenever the car alters its own origin the
scheduling bounds will automatically update themselves.
Cheers,
Kendrick
| From: Thomas Partsch |
Date: Wednesday, December 20, 2006
|
sanbikinoraion schrieb:
My question is now: What are the parameters for the Bounds? Radius is 20
meters, of course, but where is the origin of that BoundingSphere
(considering it'd be a BoundingSphere)?
Contrary to the other responders, I believe that the origin of the
bounding sphere to get the desired effect should be the origin of the
car. This is why:
I believe that behaviours are triggered when their bounding sphere
intersects the viewplatform's origin, rather than the other way round.
I said that, did I not?
Thinking about it, this is the way that makes sense: if you set the
behaviour's origin to be that of the viewplatform, how'd you know
where the behaviour was located?
That was also my latest thought.
For a car that may move around your scene graph you will either have to
have the behaviour update the origin of the scheduling bounds whenever
it moves or use a bit of cleverness due to the way JAVA will pass
point3ds by reference rather than value: you can get the point3d that
represents the origin of the car and set it to be the origin of the
scheduling bounds. That way, whenever the car alters its own origin the
scheduling bounds will automatically update themselves.
Thanks a lot.
Thomas
Next Message: Physics Engines comparisons and benchmarks
Blogs related to Scheduling Bounds of a Behavior
Java Faqs
handle, it must specify this
behavior so the callers of the method can guard
... method of allocating CPU time to individual threads in a priority
schedule.
... A socket is
bound to a port number so that the TCP layer can identify the
...
Level of detail independent A scenegraph branch should
Bounds and level of detail aware Objects with large bounding volumes tend to imply often
... an important role in optimizing rendering and
behavior scheduling.
... Behavior model Using
Java 3D scenegraph behaviors allows scenegraph
...
CHAPTER 5 Scenegraph node reference 5.1 Scenegraph compilation
5.3
Bounds and CollisionBounds
Java 3D maintains object boundary information for the Nodesin the scenegraph.
... Java 3D uses the Node Boundsinformation extensively, for everything from visibility testing to
Behavior scheduling. 69
...
Re: Scheduling Bounds of a Behavior
On Tue, 19 Dec 2006 13:40:58 +0100, Thomas Partsch
wrote: >My question is now: What are the parameters for the Bounds? Radius is 20 >meters, of course, but where is the origin of that BoundingSphere >(considering ...
Scheduling Bounds of a Behavior
In Daniel Selmans book "Java 3D Programming" (ISBN 1930110359) there is an example given for scheduling bounds for a behavior (page 165): There is a behavior that rotates a wheel only if the car is within 20 meters of the viewer. ...
Re: Scheduling Bounds of a Behavior
For a car that may move around your scene graph you'll either have to have the behaviour update the origin of the scheduling bounds whenever it moves or use a bit of cleverness due to the way java will pass point3ds by reference rather ...