Merge branch '67p' into develop

This commit is contained in:
antar420
2015-03-10 13:33:46 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ private:
std::string _source;
std::string _destination;
std::string _target;
psc _sunPosition;

View File

@@ -45,6 +45,7 @@ namespace {
const std::string _loggerCat = "RenderableModel";
const std::string keySource = "Rotation.Source";
const std::string keyDestination = "Rotation.Destination";
const std::string keyBody = "Body";
}
namespace openspace {
@@ -85,8 +86,10 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
dictionary.getValue(keySource, _source);
dictionary.getValue(keyDestination, _destination);
dictionary.getValue(keyBody, _target);
setBoundingSphere(pss(1.f, 9.f));
addProperty(_performShading);
}
bool RenderableModel::isReady() const {
@@ -144,7 +147,7 @@ void RenderableModel::render(const RenderData& data) {
_programObject->setUniform("ModelTransform", transform);
setPscUniforms(_programObject, &data.camera, data.position);
_programObject->setUniform("_performShading", true);
_programObject->setUniform("_performShading", _performShading);
// Bind texture
ghoul::opengl::TextureUnit unit;
@@ -164,7 +167,7 @@ void RenderableModel::update(const UpdateData& data) {
openspace::SpiceManager::ref().getPositionTransformMatrix(_source, _destination, data.time, _stateMatrix);
double lt;
openspace::SpiceManager::ref().getTargetPosition("SUN", _source, "GALACTIC", "NONE", data.time, _sunPosition, lt);
openspace::SpiceManager::ref().getTargetPosition("SUN", _target, "GALACTIC", "NONE", data.time, _sunPosition, lt);
}
void RenderableModel::loadTexture() {