I am currently making a graph-like structure in 3D with Ogre 1.8.1. My goal is to select edges of my graph.
My graph basically contains two std::vectors of Vertices and Edges (both separate Classes), each having a distinct Ogre::Entity accompanied with an ID.
Now I raycast with my mouse and get one correct result. But what is a good way to get back to the associated Edge class of my Graph?
The tutorials only manipulated the SceneNode, which is easy because I can directly get the SceneNode from the QueryResult, but I want to change the status of my Edge now.
a) I could use the QueryResult to compare each Entity in the Graph with that Entity to find the associated class.
b) I could use string manipulation of
Code: Select all
query_result[closestIndex].movable->getName()
Both ways seem unnecessary complex. What am I missing?