Some more changes to the RenderableStars class

This commit is contained in:
Alexander Bock
2014-11-26 16:36:02 +01:00
parent b4f6070642
commit fc1dcfabc8
5 changed files with 55 additions and 65 deletions

View File

@@ -47,33 +47,40 @@ public:
void update(const UpdateData& data) override;
private:
class DataSource {
public:
const std::vector<float>& data() const;
//class DataSource {
//public:
// const std::vector<float>& data() const;
virtual bool loadData() = 0;
// virtual bool loadData() = 0;
protected:
std::vector<float> _data;
};
//protected:
// std::vector<float> _data;
//};
class SpeckDataSource : public DataSource {
public:
SpeckDataSource(const ghoul::Dictionary& dictionary);
//class SpeckDataSource : public DataSource {
//public:
// SpeckDataSource(const ghoul::Dictionary& dictionary);
bool loadData() override;
// bool loadData() override;
private:
bool readSpeckFile();
bool loadCachedFile(const std::string& file);
bool saveCachedFile(const std::string& file) const;
//private:
// bool readSpeckFile();
// bool loadCachedFile(const std::string& file);
// bool saveCachedFile(const std::string& file) const;
std::string _file;
};
// std::string _file;
//};
void loadTexture();
const std::vector<float>& data() const;
bool loadData();
bool readSpeckFile();
bool loadCachedFile(const std::string& file);
bool saveCachedFile(const std::string& file) const;
void generateBufferObjects(const void* data);
properties::StringProperty _colorTexturePath;
@@ -85,7 +92,7 @@ private:
std::string _speckPath;
DataSource* _source;
std::vector<float> _data;
//GLint vertsToDraw;

View File

@@ -88,13 +88,8 @@ namespace modelgeometry {
} // namespace modelgeometry
namespace renderablestars {
const std::string keyDataSource = "DataSource";
const std::string keyFile = "File";
const std::string keyTexture = "Texture";
namespace datasource {
const std::string keyType = "Type";
const std::string keyFile = "File";
} // namespace datasource
} // namespace renderablestars
namespace renderablevolumegl {