Thanks Julio! Yes, I am tackling easy stuff first so that at least it doesn't show as "red" an all of my files, and is out of the way. Of course, architecture stuff will be a bit more involved.
Architecturally, my spaceflight module is very simple - there are no complicated hierarchies, assemblies or other things that Newton is capable of. It is basically a collection of Newton bodies, linked by simple "hard" joints, and in some cases, hinges, ball and joint, motorized, and a few other ones. The structure is similar to DemoSandBox 3.14, where I have a "TBEntity":
- Code: Select all
class TBEntity : public dHierarchy<TBEntity>, virtual public dClassInfo
which contains NewtonBody object (I think this slightly differs from DemoSandBox, where it is the other way round, NewtonBody contained DemoEntity through userdata member), and a LOT of other members needed to represent a part of a spacecraft (properties like propulsion, aerodynamics, etc.). I use these properties to calculate forces on the body and apply them - that is pretty much it.
These "TBEntity" objects are then organized in the TBEntityManager container:
- Code: Select all
class TBEntityManager : public ndList <TBEntity*>
which contains ndWorld* m_world; member, and where I also have member functions for operations on the TBEntities list, like adding, deleting, swapping order, etc, plus, a lot of Newton option switches (like Solver Passes, Solver Substeps, etc.). This is also basically closely modelled after the way things were organized in DemoSandBox 3.14.
I know the structure has changed from 3.14 to 4.00, and I will go through the demo projects to see how they are organized, but I am hoping that my setup is fairly straightforward and I won't have to drastically restructure everything.
Any pointers or advice based on what I described above would be very welcome!