true 3d coordinates

Asked by Emmanuel

Is it possible to draw objects defined in true 3D space?
For instance I tried to draw a square defined with coordinates ±1,±1,0 in AltAz frame using StelRenderer::drawVertexBuffer() method, and it works, but when I scale the coordinates, the square keeps the same size.
I suspect this may be because vertices are internally normalized to lie on the unit sphere and thus scaling is a no-op.
Anyway, is there a way to draw objects defined in true 3D space, as we would with OpenGL, using StelRenderer or some other mechanism?

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Emmanuel
Solved:
Last query:
Last reply:
Revision history for this message
gzotti (georg-zotti) said :
#1

Hi!

We are still working on finishing a plugin for OBJ formatted foreground models. Unfortunately the big code change last summer came at the worst possible moment, and other events prevented a complete integration so far. If you are on NVidia, this may work for you: http://astrosim.univie.ac.at/. Go to results/software development to find a link.
If you are good with OpenGL/Qt, you may also want to help with the code update? PM me for details.
G.

Revision history for this message
Emmanuel (hacker-emmanuel) said :
#2

Thanks for your answer.
This pretty much answers my question: there is no true 3d capability in the stellarium API but a trick is possible (nice trick by the way).
Is the code of your plugin available anywhere by any chance?
Not that I plan to help with or use the code in the near future but it would be nice to at least try it.
I too had to cope with the recent API change between 0.11 and 0.12 in some plugin of mine.
I did it the lazy way by replacing the classes and methods that disappeared between 0.11 and 0.12 with adapter classes of the same name so that the client code need no immediate change. Perhaps you could do something like that for a quick fix?