I thought I could store info about my object (a ship in this case) in with the geometry in the scene graph.
I basically did:
public class Ship extends Cone {
public TransformGroup tg = null;
// more code
}
When I pick the shape using a mouse behavior (WakeupOnAWTEvent) and do a node instanceof Ship, it returns false. It is a Shape3D, but it doesn’t associate with Ship, and a cast throws a ClassCastException.
I’m assuming that the scenegraph only retains the geometry info? (I’m obviously doing something wrong!) Should this work? Or is there a better way to associate state info with the scene graph objects?