Hello,
I have a picking class which
allows me to pick LightWave3D objects
inside of my universe. I am having trouble
creating code to return the object's current
x,y,z position inside of the universe. I would
like to post it to a textframe, which I know how
to do, if I can get the code to return the coords.
Here are pieces of the pick class.
Thanks,
Kyle Benedict
[EMAIL PROTECTED]
public class PickBehavior extends PickMouseBehavior
{
LWViewer shape;
private JTextPane Information;
public PickBehavior(Alpha alpha, Canvas3D canvas, BranchGroup root, Bounds
bounds, JTextPane InfoPane)
{
super(canvas, root, bounds);
this.setSchedulingBounds(bounds);
Information = InfoPane;
}
public void updateScene(int xpos, int ypos)
{
shape = (LWViewer) pickScene.pickNode(pickScene.pickClosest(xpos, ypos,
PickObject.USE_BOUNDS), PickObject.BRANCH_GROUP);
int x = ????????????????? this is the code i do not know. I need to
int y = ?????? get the x, y, and z coords so I can
display
int z = ???????? them. LWViewer is an loader I wrote
for lightwave objects.
if (shape != null)
{
processEvent(x, y, z);
}
}
}
===========================================================================
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".