I have currently created a python class containing som geometry, plus some other functionality.
To render the geometry I use myObject.model.reparentTo(render), which works well for the time being.
The problem is that I want to randomly generate some geometry by generating objects of my class, which means I will lose the references to the objects.
I can find the geometry trough the collisions, but not the object and the needed functionality.
I’m thinking of making my class a subclass of a PandaNode, so that I can just write myObject.reparentTo(render), and get a nodepath to my object by finding the geometries parent from a collision.
What class should I inherit from? (I’m a bit confused about what classes are python, and what is C++, and kind of a newbie to python…)
Will I have to do something more to get a reference to a object of my class, once I have the nodepath? If I just get some kind of PandaNode, it doesn’t help unless I can cast it to my class…