Hi, people! I wonder if someone can give me some insight in this:
I am programming a network visualizing sketch, with some elastic and inverse square forces between nodes. I am using verlet integration for the physics. I had a generic class for physical objects, lets call it PhysObj, and I extended it with a class called VerletObject (verlet objects have a different integration method and an additional variable for position), but also, i extended a PhysObj with a class called Node. The Node class is needed because each node in the network has a name, and some other attributes. So, my question is, can an PhysObj be at the same time a Node and a VerletObject?
I guess if I want to do that i should rather extend a VerletObject with a Node class (or the opposite), but that doesn't seem a clean choice. Perhaps my mistake is conceptual, and I should not try to make a Node a PhysObj, because a node is not a physical object. Then, i could work with an ArrayList of VerletObjects, which co-exists with an ArrayList of Nodes.
Any clues on this?
1