From b1fb05e5438f6134cd1071af8b1219a0e5b7af30 Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Tue, 5 May 2015 12:04:30 -0700 Subject: [PATCH] merge --- libraries/model/src/model/Skybox.cpp | 21 +++++++++++++++ libraries/model/src/model/Skybox.h | 40 ++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100755 libraries/model/src/model/Skybox.cpp create mode 100755 libraries/model/src/model/Skybox.h diff --git a/libraries/model/src/model/Skybox.cpp b/libraries/model/src/model/Skybox.cpp new file mode 100755 index 0000000000..9a1addc9c7 --- /dev/null +++ b/libraries/model/src/model/Skybox.cpp @@ -0,0 +1,21 @@ +// +// Skybox.cpp +// libraries/model/src/model +// +// Created by Sam Gateau on 5/4/2015. +// Copyright 2015 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#include "Skybox.h" + +using namespace model; + +Skybox::Skybox() { +} + +void Skybox::setCubemap(const gpu::TexturePointer& cubemap) { + _cubemap = cubemap; +} + diff --git a/libraries/model/src/model/Skybox.h b/libraries/model/src/model/Skybox.h new file mode 100755 index 0000000000..8a04265129 --- /dev/null +++ b/libraries/model/src/model/Skybox.h @@ -0,0 +1,40 @@ +// +// Skybox.h +// libraries/model/src/model +// +// Created by Sam Gateau on 5/4/2015. +// Copyright 2015 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#ifndef hifi_model_Skybox_h +#define hifi_model_Skybox_h + +#include "gpu/Texture.h" + +namespace model { + +typedef glm::vec3 Color; + +class Skybox { +public: + Skybox(); + Skybox& operator= (const Skybox& skybox); + virtual ~Skybox() {}; + + void setColor(const Color& color); + const Color& getColor() { return _color; } + + void setCubemap(const gpu::TexturePointer& cubemap); + const gpu::TexturePointer& getCubemap() const { return _cubemap; } + +protected: + gpu::TexturePointer _cubemap; + Color _color; +}; +typedef std::shared_ptr< Skybox > SkyboxPointer; + +}; + +#endif //hifi_model_Skybox_h