Mojtaba wrote:
> If I understand this right, you have problems with Proximity Sensor if
> there are more than one viewplatforms?
Correct. Although it is a little more complex. If any one of the vps
intersect the prox area it will trigger, whether they have a View
attached or not. If all the vps are outside the prox trigger area, then
no they won't. Safest bet is to say "yes, only one VP will work fine".
> Does it work if there is only one view?
No. The behaviour is based on the ViewPlatform entry, not the view. That
means it triggers regardless of whether there is a view attached.
Nominally, that means if you have no View at all then the behaviour
would still trigger.
> What criteria do you use to wakeup your behavior?
We use just the standard WakeupOnViewPlatformEntry.
private void calcBounds() {
bbox = new BoundingBox(
new Point3d(vfCenter[0] - vfSize[0]/2,
vfCenter[1] - vfSize[1]/2,
vfCenter[2] - vfSize[2]/2),
new Point3d(vfCenter[0] + vfSize[0]/2,
vfCenter[1] + vfSize[1]/2,
vfCenter[2] + vfSize[2]/2));
if (j3dImplNode == null) {
j3dImplNode = new J3DProximityBehavior(this,bbox);
j3dImplNode.setEnable(false);
}
else {
j3dImplNode.setBounds(bbox);
}
}
> What criteria should be used to wakeup for visibility?
Err.. the same thing as we use. There's no "visibility" behaviour in
J3D. The only way you can tell visibility is that the viewplatform is
near you (the behaviour) and the fact that J3D does not trigger a
behaviour unless it is visible to you (ie it's location according to the
scene graph is near you and you are within its activation bounds).
--
Justin Couch http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler http://www.yumetech.com/
Author, Java 3D FAQ Maintainer http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
- Greg Bear, Slant
-------------------------------------------------------------------
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".