Pioneer
src
Planet.h
Go to the documentation of this file.
1
// Copyright © 2008-2021 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
"
9
#include "
graphics/VertexArray.h
"
10
11
namespace
Graphics
{
12
class
Renderer;
13
class
RenderState;
14
class
Texture;
15
class
Material;
16
}
// namespace Graphics
17
18
class
Planet
:
public
TerrainBody
{
19
public
:
20
OBJDEF
(
Planet
,
TerrainBody
,
PLANET
);
21
Planet
() =
delete
;
22
Planet
(
SystemBody
*);
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
32
protected
:
33
private
:
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;
40
RefCountedPtr<Graphics::Texture>
m_ringTexture;
41
Graphics::VertexArray
m_ringVertices;
42
std::unique_ptr<Graphics::Material> m_ringMaterial;
43
Graphics::RenderState
*m_ringState;
44
45
// Legacy renderer visuals
46
std::unique_ptr<Graphics::VertexArray> m_atmosphereVertices;
47
std::unique_ptr<Graphics::Material> m_atmosphereMaterial;
48
};
49
50
#endif
/* _PLANET_H */
ObjectType::PLANET
@ PLANET
Json
nlohmann::json Json
Definition:
Json.h:8
SmartPtr.h
TerrainBody.h
VertexArray.h
Graphics::RenderState
Definition:
RenderState.h:25
Graphics::Renderer
Definition:
Renderer.h:39
Graphics::VertexArray
Definition:
VertexArray.h:19
ObjectViewerView
Definition:
ObjectViewerView.h:15
Planet
Definition:
Planet.h:18
Planet::GetAtmosphereRadius
double GetAtmosphereRadius() const
Definition:
Planet.h:28
Planet::OBJDEF
OBJDEF(Planet, TerrainBody, PLANET)
Planet::SubRender
virtual void SubRender(Graphics::Renderer *r, const matrix4x4d &viewTran, const vector3d &camPos) override
Definition:
Planet.cpp:263
Planet::GetAtmosphericState
void GetAtmosphericState(double dist, double *outPressure, double *outDensity) const
Definition:
Planet.cpp:98
Planet::Planet
Planet()=delete
RefCountedPtr< Graphics::Texture >
Space
Definition:
Space.h:19
SystemBody
Definition:
SystemBody.h:19
TerrainBody
Definition:
TerrainBody.h:21
matrix4x4< double >
vector3< double >
Graphics
Definition:
Background.h:13
Generated by
1.9.1