Pioneer
Loading...
Searching...
No Matches
src
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
"
9
#include "
graphics/VertexArray.h
"
10
11
namespace
Graphics
{
12
class
Renderer;
13
class
Texture;
14
class
Material;
15
class
MeshObject;
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
std::unique_ptr<Graphics::Material> m_ringMaterial;
42
std::unique_ptr<Graphics::MeshObject> m_ringMesh;
43
};
44
45
#endif
/* _PLANET_H */
ObjectType::PLANET
@ PLANET
Json
nlohmann::json Json
Definition
Json.h:8
SmartPtr.h
TerrainBody.h
VertexArray.h
Graphics::Renderer
Definition
Renderer.h:44
ObjectViewerView
Definition
ObjectViewerView.h:14
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:265
Planet::GetAtmosphericState
void GetAtmosphericState(double dist, double *outPressure, double *outDensity) const
Definition
Planet.cpp:97
Planet::Planet
Planet()=delete
RefCountedPtr
Definition
RefCounted.h:36
Space
Definition
Space.h:19
SystemBody
Definition
SystemBody.h:19
TerrainBody
Definition
TerrainBody.h:21
matrix4x4< double >
vector3< double >
Graphics
Definition
Background.h:14
Generated by
1.9.7