Sagewire Logo

Pick a Shape on MOUSE_ENTERED event

3 Message(s) by 3 Author(s) originally posted in 3d java


From: hoa123 Date:   Monday, November 27, 2006
I am using PickCanvas class in my application and it is correct to pick a
shape on MOUSE_PRESSED or MOUSE_CLICKED event in MyBehaviour object . Though I
could receive MOUSE_ENTERED or MOUSE_EXITED in MyBehaviour object, the
PickCanvas couldn't pick a shape (it always returns a null PickResult object
in this case).

My scene graph tree:
BG
|-> TG -> S
|-> TG -> S
|-> Behaviour

I am very appreciate if you could give me some advices. Thanks in advance.


From: cc Date:   Tuesday, November 28, 2006
Perhaps, some properties should be setted in your shape object .


From: sanbikinoraion Date:   Tuesday, November 28, 2006
I am using PickCanvas class in my application and it is correct to pick a
shape on MOUSE_PRESSED or MOUSE_CLICKED event in MyBehaviour object. Though I
could receive MOUSE_ENTERED or MOUSE_EXITED in MyBehaviour object, the
PickCanvas couldn't pick a shape (it always returns a null PickResult object
in this case).
My scene graph tree:
BG
|-> TG -> S
|-> TG -> S
|-> Behaviour



As another commenter says, ensure that you've set the shapes to be
pickable by setting the capabilities appropriately (something like
"shape.setCapability(ENABLE_PICK_REPORTING);").

Also, if you have written a custom picker, I suggest making sure that it
can pick something even in the most simple of circumstances (ie. knock
up a scene graph with a huge cube bigger than the viewport and set the
pick to run with x-y parameters 0 0, etc.



Next Message: Newbie Question: How do I get a surface to look different on itssides?


Blogs related to Pick a Shape on MOUSE_ENTERED event

a testing methodology and architecture for computer supported ...
our architecture was implemented in java as a working system called rebecca-j. the ... mouseentered fire if gui component generates a mouse_entered event ... draws several shapes. a timer trigger that fires once every sixty seconds is ...

import java.awt.*; import java.applet.applet; import java.awt ...
import java.awt.event.*; import java.awt.image.*; import java.net.*; import java.io.*; import java.util.*; import java.util.zip.*; ... public void mouseentered(mouseevent e) ... attempting to pick up (or the square to drop a piece off) ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional