Finding out more about my selected Geomatry

Following the Hello Picking tutorial I’ve implemented a little ray casting in my game and can now identify Geometries that I click on. However, these Geometries are just the representations of classes that I have made myself, and I would like to access the information in these class instances. However, I can’t find any simple way to find the class from its corresponding geometry.
What I could really use is some kind of pointer in the Geometry class that points to the instance however that doesn’t exist. The best idea I’ve had so far is making the name of the Geometry an ID that corresponds to an ID in the class instance, but then I’ll have to search through a list of instances to find the the matching ID and that seams rather crude. The fact that this is such a problem almost makes me think that my entire program is just structured incorrectly but let me see if I can get some more experience opinions.

You mean like you’ve subclassed Geometry and want to know if it’s your custom class?

No.
I have a class, called FillBlock, and one of its variables is a Geometry called locMark. I can see this Geometry when I run my program. Using ray casting, as described in the Hello Picking tutorial, I can click on it and have the Geometry returned to me. Now I would like to access other information inside the FillBlock which contains the Geometry I have just been returned; however, I have no way to knowing which FillBlock contains the Geometry.
This is all me testing and playing around, btw. FillBlock could be an enemy soldier, locMark his representation, and I could be trying to lower his health after shooting him, or something like that. This seemed like the most logical way to structure my program but I’m not sure if I missed something here.

It might be better to use a Control and add it to the Geometry. Then it is always right where you need it.

I hope I’m not rushing through this but could I see if I understand what I would do with a Control. I read over the page on controls and plan on looking into it more but I think I understand the basic idea.
While I’m not sure what I may try later down the line, right now all I want to do is place an object on top of a tile (the FillBlock and it’s locMark). So let me see if this would be a proper implementation, using a Control. I see my FillBlock’s Geometry and click it, I get the Geometry, I enable the Control attached to the Geometry (technically the Spacial), so it can begin updating. The Control, knowing the corresponding FillBlock, accesses the FillBlock to see if an object can be placed onto the tile. If so, the object is placed on top of the Geometry, otherwise, the object is not placed on top of the Geometry. The Control un-enables itself at the end of the update loop so that it doesn’t keep trying to place the object on top of the Geometry.

Or… you could just call a method on your own custom control. I’m not sure why you’d jump through all of the strange enable/disable/update hoops. Just add the control and it’s there when you want to call stuff on it.

I don’t know what a FillBlock is and why it has a Geometry. Maybe the FillBlock could be a control on the Geometry.

Or you could use user data instead of a control if you just need to find the link…