Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 > Feature
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

SetAttachmentParams () for meshes and mesh groups Issue Tools
issueid=774 05-08-2011 01:40 PM
Crazy about real time sims
SetAttachmentParams () for meshes and mesh groups
SetAttachmentParams() for meshes and mesh groups

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!
Issue Details
Issue Type Feature
Project ORBITER: 2010-P1
Status Request
Priority 5 - Medium
Suggested Version 100830 (2010-P1)
Implemented Version (none)
Votes for this feature 3
Votes against this feature 0
Assigned Users (none)
Tags (none)

05-14-2011 12:18 PM
Crazy about real time sims
 
Hi,


Please, is the above possible to do ? It would really help with positioning meshes.
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 12:05 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2012, Orbiter-Forum.com. All rights reserved.