This is my collision detector behavior class:
public void initialize()
{
wEnter = new WakeupOnCollisionEntry(tg);
wMove= new WakeupOnCollisionMovement(tg);
wExit = new WakeupOnCollisionExit(tg);
wakeupOn(wMove);
System.out.println("init");
}
Should I be getting the processStimulus event to run continuously if the
object of concern is already overlapped initially?
Thanks.
----- Original Message -----
From: "Kelvin Chung" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 10:20 AM
Subject: Re: [JAVA3D] Collision Detection in J3D 1.2.1 beta2
> Hi Siau,
>
> >
> >I was actually using a VRML loader to load my mesh.
> >Can I actually pass in TransformGroup to WakeupOnCollisionEntry( tg)?
>
> See,
> /**
> * Constructs a new WakeupOnCollisionEntry criterion.
> * @param armingNode the Group, Shape, or Morph node used to
> * <em>arm</em> collision detection
> * @exception IllegalArgumentException if object is under a
> * SharedGroup node or object is other than a Group, Shape3D,
> * Morph or BoundingLeaf node.
> */
> public WakeupOnCollisionEntry(Node armingNode)
>
> TransformGroup extends Group
> so it should work.
>
>
> >Do I have to enable any capabilities bits?
> >(e.g: ENABLE_COLLISION_REPORTING ,ALLOW_COLLIDABLE_READ....)
> >Thanks
> >
>
> see Node
>
> /**
> * Specifies that this Node will be reported in the collision
> * SceneGraphPath if a collision occurs. This capability is only
> * specifiable for Group nodes; it is ignored for leaf nodes.
> * The default for Group nodes is false. All interior nodes not
> * needed for uniqueness in a SceneGraphPath that don't have
> * ENABLE_COLLISION_REPORTING set to true will not be reported
> * in the SceneGraphPath.
> * @see SceneGraphPath
> */
> public static final int ENABLE_COLLISION_REPORTING
>
> /**
> * Specifies that this Node allows reading its collidability state.
> */
> public static final int ALLOW_COLLIDABLE_READ
>
>
> /**
> * Returns the collidable value; this value determines whether this
node
> * and it's children, if a group node, can be considered for collision
> * purposes; if it is set to false, then neither this node nor any
> * children nodes will be traversed for collision purposes; the
default
> * value is true. The collidable setting is the way that an
> * application can perform collision culling.
> * @return the present collidable value for this node
> */
> public boolean getCollidable()
>
> - Kelvin
>
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
===========================================================================
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".