mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
changing renderabletrail class to work for planetocentric
This commit is contained in:
@@ -58,6 +58,7 @@ public:
|
||||
std::string _target;
|
||||
std::string _observer;
|
||||
std::string _frame;
|
||||
std::string _orbitVariety;
|
||||
// color
|
||||
glm::vec3 _c;
|
||||
double _r, _g, _b;
|
||||
|
||||
Submodule openspace-data updated: 26b896ed47...588e958d81
@@ -3,6 +3,6 @@ openspace.time.setTime("2007-02-26T17:00:00")
|
||||
--openspace.time.setTime("2006-08-22T20:00:00")
|
||||
|
||||
--openspace.time.setDeltaTime(200000.0)
|
||||
openspace.time.setDeltaTime(200000.0)
|
||||
openspace.time.setDeltaTime(20000.0)
|
||||
--openspace.time.setDeltaTime(30000.0)
|
||||
-- print(openspace.time.currentTimeUTC())
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace {
|
||||
const std::string keyBody = "Body";
|
||||
const std::string keyObserver = "Observer";
|
||||
const std::string keyFrame = "Frame";
|
||||
const std::string keyOrbitVariety = "OrbitVariety";
|
||||
const std::string keyPathModule = "ModulePath";
|
||||
const std::string keyColor = "RGB";
|
||||
const std::string keyTropicalOrbitPeriod = "TropicalOrbitPeriod";
|
||||
@@ -65,6 +66,12 @@ namespace openspace{
|
||||
assert(dictionary.getValue(keyDayLength , _day));//not used now, will be though.
|
||||
// values in modfiles set from here
|
||||
// http://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html
|
||||
|
||||
if (!dictionary.getValue(keyOrbitVariety, _orbitVariety)){
|
||||
_orbitVariety = "heliocentric";
|
||||
}
|
||||
if (_target == "IO")
|
||||
std::cout << _target << " has orbit variety : " << _orbitVariety << std::endl;
|
||||
|
||||
//white is default col
|
||||
if (!dictionary.getValue(keyColor, _c)){
|
||||
@@ -230,17 +237,17 @@ void RenderableTrail::render(const RenderData& data){
|
||||
|
||||
|
||||
updateTrail();
|
||||
|
||||
/*
|
||||
glBindVertexArray(_vaoID);
|
||||
glDrawArrays(_mode, 0, _vtotal);
|
||||
glBindVertexArray(0);
|
||||
/*
|
||||
*/
|
||||
glPointSize(2.f);
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
glDrawArrays(GL_POINTS, 0, _vtotal);
|
||||
glBindVertexArray(0);
|
||||
*/
|
||||
|
||||
_programObject->deactivate();
|
||||
}
|
||||
|
||||
@@ -249,7 +256,7 @@ void RenderableTrail::update(const UpdateData& data){
|
||||
_time = data.time;
|
||||
_delta = data.delta;
|
||||
|
||||
SpiceManager::ref().getTargetState(_target, _observer, _frame, "NONE", data.time+_increment, _pscpos, _pscvel, lightTime);
|
||||
SpiceManager::ref().getTargetState(_target, _observer, _frame, "NONE", data.time + _increment, _pscpos, _pscvel, lightTime);
|
||||
}
|
||||
|
||||
void RenderableTrail::loadTexture()
|
||||
|
||||
Reference in New Issue
Block a user