Pioneer
Loading...
Searching...
No Matches
Planet.h
Go to the documentation of this file.
1// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#ifndef _PLANET_H
5#define _PLANET_H
6
7#include "SmartPtr.h"
8#include "TerrainBody.h"
10
11namespace Graphics {
12 class Renderer;
13 class Texture;
14 class Material;
15 class MeshObject;
16} // namespace Graphics
17
18class Planet : public TerrainBody {
19public:
21 Planet() = delete;
23 Planet(const Json &jsonObj, Space *space);
24
25 virtual void SubRender(Graphics::Renderer *r, const matrix4x4d &viewTran, const vector3d &camPos) override;
26
27 void GetAtmosphericState(double dist, double *outPressure, double *outDensity) const;
28 double GetAtmosphereRadius() const { return m_atmosphereRadius; }
29
30 friend class ObjectViewerView;
31
32protected:
33private:
34 void InitParams(const SystemBody *);
35 void GenerateRings(Graphics::Renderer *renderer);
36 void DrawGasGiantRings(Graphics::Renderer *r, const matrix4x4d &modelView);
37
38 double m_atmosphereRadius;
39 double m_surfaceGravity_g;
41 std::unique_ptr<Graphics::Material> m_ringMaterial;
42 std::unique_ptr<Graphics::MeshObject> m_ringMesh;
43};
44
45#endif /* _PLANET_H */
nlohmann::json Json
Definition Json.h:8
Definition Renderer.h:44
Definition ObjectViewerView.h:14
Definition Planet.h:18
double GetAtmosphereRadius() const
Definition Planet.h:28
OBJDEF(Planet, TerrainBody, PLANET)
virtual void SubRender(Graphics::Renderer *r, const matrix4x4d &viewTran, const vector3d &camPos) override
Definition Planet.cpp:265
void GetAtmosphericState(double dist, double *outPressure, double *outDensity) const
Definition Planet.cpp:97
Planet()=delete
Definition RefCounted.h:36
Definition Space.h:19
Definition SystemBody.h:19
Definition TerrainBody.h:21
Definition Background.h:14