mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 02:48:25 -05:00
Merge branch 'timeadjustments' into NewHorizonsMerge
Conflicts: CMakeLists.txt include/openspace/rendering/model/modelgeometry.h include/openspace/rendering/model/wavefrontgeometry.h include/openspace/rendering/planets/renderableplanetprojection.h include/openspace/util/imagesequencer.h scripts/default_startup.lua src/abuffer/abuffer.cpp src/rendering/model/renderablemodel.cpp src/rendering/model/wavefrontgeometry.cpp src/rendering/planets/renderableplanet.cpp src/rendering/planets/renderableplanetprojection.cpp src/rendering/renderablefov.cpp src/rendering/renderabletrail.cpp src/rendering/renderengine.cpp src/scene/scene.cpp src/scene/spiceephemeris.cpp src/util/imagesequencer.cpp
This commit is contained in:
@@ -43,6 +43,7 @@ public:
|
||||
virtual void deinitialize();
|
||||
void render();
|
||||
virtual bool loadModel(const std::string& filename) = 0;
|
||||
void changeRenderMode(const GLenum mode);
|
||||
|
||||
protected:
|
||||
RenderableModel* _parent;
|
||||
@@ -59,6 +60,7 @@ protected:
|
||||
GLuint _vaoID;
|
||||
GLuint _vbo;
|
||||
GLuint _ibo;
|
||||
GLenum _mode;
|
||||
|
||||
std::vector<Vertex> _vertices;
|
||||
std::vector<int> _indices;
|
||||
|
||||
@@ -57,6 +57,8 @@ protected:
|
||||
|
||||
private:
|
||||
properties::StringProperty _colorTexturePath;
|
||||
properties::BoolProperty _performFade;
|
||||
properties::FloatProperty _fading;
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
ghoul::opengl::Texture* _texture;
|
||||
|
||||
|
||||
@@ -28,7 +28,13 @@
|
||||
|
||||
// open space includes
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/util/imagesequencer.h>
|
||||
#include <openspace/util/imagesequencer2.h>
|
||||
|
||||
#include <openspace/util/sequenceparser.h>
|
||||
#include <openspace/util/hongkangparser.h>
|
||||
#include <openspace/util/labelparser.h>
|
||||
#include <openspace/util/decoder.h>
|
||||
|
||||
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/properties/triggerproperty.h>
|
||||
@@ -71,15 +77,18 @@ protected:
|
||||
private:
|
||||
void imageProjectGPU();
|
||||
|
||||
std::map<std::string, Decoder*> _fileTranslation;
|
||||
|
||||
properties::StringProperty _colorTexturePath;
|
||||
properties::StringProperty _projectionTexturePath;
|
||||
properties::TriggerProperty _imageTrigger;
|
||||
properties::IntProperty _rotation;
|
||||
properties::FloatProperty _fadeProjection;
|
||||
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
ghoul::opengl::ProgramObject* _fboProgramObject;
|
||||
|
||||
ghoul::opengl::Texture* _texture;
|
||||
ghoul::opengl::Texture* _textureOriginal;
|
||||
ghoul::opengl::Texture* _textureProj;
|
||||
planetgeometryprojection::PlanetGeometryProjection* _geometry;
|
||||
|
||||
@@ -88,12 +97,19 @@ private:
|
||||
glm::mat4 _transform;
|
||||
glm::mat4 _projectorMatrix;
|
||||
|
||||
//sequenceloading
|
||||
std::string _sequenceSource;
|
||||
std::string _sequenceType;
|
||||
bool _foundSequence;
|
||||
|
||||
// spice
|
||||
std::string _instrumentID;
|
||||
std::string _projectorID;
|
||||
std::string _projecteeID;
|
||||
std::string _aberration;
|
||||
std::vector<std::string> _potentialTargets; // @TODO copy-n-paste from renderablefov
|
||||
|
||||
|
||||
float _fovy;
|
||||
float _aspectRatio;
|
||||
float _nearPlane;
|
||||
@@ -103,9 +119,14 @@ private:
|
||||
glm::dmat3 _instrumentMatrix;
|
||||
glm::vec3 _boresight;
|
||||
|
||||
double _time[2];
|
||||
double _time;
|
||||
double _previousTime;
|
||||
double _previousCapture;
|
||||
double lightTime;
|
||||
|
||||
std::vector<Image> _imageTimes;
|
||||
int _sequenceID;
|
||||
|
||||
std::string _target;
|
||||
std::string _frame;
|
||||
std::string _defaultProjImage;
|
||||
@@ -117,6 +138,8 @@ private:
|
||||
GLuint _fboID;
|
||||
GLuint _quad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
|
||||
bool _once; //fml
|
||||
};
|
||||
} // namespace openspace
|
||||
|
||||
|
||||
@@ -76,9 +76,9 @@ public:
|
||||
int _nrInserted = 0;
|
||||
int _isteps;
|
||||
bool _rebuild = false;
|
||||
bool _interceptTag[5];
|
||||
bool _interceptTag[9];
|
||||
bool _withinFOV;
|
||||
psc _projectionBounds[4];
|
||||
psc _projectionBounds[8];
|
||||
psc _interceptVector;
|
||||
|
||||
// spice
|
||||
@@ -124,59 +124,3 @@ public:
|
||||
};
|
||||
}
|
||||
#endif
|
||||
// Scrap stuff i need to keep for now (michal)
|
||||
|
||||
|
||||
/* // idk how we will compute the aberrated state.
|
||||
double RenderableFov::computeTargetLocalTime(PowerScaledScalar d){
|
||||
double c = 299792456.075; // m/s
|
||||
double dt = ( (d[0]*pow(10, d[1])) / c );
|
||||
double t_local = _time - dt*86400;
|
||||
|
||||
std::string localTime;
|
||||
std::string currentTime;
|
||||
|
||||
openspace::SpiceManager::ref().getDateFromET(t_local, localTime);
|
||||
openspace::SpiceManager::ref().getDateFromET(_time , currentTime);
|
||||
|
||||
std::cout << "time at jupiter : " << localTime << "\time at NH" << currentTime << std::endl;
|
||||
return t_local;
|
||||
}*/
|
||||
|
||||
/*
|
||||
psc RenderableFov::sphericalInterpolate(glm::dvec3 p0, glm::dvec3 p1, float t){
|
||||
double targetEt, lt;
|
||||
glm::dvec3 ip, iv;
|
||||
psc targetPos;
|
||||
SpiceManager::ref().getTargetPosition("JUPITER", _spacecraft, _frame, _aberrationCorrection, _time, targetPos, lt);
|
||||
|
||||
openspace::SpiceManager::ref().getSurfaceIntercept(_fovTarget, _spacecraft, _instrumentID,
|
||||
_frame, _method, _aberrationCorrection, _time, targetEt, p0, ip, iv);
|
||||
psc psc0 = PowerScaledCoordinate::CreatePowerScaledCoordinate(iv[0], iv[1], iv[2]);
|
||||
openspace::SpiceManager::ref().getSurfaceIntercept(_fovTarget, _spacecraft, _instrumentID,
|
||||
_frame, _method, _aberrationCorrection, _time, targetEt, p1, ip, iv);
|
||||
psc psc1 = PowerScaledCoordinate::CreatePowerScaledCoordinate(iv[0], iv[1], iv[2]);
|
||||
psc0[3] += 3;
|
||||
psc1[3] += 3;
|
||||
|
||||
psc0 -= targetPos;
|
||||
psc1 -= targetPos;
|
||||
|
||||
double angle = psc0.angle(psc1);
|
||||
|
||||
std::cout << angle << std::endl;
|
||||
|
||||
double sin_a = sin(angle); // opt
|
||||
double l[2] = { sin((1.f - t)*angle) / sin_a, sin((t)*angle) / sin_a };
|
||||
|
||||
std::cout << l[0] << " " << l[1] << std::endl;
|
||||
|
||||
float s = ((t-1)*psc0[3] + (t)*psc1[3]);
|
||||
float x = (l[0]*psc0[0] + l[1]*psc1[0]);
|
||||
float y = (l[0]*psc0[1] + l[1]*psc1[1]);
|
||||
float z = (l[0]*psc0[2] + l[1]*psc1[2]);
|
||||
|
||||
psc interpolated = PowerScaledCoordinate::PowerScaledCoordinate(x, y, z, 10);
|
||||
return interpolated;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <openspace/rendering/renderable.h>
|
||||
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/util/imagesequencer2.h>
|
||||
#include <openspace/properties/vectorproperty.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
@@ -67,7 +68,8 @@ namespace openspace {
|
||||
|
||||
private:
|
||||
void loadTexture();
|
||||
void updatePlane(double time, std::string newPath);
|
||||
void updatePlane(const Image* img, double currentTime);
|
||||
std::string findClosestTarget(double currentTime);
|
||||
void setTarget(std::string body);
|
||||
|
||||
std::string _texturePath;
|
||||
|
||||
@@ -86,6 +86,8 @@ private:
|
||||
|
||||
float _increment;
|
||||
float _oldTime = 0;
|
||||
float _time;
|
||||
float _distanceFade;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user