Overte C++ Documentation
ProceduralSkybox.h
1 //
2 // ProceduralSkybox.h
3 // libraries/procedural/src/procedural
4 //
5 // Created by Sam Gateau on 9/21/15.
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #pragma once
13 #ifndef hifi_ProceduralSkybox_h
14 #define hifi_ProceduralSkybox_h
15 
16 #include <graphics/Skybox.h>
17 
18 #include "Procedural.h"
19 
20 class ProceduralSkybox: public graphics::Skybox {
21 public:
22  ProceduralSkybox(uint64_t created = 0);
23 
24  void parse(const QString& userData) { _procedural.setProceduralData(ProceduralData::parse(userData)); }
25 
26  bool empty() override;
27  void clear() override;
28 
29  void render(gpu::Batch& batch, const ViewFrustum& frustum, bool forward) const override;
30  static void render(gpu::Batch& batch, const ViewFrustum& frustum, const ProceduralSkybox& skybox, bool forward);
31 
32  uint64_t getCreated() const { return _created; }
33 
34 protected:
35  mutable Procedural _procedural;
36  uint64_t _created;
37 };
38 typedef std::shared_ptr< ProceduralSkybox > ProceduralSkyboxPointer;
39 
40 #endif