[Celestia-developers] Changes to Lua
Real-time 3D visualization of space
Status: Beta
Brought to you by:
cjlaurel
From: Harald S. <har...@us...> - 2003-09-27 23:36:33
|
Hi, I played around with the lua-interface in celestia/celx.cpp, and added some functionality. My local changes are: - new type vector (wrapper for Vec3d) with: - getx(), gety(), getz() - new type rotation (wrapper for Quatd) - changes to position: - getx(), gety(), getz() - vector position:vectorto(position) - position position:addvector(vector) - changes to frame: - to and from accept either position or rotation - time is now second argument and optional (defaults to appCore->getSimulation->getTime()) - changes to celestia: - flash() now accepts seconds arg time - vector celestia:newvector(x,y,z) - rotation celestia:newrotation(vector, angle) - Bugfix for newframe(string, target) - changes to observer: - observer:setposition(position) - observer:setorientation(rotation) - observer:rotate(rotation) - observer:lookat(position from, position to, vector up) - observer:gotolocation(position) (recommended in TODO for goto) - frame observer:getframe() - observer:setframe(frame) I tried to pick up the traces in the code of what was planned anyway and avoid changes to existing code. If there are no objections, I would like to integrate my code into the official codebase and possibly add further changes (any suggestions?) and create some example-scripts. All changes would be in celx.cpp, except for a small bugfix in celestiacore.cpp (celxScript can become NULL during call to celxScript->resume in CelestiaCore::resumeScript, just after checking that it is *not* NULL). Harald |