Scheduling Bounds of a Behavior
  Home FAQ Contact Sign in
comp.lang.java.3d only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.java.3d Profile…
 Up
Re: Scheduling Bounds of a Behavior         


Author: Matthias
Date: Dec 19, 2006 10:56

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 it would be a BoundingSphere)?
>
Hi,

I am totally guessing, but I would 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.
2 Comments
Re: Scheduling Bounds of a Behavior         


Author: Thomas Partsch
Date: Dec 19, 2006 11:24

Matthias schrieb:
> 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 it would be a BoundingSphere)?
>>
> Hi,
>
> I am totally guessing, but I would 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.
Show full article (1.04Kb)
1 Comment
Re: Scheduling Bounds of a Behavior         


Author: Matthias
Date: Dec 20, 2006 01:14

On Tue, 19 Dec 2006 20:24:36 +0100, Thomas Partsch
wrote:
>In Java 3D API 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 would guess, the Behavior's Bounds origin would
>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 would 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 don't really
know java 3d and because i want to learn a bit.. however this
group is not very active
Show full article (1.07Kb)
no comments
Re: Scheduling Bounds of a Behavior         


Author: sanbikinoraion
Date: Dec 20, 2006 01:50

> 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 would 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 would you know
where the behaviour was located?

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 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,
Show full article (1.15Kb)
no comments
Scheduling Bounds of a Behavior         


Author: Thomas Partsch
Date: Dec 19, 2006 04:40

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 would be a BoundingSphere)?

Regards,
Thomas
5 Comments
Re: Scheduling Bounds of a Behavior         


Author: Thomas Partsch
Date: Dec 20, 2006 05:08

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 would 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 would you know
> where the behaviour was located?

That was also my latest thought.
Show full article (1.27Kb)
no comments