overte/interface/src/Stars.cpp
tosh 38d229ab67 reiterates starfield:
o allows UrlReader to cache the downloaded content in a local (updating it
    automatically when the server indicates a newer time stamp)

  o retires the FieldOfView class

  o makes the stars move again

  o fixes bad deletion in UrlReader (delete instead of delete[])

  o allows UrlReader to advertise supported compression algorithms to the server
2013-04-18 00:13:41 +02:00

42 lines
993 B
C++

//
// Stars.cpp
// interface
//
// Created by Tobias Schwinger on 3/22/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
//
#include "InterfaceConfig.h"
#include "Stars.h"
#define __interface__Starfield_impl__
#include "starfield/Controller.h"
#undef __interface__Starfield_impl__
Stars::Stars() :
_ptrController(0l) {
_ptrController = new starfield::Controller;
}
Stars::~Stars() {
delete _ptrController;
}
bool Stars::readInput(const char* url, const char* cacheFile, unsigned limit) {
return _ptrController->readInput(url, cacheFile, limit);
}
bool Stars::setResolution(unsigned k) {
return _ptrController->setResolution(k);
}
float Stars::changeLOD(float fraction, float overalloc, float realloc) {
return float(_ptrController->changeLOD(fraction, overalloc, realloc));
}
void Stars::render(float fovDiagonal, float aspect, glm::mat4 const& view) {
_ptrController->render(fovDiagonal, aspect, glm::affineInverse(view));
}