API Question Draw 3d or 2d shapes directly into orbiter window

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
Hi,

I am wondering how it is possible to draw 2d shapes or 3d shapes like boxes or spheres directly into the Orbiter window. I have seen some addons draw at least 2D lines directly on the Orbiter screen. How do they manage to do it ?

Thanks
 
Best methods are to either add meshes to the sim and have it draw them, or draw onto the HUD using clbkDrawHUD and Sketchpad methods. Other techniques have been shown to have poor results, either in terms of quality or framerates, IIRC.
 
Additionally with Orbiter 2010-P1 you can draw textures and render them to the HUD with clbkRenderHUD.
 
ok thanks guys. I wanted to make a system where animations can be setup easily. So for example if I want to setup a rotation animation for a vessel then a user can orient the axis using the mouse and choose the mesh group. Then this animation is added to the vessel at runtime and the animation can be played back in orbiter itself while the code can be written out to a file for future use.

I ll add a thin line mesh to the vessel and see if it can be done. I guess mouse selection and drag can be obtained by calculating a ray from the user clicked point to the object(o something similar I guess).

While we are on the topic, I have a question regarding mesh deformation of a vessel at runtime. I noticed API calls that expose the vertices of a vessel's mesh to user code. So can triangles of a vessel's mesh be changed at runtime. I think orulex does something similar to change the terrain in real time.
 
Back
Top