>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.
Thomas Partsch - 19 Dec 2006 19:24 GMT
Matthias 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
[quoted text clipped - 11 lines]
> performance-wise? I mean.. the wheels must be rendered
> no matter whether they turn or not.
Hi Matthias!
Don't 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 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?
Matthias - 20 Dec 2006 09:14 GMT
>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
greetings
matthias
> 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,
Kendrick
Thomas Partsch - 20 Dec 2006 13:08 GMT
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
[quoted text clipped - 6 lines]
> 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.
> 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
[quoted text clipped - 3 lines]
> scheduling bounds. That way, whenever the car alters its own origin the
> scheduling bounds will automatically update themselves.
Thanks a lot.
Thomas