I would like to request an addition to the API of a function like
void VESSEL::SetAttachmentParams ( ATTACHMENTHANDLE attachment,
const VECTOR3 & pos,
const VECTOR3 & dir,
const VECTOR3 & rot
)
for meshes and mesh groups of a vessel class
This is to position objects in the Orbiter world.I already know the positions from Bullet physics. Its very simple to get an openGL array and pass it to the above function whenever an object needs to be moved. However with animations I need to get the Euler angles and apply them in the right order. If I do not set up the animations correctly with rotations in proper order then I get weird positions which can be extremely time consuming to debug. Furthermore :
1. Currently to orient an object in 3D space I need to use 6 animations(3 translation and 3 for the euler angles). This is ok for small numbers of objects but for larger numbers such as the recent demo I made with 200 objects, there are 1200 animations which orbiter keeps track of. This slows it down.
2. If I were to delete a mesh, I would like to delete the animation as well and keeping track of the right animations to delete, even if I use arrays , leads to too much extra code just to ensure that the application does not crash.
3. The code for moving attachment points using :
const VECTOR3 & pos,
const VECTOR3 & dir,
const VECTOR3 & rot
vectors is already present in SetAttachmentParams () and making such an interface for meshes as well should require no code to be written from scratch. Attached vessels are meshes anyway.
4. Consider building something like a crane. Here the various parts of the crane will be various mesh groups or meshes in a vessel mesh. Now Bullet can give me the absolute position of the various parts with respect to the world origin. It also gives me the Euler angles with respect to the same. But then there is no method to convert these euler angles to those with respect to vessel co-ordinates. Without euler angles I cannot use animations. But I do know how to convert the pos, dir and rot vectors to vessel co-ordinates so a function like SetAttachmentParams() can be easily used to position the object part with respect to the vessel.
5. To cover both negative and positive ranges I have to initialize the animation midway so that both are covered in a single translation/rotation animation.
6. Simply positioning an object should not be so involved. A single function call should be all it takes. Easing this up would greatly help me in concentrating on the physics and making more value added

improvements to Orbiter rather than spending hours debugging animations and finding my way around Euler angles
Thanks!