[Plib-users] R: ball and stick script
Brought to you by:
sjbaker
From: Paolo L. <p.l...@ci...> - 2007-10-29 08:09:39
|
> -----Messaggio originale----- > Da: pli...@li... > [mailto:pli...@li...] Per conto > di naruto canada > Inviato: sabato 27 ottobre 2007 9.33 > A: pli...@li... > Oggetto: [Plib-users] ball and stick script > > hi > > Can someone help me with scripting this task? > I just need to automate importing points (balls) and lines > (sticks) from flat text file, Appearance is not important so > long as balls are "thicker" than sticks. > One color for balls and another for sticks is enough. If you are a C++ programmer you could write a simple interpreter for your text file which translates ball & stick directives into ssgShapes calls. E.g. when the interpreter finds a ball directive it should create a ssgaSphere and add it to the scene graph, and ssgaCylinder for sticks instead (less than 20-lines code I think). Unfortunately none of the 3D format loaders of the Plib/SSG support high-level (sphere, cylinder, etc.) primitive generation. > I simply need camera to coincide with a light source. > > I would be even more convenient if I can script moving camera > with keys or mouse movement. Plib offers a sample demo viewer in source code you could customize for your app. > Thanks Greetings - Paolo Leoncini |