Commit 484e4270 authored by Jan Möbius's avatar Jan Möbius

Extra cc file for the skydome type

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@16407 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3526200b
......@@ -242,9 +242,12 @@ getRenderObjects(ACG::IRenderer* _renderer, ACG::GLState& _state , const ACG::S
QString filename = dome_.textureFileName();
// Fallback image
if ( !info.exists() )
if ( !info.exists() ) {
std::cerr << "Did not find image!" << filename.toStdString() << std::endl;
filename = OpenFlipper::Options::iconDirStr() + QDir::separator() + "EmptySkyDome.png";
}
// Test: Load texture image
QImage texture(filename);
......
......@@ -162,7 +162,11 @@ void SkyDomeObject::setName( QString _name ) {
// ===============================================================================
void SkyDomeObject::update(UpdateType _type) {
skyDomeNode_->update();
// Only the texture update is relevant. The other updates
// Are uniforms which are required on each draw anyway
if (_type.contains(UPDATE_TEXTURE) )
skyDomeNode_->update();
}
// ===============================================================================
......@@ -191,7 +195,10 @@ QString SkyDomeObject::getObjectinfo() {
if ( dataType( DATA_SKYDOME ) )
output += "Object Contains SkyDome : ";
output += " Horizontal FOV: ( " + QString::number(skyDome_.horizontalFOV()) + ")";
output += " Horizontal FOV: " + QString::number(skyDome_.horizontalFOV());
output += " Vertical FOV: " + QString::number(skyDome_.verticalFOV());
output += " Top Cutoff : " + QString::number(skyDome_.topOffset());
output += " Image File : " + skyDome_.textureFileName();
output += "========================================================================\n";
return output;
......
......@@ -48,7 +48,7 @@
//=============================================================================
/**
* \file SkyDomeType.c
* \file SkyDomeType.cc
* This File contains the implementation for SkyDome
*/
......@@ -57,6 +57,8 @@
#include "SkyDomeType.hh"
#include <iostream>
//== SkyDome Implementation ===============================================
......@@ -74,11 +76,11 @@ QString SkyDome::textureFileName() {
return textureFileName_;
}
void SkyDome::setTextureFileName(QString _textureFileName) {
void SkyDome::setTextureFileName(const QString& _textureFileName) {
textureFileName_ = _textureFileName;
}
void SkyDome::setHorizontalFOV( float _value) {
void SkyDome::setHorizontalFOV( const float& _value) {
horizontalFOV_ = _value;
}
......@@ -86,7 +88,7 @@ float SkyDome::horizontalFOV() {
return horizontalFOV_;
}
void SkyDome::setVerticalFOV( float _value) {
void SkyDome::setVerticalFOV( const float& _value) {
verticalFOV_ = _value;
}
......@@ -94,7 +96,7 @@ float SkyDome::verticalFOV() {
return verticalFOV_;
}
void SkyDome::setTopOffset( float _value) {
void SkyDome::setTopOffset( const float& _value) {
topOffset_ = _value;
}
......
......@@ -70,19 +70,20 @@ public:
SkyDome();
/// Defines the texture that will be used
QString textureFileName();
void setTextureFileName(const QString& _textureFileName);
void setTextureFileName(QString _textureFileName);
/// Returns the texture that will be used
QString textureFileName();
void setHorizontalFOV( float _value);
void setHorizontalFOV( const float& _value);
float horizontalFOV();
void setVerticalFOV( float _value);
void setVerticalFOV( const float& _value);
float verticalFOV();
void setTopOffset( float _value);
void setTopOffset( const float& _value);
float topOffset();
......@@ -99,7 +100,6 @@ private:
QString textureFileName_;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment