2001-11-27 18:50:04 -07:00
|
|
|
// render.h
|
|
|
|
//
|
2008-04-03 11:46:45 -06:00
|
|
|
// Copyright (C) 2001-2008, Celestia Development Team
|
2007-12-17 18:54:17 -07:00
|
|
|
// Contact: Chris Laurel <claurel@gmail.com>
|
2001-11-27 18:50:04 -07:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
|
2007-12-17 18:54:17 -07:00
|
|
|
#ifndef _CELENGINE_RENDER_H_
|
|
|
|
#define _CELENGINE_RENDER_H_
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2009-10-27 16:02:01 -06:00
|
|
|
#include <Eigen/Core>
|
2007-11-10 18:58:05 -07:00
|
|
|
#include <celmath/frustum.h>
|
2002-01-07 15:48:32 -07:00
|
|
|
#include <celengine/universe.h>
|
2009-07-14 21:06:30 -06:00
|
|
|
#include <celengine/observer.h>
|
2001-11-27 18:50:04 -07:00
|
|
|
#include <celengine/selection.h>
|
2003-02-19 10:48:25 -07:00
|
|
|
#include <celengine/glcontext.h>
|
2004-09-19 21:27:50 -06:00
|
|
|
#include <celengine/starcolors.h>
|
2005-02-10 23:09:37 -07:00
|
|
|
#include <celengine/rendcontext.h>
|
2001-11-27 18:50:04 -07:00
|
|
|
#include <celtxf/texturefont.h>
|
2009-07-14 21:06:30 -06:00
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
|
2008-01-19 15:21:56 -07:00
|
|
|
class RendererWatcher;
|
2008-02-20 19:25:48 -07:00
|
|
|
class FrameTree;
|
2008-03-20 15:36:17 -06:00
|
|
|
class ReferenceMark;
|
2009-08-06 21:15:26 -06:00
|
|
|
class CurvePlot;
|
2008-01-19 15:21:56 -07:00
|
|
|
|
2007-12-17 18:54:17 -07:00
|
|
|
struct LightSource
|
|
|
|
{
|
2009-07-17 23:50:56 -06:00
|
|
|
Eigen::Vector3d position;
|
2007-12-17 18:54:17 -07:00
|
|
|
Color color;
|
|
|
|
float luminosity;
|
|
|
|
float radius;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-11-03 21:14:07 -07:00
|
|
|
struct RenderListEntry
|
|
|
|
{
|
2009-07-17 00:15:25 -06:00
|
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
|
|
|
|
2007-10-25 01:18:53 -06:00
|
|
|
enum RenderableType
|
|
|
|
{
|
|
|
|
RenderableStar,
|
|
|
|
RenderableBody,
|
|
|
|
RenderableCometTail,
|
2008-03-20 15:36:17 -06:00
|
|
|
RenderableReferenceMark,
|
|
|
|
};
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
const Star* star;
|
|
|
|
Body* body;
|
|
|
|
const ReferenceMark* refMark;
|
2007-10-25 01:18:53 -06:00
|
|
|
};
|
|
|
|
|
2009-07-17 00:15:25 -06:00
|
|
|
Eigen::Vector3f position;
|
|
|
|
Eigen::Vector3f sun;
|
2002-11-03 21:14:07 -07:00
|
|
|
float distance;
|
|
|
|
float radius;
|
2006-09-07 02:08:32 -06:00
|
|
|
float centerZ;
|
2002-11-03 21:14:07 -07:00
|
|
|
float nearZ;
|
|
|
|
float farZ;
|
|
|
|
float discSizeInPixels;
|
|
|
|
float appMag;
|
2007-10-25 01:18:53 -06:00
|
|
|
RenderableType renderableType;
|
2006-09-10 18:37:20 -06:00
|
|
|
bool isOpaque;
|
2008-04-03 11:46:45 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct SecondaryIlluminator
|
|
|
|
{
|
2009-07-17 23:50:56 -06:00
|
|
|
const Body* body;
|
|
|
|
Eigen::Vector3d position_v; // viewer relative position
|
|
|
|
float radius; // radius in km
|
|
|
|
float reflectedIrradiance; // albedo times total irradiance from direct sources
|
2002-11-03 21:14:07 -07:00
|
|
|
};
|
|
|
|
|
2004-10-19 11:52:43 -06:00
|
|
|
|
2009-07-16 14:18:48 -06:00
|
|
|
class PointStarVertexBuffer;
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
class Renderer
|
|
|
|
{
|
|
|
|
public:
|
2009-07-17 00:15:25 -06:00
|
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
Renderer();
|
|
|
|
~Renderer();
|
2004-03-15 11:51:16 -07:00
|
|
|
|
|
|
|
struct DetailOptions
|
|
|
|
{
|
|
|
|
DetailOptions();
|
|
|
|
unsigned int ringSystemSections;
|
|
|
|
unsigned int orbitPathSamplePoints;
|
|
|
|
unsigned int shadowTextureSize;
|
|
|
|
unsigned int eclipseTextureSize;
|
2017-03-04 07:05:41 -07:00
|
|
|
double orbitWindowEnd;
|
|
|
|
double orbitPeriodsShown;
|
|
|
|
double linearFadeFraction;
|
2004-03-15 11:51:16 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
bool init(GLContext*, int, int, DetailOptions&);
|
2001-11-27 18:50:04 -07:00
|
|
|
void shutdown() {};
|
|
|
|
void resize(int, int);
|
|
|
|
|
2018-09-22 07:13:49 -06:00
|
|
|
float calcPixelSize(float fovY, float windowHeight);
|
2002-12-11 13:27:35 -07:00
|
|
|
void setFaintestAM45deg(float);
|
2008-05-01 16:25:20 -06:00
|
|
|
float getFaintestAM45deg() const;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
void setRenderMode(int);
|
2002-09-22 08:51:35 -06:00
|
|
|
void autoMag(float& faintestMag);
|
2001-11-27 18:50:04 -07:00
|
|
|
void render(const Observer&,
|
2002-01-07 15:48:32 -07:00
|
|
|
const Universe&,
|
2001-11-27 18:50:04 -07:00
|
|
|
float faintestVisible,
|
2003-02-21 23:49:37 -07:00
|
|
|
const Selection& sel);
|
2008-03-24 18:23:16 -06:00
|
|
|
void draw(const Observer&,
|
|
|
|
const Universe&,
|
|
|
|
float faintestVisible,
|
|
|
|
const Selection& sel);
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
enum {
|
2003-07-04 18:22:01 -06:00
|
|
|
NoLabels = 0x000,
|
|
|
|
StarLabels = 0x001,
|
|
|
|
PlanetLabels = 0x002,
|
|
|
|
MoonLabels = 0x004,
|
|
|
|
ConstellationLabels = 0x008,
|
|
|
|
GalaxyLabels = 0x010,
|
|
|
|
AsteroidLabels = 0x020,
|
|
|
|
SpacecraftLabels = 0x040,
|
|
|
|
LocationLabels = 0x080,
|
|
|
|
CometLabels = 0x100,
|
2006-12-03 01:49:52 -07:00
|
|
|
NebulaLabels = 0x200,
|
|
|
|
OpenClusterLabels = 0x400,
|
2005-07-21 16:35:18 -06:00
|
|
|
I18nConstellationLabels = 0x800,
|
2008-04-15 12:31:53 -06:00
|
|
|
DwarfPlanetLabels = 0x1000,
|
|
|
|
MinorMoonLabels = 0x2000,
|
2018-03-11 07:12:58 -06:00
|
|
|
GlobularLabels = 0x4000,
|
|
|
|
BodyLabelMask = (PlanetLabels | DwarfPlanetLabels | MoonLabels | MinorMoonLabels | AsteroidLabels | SpacecraftLabels | CometLabels),
|
|
|
|
};
|
2002-02-17 21:00:07 -07:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
enum {
|
2008-05-29 15:52:27 -06:00
|
|
|
ShowNothing = 0x0000,
|
|
|
|
ShowStars = 0x0001,
|
|
|
|
ShowPlanets = 0x0002,
|
|
|
|
ShowGalaxies = 0x0004,
|
|
|
|
ShowDiagrams = 0x0008,
|
|
|
|
ShowCloudMaps = 0x0010,
|
|
|
|
ShowOrbits = 0x0020,
|
|
|
|
ShowCelestialSphere = 0x0040,
|
|
|
|
ShowNightMaps = 0x0080,
|
|
|
|
ShowAtmospheres = 0x0100,
|
|
|
|
ShowSmoothLines = 0x0200,
|
|
|
|
ShowEclipseShadows = 0x0400,
|
|
|
|
ShowStarsAsPoints = 0x0800,
|
|
|
|
ShowRingShadows = 0x1000,
|
|
|
|
ShowBoundaries = 0x2000,
|
|
|
|
ShowAutoMag = 0x4000,
|
|
|
|
ShowCometTails = 0x8000,
|
|
|
|
ShowMarkers = 0x10000,
|
2004-06-01 01:27:17 -06:00
|
|
|
ShowPartialTrajectories = 0x20000,
|
2008-05-29 15:52:27 -06:00
|
|
|
ShowNebulae = 0x40000,
|
|
|
|
ShowOpenClusters = 0x80000,
|
2012-05-23 15:28:37 -06:00
|
|
|
ShowGlobulars = 0x100000,
|
|
|
|
ShowCloudShadows = 0x200000,
|
2008-05-29 15:52:27 -06:00
|
|
|
ShowGalacticGrid = 0x400000,
|
|
|
|
ShowEclipticGrid = 0x800000,
|
|
|
|
ShowHorizonGrid = 0x1000000,
|
2008-06-06 19:35:24 -06:00
|
|
|
ShowEcliptic = 0x2000000,
|
2012-05-23 15:28:37 -06:00
|
|
|
ShowTintedIllumination = 0x4000000,
|
2003-07-08 09:31:34 -06:00
|
|
|
};
|
|
|
|
|
2018-03-11 07:12:58 -06:00
|
|
|
enum StarStyle
|
2003-07-08 09:31:34 -06:00
|
|
|
{
|
|
|
|
FuzzyPointStars = 0,
|
|
|
|
PointStars = 1,
|
|
|
|
ScaledDiscStars = 2,
|
|
|
|
StarStyleCount = 3,
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
2002-02-17 21:00:07 -07:00
|
|
|
|
2007-05-27 03:33:43 -06:00
|
|
|
// constants
|
|
|
|
static const int DefaultRenderFlags = Renderer::ShowStars |
|
|
|
|
Renderer::ShowPlanets |
|
|
|
|
Renderer::ShowGalaxies |
|
2018-03-11 07:12:58 -06:00
|
|
|
Renderer::ShowGlobulars |
|
2007-05-27 03:33:43 -06:00
|
|
|
Renderer::ShowCloudMaps |
|
|
|
|
Renderer::ShowAtmospheres |
|
|
|
|
Renderer::ShowEclipseShadows |
|
|
|
|
Renderer::ShowRingShadows |
|
|
|
|
Renderer::ShowCometTails |
|
|
|
|
Renderer::ShowNebulae |
|
|
|
|
Renderer::ShowOpenClusters |
|
|
|
|
Renderer::ShowAutoMag |
|
|
|
|
Renderer::ShowSmoothLines;
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
int getRenderFlags() const;
|
|
|
|
void setRenderFlags(int);
|
|
|
|
int getLabelMode() const;
|
|
|
|
void setLabelMode(int);
|
|
|
|
float getAmbientLightLevel() const;
|
|
|
|
void setAmbientLightLevel(float);
|
2004-03-21 12:26:54 -07:00
|
|
|
float getMinimumOrbitSize() const;
|
2002-04-25 21:49:43 -06:00
|
|
|
void setMinimumOrbitSize(float);
|
2003-06-18 12:35:59 -06:00
|
|
|
float getMinimumFeatureSize() const;
|
|
|
|
void setMinimumFeatureSize(float);
|
2002-09-08 21:50:37 -06:00
|
|
|
float getDistanceLimit() const;
|
|
|
|
void setDistanceLimit(float);
|
2003-07-08 09:31:34 -06:00
|
|
|
int getOrbitMask() const;
|
|
|
|
void setOrbitMask(int);
|
2005-12-11 08:34:35 -07:00
|
|
|
int getScreenDpi() const;
|
|
|
|
void setScreenDpi(int);
|
2004-09-19 21:27:50 -06:00
|
|
|
const ColorTemperatureTable* getStarColorTable() const;
|
|
|
|
void setStarColorTable(const ColorTemperatureTable*);
|
2006-12-11 18:29:27 -07:00
|
|
|
bool getVideoSync() const;
|
|
|
|
void setVideoSync(bool);
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
bool getFragmentShaderEnabled() const;
|
|
|
|
void setFragmentShaderEnabled(bool);
|
|
|
|
bool fragmentShaderSupported() const;
|
|
|
|
bool getVertexShaderEnabled() const;
|
|
|
|
void setVertexShaderEnabled(bool);
|
|
|
|
bool vertexShaderSupported() const;
|
|
|
|
|
2008-03-24 18:23:16 -06:00
|
|
|
#ifdef USE_HDR
|
|
|
|
bool getBloomEnabled();
|
|
|
|
void setBloomEnabled(bool);
|
|
|
|
void increaseBrightness();
|
|
|
|
void decreaseBrightness();
|
|
|
|
float getBrightness();
|
|
|
|
#endif
|
|
|
|
|
2003-02-19 16:25:26 -07:00
|
|
|
GLContext* getGLContext() { return context; }
|
|
|
|
|
2003-07-08 09:31:34 -06:00
|
|
|
void setStarStyle(StarStyle);
|
|
|
|
StarStyle getStarStyle() const;
|
2002-02-13 13:38:49 -07:00
|
|
|
void setResolution(unsigned int resolution);
|
2008-05-01 16:25:20 -06:00
|
|
|
unsigned int getResolution() const;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2002-05-02 01:57:38 -06:00
|
|
|
void loadTextures(Body*);
|
|
|
|
|
2006-09-07 02:08:32 -06:00
|
|
|
// Label related methods
|
2008-05-29 15:52:27 -06:00
|
|
|
enum LabelAlignment
|
|
|
|
{
|
|
|
|
AlignCenter,
|
|
|
|
AlignLeft,
|
|
|
|
AlignRight
|
|
|
|
};
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2008-05-29 15:52:27 -06:00
|
|
|
enum LabelVerticalAlignment
|
|
|
|
{
|
|
|
|
VerticalAlignCenter,
|
|
|
|
VerticalAlignBottom,
|
|
|
|
VerticalAlignTop,
|
|
|
|
};
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2010-03-07 13:19:17 -07:00
|
|
|
static const int MaxLabelLength = 48;
|
2008-02-13 14:49:53 -07:00
|
|
|
struct Annotation
|
2006-09-07 02:08:32 -06:00
|
|
|
{
|
2008-02-13 14:49:53 -07:00
|
|
|
char labelText[MaxLabelLength];
|
2008-05-22 14:30:45 -06:00
|
|
|
const MarkerRepresentation* markerRep;
|
2001-11-27 18:50:04 -07:00
|
|
|
Color color;
|
2009-07-20 22:04:26 -06:00
|
|
|
Eigen::Vector3f position;
|
2008-09-22 15:03:43 -06:00
|
|
|
LabelAlignment halign : 3;
|
|
|
|
LabelVerticalAlignment valign : 3;
|
|
|
|
float size;
|
2008-02-04 02:37:55 -07:00
|
|
|
|
2008-02-13 14:49:53 -07:00
|
|
|
bool operator<(const Annotation&) const;
|
2006-09-07 02:08:32 -06:00
|
|
|
};
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2008-05-29 15:52:27 -06:00
|
|
|
void addForegroundAnnotation(const MarkerRepresentation* markerRep,
|
|
|
|
const std::string& labelText,
|
|
|
|
Color color,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Vector3f& position,
|
2008-05-29 15:52:27 -06:00
|
|
|
LabelAlignment halign = AlignLeft,
|
2008-09-22 15:03:43 -06:00
|
|
|
LabelVerticalAlignment valign = VerticalAlignBottom,
|
|
|
|
float size = 0.0f);
|
2008-05-29 15:52:27 -06:00
|
|
|
void addBackgroundAnnotation(const MarkerRepresentation* markerRep,
|
|
|
|
const std::string& labelText,
|
|
|
|
Color color,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Vector3f& position,
|
2008-05-29 15:52:27 -06:00
|
|
|
LabelAlignment halign = AlignLeft,
|
|
|
|
LabelVerticalAlignment valign = VerticalAlignBottom,
|
2008-09-22 15:03:43 -06:00
|
|
|
float size = 0.0f);
|
2008-05-29 15:52:27 -06:00
|
|
|
void addSortedAnnotation(const MarkerRepresentation* markerRep,
|
|
|
|
const std::string& labelText,
|
|
|
|
Color color,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Vector3f& position,
|
2008-05-29 15:52:27 -06:00
|
|
|
LabelAlignment halign = AlignLeft,
|
2008-09-22 15:03:43 -06:00
|
|
|
LabelVerticalAlignment valign = VerticalAlignBottom,
|
|
|
|
float size = 0.0f);
|
2008-04-30 12:31:30 -06:00
|
|
|
|
|
|
|
// Callbacks for renderables; these belong in a special renderer interface
|
|
|
|
// only visible in object's render methods.
|
|
|
|
void beginObjectAnnotations();
|
2009-07-20 22:04:26 -06:00
|
|
|
void addObjectAnnotation(const MarkerRepresentation* markerRep, const std::string& labelText, Color, const Eigen::Vector3f&);
|
2008-04-30 12:31:30 -06:00
|
|
|
void endObjectAnnotations();
|
2009-07-20 22:04:26 -06:00
|
|
|
Eigen::Quaternionf getCameraOrientation() const;
|
2008-04-30 12:31:30 -06:00
|
|
|
float getNearPlaneDistance() const;
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2008-02-13 14:49:53 -07:00
|
|
|
void clearAnnotations(std::vector<Annotation>&);
|
2018-03-11 07:12:58 -06:00
|
|
|
void clearSortedAnnotations();
|
2007-10-25 01:18:53 -06:00
|
|
|
|
|
|
|
void invalidateOrbitCache();
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2006-09-07 02:08:32 -06:00
|
|
|
struct OrbitPathListEntry
|
|
|
|
{
|
|
|
|
float centerZ;
|
|
|
|
float radius;
|
|
|
|
Body* body;
|
2006-09-07 23:59:38 -06:00
|
|
|
const Star* star;
|
2009-08-06 21:15:26 -06:00
|
|
|
Eigen::Vector3d origin;
|
2007-05-13 21:00:26 -06:00
|
|
|
float opacity;
|
2008-02-04 02:37:55 -07:00
|
|
|
|
|
|
|
bool operator<(const OrbitPathListEntry&) const;
|
2018-03-11 07:12:58 -06:00
|
|
|
};
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2006-03-08 11:29:10 -07:00
|
|
|
enum FontStyle
|
|
|
|
{
|
|
|
|
FontNormal = 0,
|
|
|
|
FontLarge = 1,
|
|
|
|
FontCount = 2,
|
|
|
|
};
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2006-03-08 11:29:10 -07:00
|
|
|
void setFont(FontStyle, TextureFont*);
|
|
|
|
TextureFont* getFont(FontStyle) const;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2007-11-15 13:08:24 -07:00
|
|
|
bool settingsHaveChanged() const;
|
|
|
|
void markSettingsChanged();
|
2007-06-25 15:31:40 -06:00
|
|
|
|
2008-01-19 15:21:56 -07:00
|
|
|
void addWatcher(RendererWatcher*);
|
|
|
|
void removeWatcher(RendererWatcher*);
|
|
|
|
void notifyWatchers() const;
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
public:
|
|
|
|
// Internal types
|
|
|
|
// TODO: Figure out how to make these private. Even with a friend
|
2018-03-11 07:12:58 -06:00
|
|
|
//
|
2001-11-27 18:50:04 -07:00
|
|
|
struct Particle
|
|
|
|
{
|
2009-07-20 22:04:26 -06:00
|
|
|
Eigen::Vector3f center;
|
2001-11-27 18:50:04 -07:00
|
|
|
float size;
|
|
|
|
Color color;
|
|
|
|
float pad0, pad1, pad2;
|
|
|
|
};
|
|
|
|
|
2002-02-08 14:55:26 -07:00
|
|
|
struct RenderProperties
|
|
|
|
{
|
2009-07-17 00:15:25 -06:00
|
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
|
|
|
|
2002-02-08 14:55:26 -07:00
|
|
|
RenderProperties() :
|
2018-09-22 07:13:49 -06:00
|
|
|
surface(nullptr),
|
|
|
|
atmosphere(nullptr),
|
|
|
|
rings(nullptr),
|
2002-02-08 14:55:26 -07:00
|
|
|
radius(1.0f),
|
2008-09-22 15:03:43 -06:00
|
|
|
geometryScale(1.0f),
|
2004-10-07 11:52:22 -06:00
|
|
|
semiAxes(1.0f, 1.0f, 1.0f),
|
2008-07-23 15:54:53 -06:00
|
|
|
geometry(InvalidResource),
|
2009-07-17 00:15:25 -06:00
|
|
|
orientation(Eigen::Quaternionf::Identity())
|
2002-02-08 14:55:26 -07:00
|
|
|
{};
|
|
|
|
|
2002-02-13 13:38:49 -07:00
|
|
|
Surface* surface;
|
2002-02-08 14:55:26 -07:00
|
|
|
const Atmosphere* atmosphere;
|
|
|
|
RingSystem* rings;
|
|
|
|
float radius;
|
2008-09-22 15:03:43 -06:00
|
|
|
float geometryScale;
|
2009-07-17 00:15:25 -06:00
|
|
|
Eigen::Vector3f semiAxes;
|
2008-07-23 15:54:53 -06:00
|
|
|
ResourceHandle geometry;
|
2009-07-17 00:15:25 -06:00
|
|
|
Eigen::Quaternionf orientation;
|
2009-10-27 16:02:01 -06:00
|
|
|
LightingState::EclipseShadowVector* eclipseShadows;
|
2002-02-08 14:55:26 -07:00
|
|
|
};
|
|
|
|
|
2003-05-25 20:27:27 -06:00
|
|
|
private:
|
|
|
|
struct SkyVertex
|
|
|
|
{
|
|
|
|
float x, y, z;
|
|
|
|
unsigned char color[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SkyContourPoint
|
|
|
|
{
|
2009-07-20 21:14:29 -06:00
|
|
|
Eigen::Vector3f v;
|
|
|
|
Eigen::Vector3f eyeDir;
|
2003-05-25 20:27:27 -06:00
|
|
|
float centerDist;
|
|
|
|
float eyeDist;
|
|
|
|
float cosSkyCapAltitude;
|
|
|
|
};
|
|
|
|
|
2005-11-18 02:00:39 -07:00
|
|
|
template <class OBJ> struct ObjectLabel
|
2004-02-28 02:30:17 -07:00
|
|
|
{
|
2005-11-18 02:00:39 -07:00
|
|
|
OBJ* obj;
|
|
|
|
std::string label;
|
|
|
|
|
|
|
|
ObjectLabel() :
|
2018-09-22 07:13:49 -06:00
|
|
|
obj (nullptr),
|
2005-11-18 02:00:39 -07:00
|
|
|
label("")
|
|
|
|
{};
|
|
|
|
|
|
|
|
ObjectLabel(OBJ* _obj, const std::string& _label) :
|
|
|
|
obj (_obj),
|
|
|
|
label(_label)
|
|
|
|
{};
|
|
|
|
|
|
|
|
ObjectLabel(const ObjectLabel& objLbl) :
|
|
|
|
obj (objLbl.obj),
|
|
|
|
label(objLbl.label)
|
|
|
|
{};
|
|
|
|
|
|
|
|
ObjectLabel& operator = (const ObjectLabel& objLbl)
|
2004-02-28 02:30:17 -07:00
|
|
|
{
|
2005-11-18 02:00:39 -07:00
|
|
|
obj = objLbl.obj;
|
|
|
|
label = objLbl.label;
|
2004-02-28 02:30:17 -07:00
|
|
|
return *this;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2005-11-18 02:00:39 -07:00
|
|
|
typedef ObjectLabel<Star> StarLabel;
|
|
|
|
typedef ObjectLabel<DeepSkyObject> DSOLabel; // currently not used
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2006-09-07 02:08:32 -06:00
|
|
|
struct DepthBufferPartition
|
|
|
|
{
|
|
|
|
int index;
|
|
|
|
float nearZ;
|
|
|
|
float farZ;
|
|
|
|
};
|
2005-11-18 02:00:39 -07:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
private:
|
2003-02-14 11:07:47 -07:00
|
|
|
void setFieldOfView(float);
|
2001-11-27 18:50:04 -07:00
|
|
|
void renderStars(const StarDatabase& starDB,
|
|
|
|
float faintestVisible,
|
|
|
|
const Observer& observer);
|
2006-03-08 11:29:10 -07:00
|
|
|
void renderPointStars(const StarDatabase& starDB,
|
|
|
|
float faintestVisible,
|
|
|
|
const Observer& observer);
|
2005-11-18 02:00:39 -07:00
|
|
|
void renderDeepSkyObjects(const Universe&,
|
|
|
|
const Observer&,
|
|
|
|
float faintestMagNight);
|
2008-05-29 15:52:27 -06:00
|
|
|
void renderSkyGrids(const Observer& observer);
|
2008-09-25 12:31:48 -06:00
|
|
|
void renderSelectionPointer(const Observer& observer,
|
|
|
|
double now,
|
|
|
|
const Frustum& viewFrustum,
|
|
|
|
const Selection& sel);
|
|
|
|
|
2009-07-17 00:15:25 -06:00
|
|
|
void buildRenderLists(const Eigen::Vector3d& astrocentricObserverPos,
|
2008-02-28 13:04:52 -07:00
|
|
|
const Frustum& viewFrustum,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Vector3d& viewPlaneNormal,
|
|
|
|
const Eigen::Vector3d& frameCenter,
|
2008-02-20 19:25:48 -07:00
|
|
|
const FrameTree* tree,
|
2006-09-07 23:59:38 -06:00
|
|
|
const Observer& observer,
|
2008-04-03 11:46:45 -06:00
|
|
|
double now);
|
2009-08-06 21:15:26 -06:00
|
|
|
void buildOrbitLists(const Eigen::Vector3d& astrocentricObserverPos,
|
|
|
|
const Eigen::Quaterniond& observerOrientation,
|
2008-04-03 11:46:45 -06:00
|
|
|
const Frustum& viewFrustum,
|
|
|
|
const FrameTree* tree,
|
|
|
|
double now);
|
|
|
|
void buildLabelLists(const Frustum& viewFrustum,
|
|
|
|
double now);
|
|
|
|
|
|
|
|
void addRenderListEntries(RenderListEntry& rle,
|
|
|
|
Body& body,
|
|
|
|
bool isLabeled);
|
|
|
|
|
2006-09-07 23:59:38 -06:00
|
|
|
void addStarOrbitToRenderList(const Star& star,
|
|
|
|
const Observer& observer,
|
|
|
|
double now);
|
2002-02-08 14:55:26 -07:00
|
|
|
|
2009-07-17 00:15:25 -06:00
|
|
|
void renderObject(const Eigen::Vector3f& pos,
|
2002-02-08 14:55:26 -07:00
|
|
|
float distance,
|
|
|
|
double now,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& cameraOrientation,
|
2002-02-08 14:55:26 -07:00
|
|
|
float nearPlaneDistance,
|
|
|
|
float farPlaneDistance,
|
2004-10-04 00:35:33 -06:00
|
|
|
RenderProperties& obj,
|
|
|
|
const LightingState&);
|
2002-02-08 14:55:26 -07:00
|
|
|
|
2003-06-24 00:31:19 -06:00
|
|
|
void renderPlanet(Body& body,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Vector3f& pos,
|
2001-11-27 18:50:04 -07:00
|
|
|
float distance,
|
|
|
|
float appMag,
|
2006-12-08 12:02:20 -07:00
|
|
|
const Observer& observer,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& cameraOrientation,
|
2001-11-27 18:50:04 -07:00
|
|
|
float, float);
|
2002-02-08 14:55:26 -07:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
void renderStar(const Star& star,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Vector3f& pos,
|
2001-11-27 18:50:04 -07:00
|
|
|
float distance,
|
|
|
|
float appMag,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& orientation,
|
2001-11-27 18:50:04 -07:00
|
|
|
double now,
|
|
|
|
float, float);
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2008-03-20 15:36:17 -06:00
|
|
|
void renderReferenceMark(const ReferenceMark& refMark,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Vector3f& pos,
|
2008-03-20 15:36:17 -06:00
|
|
|
float distance,
|
|
|
|
double now,
|
|
|
|
float nearPlaneDistance);
|
2007-11-08 13:50:37 -07:00
|
|
|
|
2002-06-16 20:41:11 -06:00
|
|
|
void renderCometTail(const Body& body,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Vector3f& pos,
|
2002-06-16 20:41:11 -06:00
|
|
|
double now,
|
2007-10-11 16:20:53 -06:00
|
|
|
float discSizeInPixels);
|
2002-06-16 20:41:11 -06:00
|
|
|
|
2009-07-17 00:15:25 -06:00
|
|
|
void renderObjectAsPoint_nosprite(const Eigen::Vector3f& center,
|
2009-03-20 12:02:14 -06:00
|
|
|
float radius,
|
|
|
|
float appMag,
|
|
|
|
float _faintestMag,
|
|
|
|
float discSizeInPixels,
|
|
|
|
Color color,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& cameraOrientation,
|
2009-03-20 12:02:14 -06:00
|
|
|
bool useHalos);
|
2009-07-17 00:15:25 -06:00
|
|
|
void renderObjectAsPoint(const Eigen::Vector3f& center,
|
2006-12-20 11:56:43 -07:00
|
|
|
float radius,
|
2006-03-08 11:29:10 -07:00
|
|
|
float appMag,
|
|
|
|
float _faintestMag,
|
|
|
|
float discSizeInPixels,
|
|
|
|
Color color,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& cameraOrientation,
|
2006-12-20 11:56:43 -07:00
|
|
|
bool useHalos,
|
|
|
|
bool emissive);
|
2002-02-17 21:00:07 -07:00
|
|
|
|
2003-05-25 20:27:27 -06:00
|
|
|
void renderEllipsoidAtmosphere(const Atmosphere& atmosphere,
|
2009-07-20 21:14:29 -06:00
|
|
|
const Eigen::Vector3f& center,
|
|
|
|
const Eigen::Quaternionf& orientation,
|
|
|
|
const Eigen::Vector3f& semiAxes,
|
|
|
|
const Eigen::Vector3f& sunDirection,
|
2009-02-17 18:39:43 -07:00
|
|
|
const LightingState& ls,
|
2003-05-25 20:27:27 -06:00
|
|
|
float fade,
|
|
|
|
bool lit);
|
|
|
|
|
2008-05-22 14:30:45 -06:00
|
|
|
void renderLocations(const Body& body,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Vector3d& bodyPosition,
|
|
|
|
const Eigen::Quaterniond& bodyOrientation);
|
2018-03-11 07:12:58 -06:00
|
|
|
|
|
|
|
// Render an item from the render list
|
2006-09-10 18:37:20 -06:00
|
|
|
void renderItem(const RenderListEntry& rle,
|
|
|
|
const Observer& observer,
|
2009-07-17 00:15:25 -06:00
|
|
|
const Eigen::Quaternionf& cameraOrientation,
|
2006-09-10 18:37:20 -06:00
|
|
|
float nearPlaneDistance,
|
|
|
|
float farPlaneDistance);
|
2003-06-17 11:40:49 -06:00
|
|
|
|
2004-10-19 11:52:43 -06:00
|
|
|
bool testEclipse(const Body& receiver,
|
|
|
|
const Body& caster,
|
2009-10-27 16:02:01 -06:00
|
|
|
LightingState& lightingState,
|
|
|
|
unsigned int lightIndex,
|
|
|
|
double now);
|
2002-02-17 21:00:07 -07:00
|
|
|
|
2009-07-14 21:06:30 -06:00
|
|
|
void labelConstellations(const std::vector<Asterism*>& asterisms,
|
2001-11-27 18:50:04 -07:00
|
|
|
const Observer& observer);
|
|
|
|
void renderParticles(const std::vector<Particle>& particles,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Quaternionf& orientation);
|
2018-03-11 07:12:58 -06:00
|
|
|
|
|
|
|
|
2008-02-13 14:49:53 -07:00
|
|
|
void addAnnotation(std::vector<Annotation>&,
|
2008-05-22 14:30:45 -06:00
|
|
|
const MarkerRepresentation*,
|
2008-03-20 15:36:17 -06:00
|
|
|
const std::string& labelText,
|
2008-05-29 15:52:27 -06:00
|
|
|
Color color,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Vector3f& position,
|
2008-05-29 15:52:27 -06:00
|
|
|
LabelAlignment halign = AlignLeft,
|
|
|
|
LabelVerticalAlignment = VerticalAlignBottom,
|
2008-09-22 15:03:43 -06:00
|
|
|
float size = 0.0f);
|
2008-05-29 15:52:27 -06:00
|
|
|
void renderAnnotations(const std::vector<Annotation>&, FontStyle fs);
|
|
|
|
void renderBackgroundAnnotations(FontStyle fs);
|
|
|
|
void renderForegroundAnnotations(FontStyle fs);
|
2008-02-13 14:49:53 -07:00
|
|
|
std::vector<Annotation>::iterator renderSortedAnnotations(std::vector<Annotation>::iterator,
|
|
|
|
float nearDist,
|
|
|
|
float farDist,
|
|
|
|
FontStyle fs);
|
2008-04-30 12:31:30 -06:00
|
|
|
std::vector<Renderer::Annotation>::iterator renderAnnotations(std::vector<Annotation>::iterator startIter,
|
|
|
|
std::vector<Annotation>::iterator endIter,
|
|
|
|
float nearDist,
|
|
|
|
float farDist,
|
|
|
|
FontStyle fs);
|
|
|
|
|
2003-01-31 21:42:21 -07:00
|
|
|
void renderMarkers(const MarkerList&,
|
2008-03-21 17:38:05 -06:00
|
|
|
const UniversalCoord& cameraPosition,
|
2009-07-20 22:04:26 -06:00
|
|
|
const Eigen::Quaterniond& cameraOrientation,
|
2003-01-31 21:42:21 -07:00
|
|
|
double jd);
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2007-11-10 18:58:05 -07:00
|
|
|
void renderOrbit(const OrbitPathListEntry&,
|
|
|
|
double now,
|
2009-08-06 21:15:26 -06:00
|
|
|
const Eigen::Quaterniond& cameraOrientation,
|
2007-11-10 18:58:05 -07:00
|
|
|
const Frustum& frustum,
|
|
|
|
float nearDist,
|
|
|
|
float farDist);
|
2003-02-19 16:25:26 -07:00
|
|
|
|
2008-03-24 18:23:16 -06:00
|
|
|
#ifdef USE_HDR
|
|
|
|
private:
|
|
|
|
int sceneTexWidth, sceneTexHeight;
|
|
|
|
GLfloat sceneTexWScale, sceneTexHScale;
|
|
|
|
GLsizei blurBaseWidth, blurBaseHeight;
|
|
|
|
GLuint sceneTexture;
|
|
|
|
Texture **blurTextures;
|
|
|
|
Texture *blurTempTexture;
|
|
|
|
GLuint gaussianLists[4];
|
|
|
|
GLint blurFormat;
|
|
|
|
bool useLuminanceAlpha;
|
|
|
|
bool bloomEnabled;
|
|
|
|
float maxBodyMag;
|
|
|
|
float exposure, exposurePrev;
|
|
|
|
float brightPlus;
|
|
|
|
|
|
|
|
void genBlurTexture(int blurLevel);
|
|
|
|
void genBlurTextures();
|
|
|
|
void genSceneTexture();
|
|
|
|
void renderToBlurTexture(int blurLevel);
|
|
|
|
void renderToTexture(const Observer& observer,
|
|
|
|
const Universe& universe,
|
|
|
|
float faintestMagNight,
|
|
|
|
const Selection& sel);
|
|
|
|
void drawSceneTexture();
|
|
|
|
void drawBlur();
|
|
|
|
void drawGaussian3x3(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend);
|
|
|
|
void drawGaussian5x5(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend);
|
|
|
|
void drawGaussian9x9(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend);
|
|
|
|
void drawBlendedVertices(float xdelta, float ydelta, float blend);
|
|
|
|
#endif
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
private:
|
2003-02-19 10:48:25 -07:00
|
|
|
GLContext* context;
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
int windowWidth;
|
|
|
|
int windowHeight;
|
|
|
|
float fov;
|
2008-05-30 00:37:37 -06:00
|
|
|
double cosViewConeAngle;
|
2005-12-11 08:34:35 -07:00
|
|
|
int screenDpi;
|
2002-09-22 08:51:35 -06:00
|
|
|
float corrFac;
|
2001-11-27 18:50:04 -07:00
|
|
|
float pixelSize;
|
2002-12-11 13:27:35 -07:00
|
|
|
float faintestAutoMag45deg;
|
2006-03-08 11:29:10 -07:00
|
|
|
TextureFont* font[FontCount];
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
int renderMode;
|
|
|
|
int labelMode;
|
|
|
|
int renderFlags;
|
2003-07-08 09:31:34 -06:00
|
|
|
int orbitMask;
|
2001-11-27 18:50:04 -07:00
|
|
|
float ambientLightLevel;
|
|
|
|
bool fragmentShaderEnabled;
|
|
|
|
bool vertexShaderEnabled;
|
|
|
|
float brightnessBias;
|
|
|
|
|
|
|
|
float brightnessScale;
|
|
|
|
float faintestMag;
|
2002-01-23 18:21:53 -07:00
|
|
|
float faintestPlanetMag;
|
2001-12-11 00:40:53 -07:00
|
|
|
float saturationMagNight;
|
|
|
|
float saturationMag;
|
2003-07-08 09:31:34 -06:00
|
|
|
StarStyle starStyle;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
Color ambientColor;
|
2003-06-08 21:57:43 -06:00
|
|
|
std::string displayedSurface;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2009-07-17 00:15:25 -06:00
|
|
|
Eigen::Quaternionf m_cameraOrientation;
|
2006-03-08 11:29:10 -07:00
|
|
|
PointStarVertexBuffer* pointStarVertexBuffer;
|
2018-03-11 07:12:58 -06:00
|
|
|
PointStarVertexBuffer* glareVertexBuffer;
|
2001-11-27 18:50:04 -07:00
|
|
|
std::vector<RenderListEntry> renderList;
|
2008-04-03 11:46:45 -06:00
|
|
|
std::vector<SecondaryIlluminator> secondaryIlluminators;
|
2006-09-07 02:08:32 -06:00
|
|
|
std::vector<DepthBufferPartition> depthPartitions;
|
2001-11-27 18:50:04 -07:00
|
|
|
std::vector<Particle> glareParticles;
|
2008-02-13 14:49:53 -07:00
|
|
|
std::vector<Annotation> backgroundAnnotations;
|
|
|
|
std::vector<Annotation> foregroundAnnotations;
|
|
|
|
std::vector<Annotation> depthSortedAnnotations;
|
2008-04-30 12:31:30 -06:00
|
|
|
std::vector<Annotation> objectAnnotations;
|
2006-09-07 02:08:32 -06:00
|
|
|
std::vector<OrbitPathListEntry> orbitPathList;
|
2009-10-27 16:02:01 -06:00
|
|
|
LightingState::EclipseShadowVector eclipseShadows[MaxLights];
|
2004-10-02 04:44:49 -06:00
|
|
|
std::vector<const Star*> nearStars;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2008-04-03 11:46:45 -06:00
|
|
|
std::vector<LightSource> lightSourceList;
|
2004-10-04 00:35:33 -06:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
double modelMatrix[16];
|
|
|
|
double projMatrix[16];
|
|
|
|
|
|
|
|
bool useCompressedTextures;
|
|
|
|
bool useVertexPrograms;
|
2002-02-13 13:38:49 -07:00
|
|
|
unsigned int textureResolution;
|
2004-03-15 11:51:16 -07:00
|
|
|
DetailOptions detailOptions;
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t frameCount;
|
2007-10-25 01:18:53 -06:00
|
|
|
|
2008-04-30 12:31:30 -06:00
|
|
|
int currentIntervalIndex;
|
|
|
|
|
|
|
|
|
2004-06-01 01:27:17 -06:00
|
|
|
public:
|
2009-08-06 21:15:26 -06:00
|
|
|
#if 0
|
2018-03-11 07:12:58 -06:00
|
|
|
struct OrbitSample
|
2004-06-01 01:27:17 -06:00
|
|
|
{
|
|
|
|
double t;
|
2007-11-10 18:58:05 -07:00
|
|
|
Point3d pos;
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2009-07-22 19:40:17 -06:00
|
|
|
OrbitSample(const Eigen::Vector3d& _pos, double _t) : t(_t), pos(_pos.x(), _pos.y(), _pos.z()) { }
|
2007-11-10 18:58:05 -07:00
|
|
|
OrbitSample() { }
|
2004-06-01 01:27:17 -06:00
|
|
|
};
|
|
|
|
|
2007-11-10 18:58:05 -07:00
|
|
|
struct OrbitSection
|
|
|
|
{
|
|
|
|
Capsuled boundingVolume;
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t firstSample;
|
2007-11-10 18:58:05 -07:00
|
|
|
};
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2002-03-19 17:28:43 -07:00
|
|
|
struct CachedOrbit
|
|
|
|
{
|
2004-06-01 01:27:17 -06:00
|
|
|
std::vector<OrbitSample> trajectory;
|
2007-11-10 18:58:05 -07:00
|
|
|
std::vector<OrbitSection> sections;
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t lastUsed;
|
2002-03-19 17:28:43 -07:00
|
|
|
};
|
2009-08-06 21:15:26 -06:00
|
|
|
#endif
|
2007-10-25 01:18:53 -06:00
|
|
|
|
|
|
|
private:
|
2009-08-06 21:15:26 -06:00
|
|
|
typedef std::map<const Orbit*, CurvePlot*> OrbitCache;
|
2007-10-25 01:18:53 -06:00
|
|
|
OrbitCache orbitCache;
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t lastOrbitCacheFlush;
|
2002-04-25 21:49:43 -06:00
|
|
|
|
|
|
|
float minOrbitSize;
|
2002-09-08 21:50:37 -06:00
|
|
|
float distanceLimit;
|
2003-06-18 12:35:59 -06:00
|
|
|
float minFeatureSize;
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t locationFilter;
|
2003-05-25 20:27:27 -06:00
|
|
|
|
|
|
|
SkyVertex* skyVertices;
|
2018-07-03 10:52:34 -06:00
|
|
|
uint32_t* skyIndices;
|
2003-05-25 20:27:27 -06:00
|
|
|
SkyContourPoint* skyContour;
|
2004-09-19 21:27:50 -06:00
|
|
|
|
|
|
|
const ColorTemperatureTable* colorTemp;
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2006-09-07 23:59:38 -06:00
|
|
|
Selection highlightObject;
|
2006-12-11 18:29:27 -07:00
|
|
|
|
|
|
|
bool videoSync;
|
2007-11-15 13:08:24 -07:00
|
|
|
bool settingsChanged;
|
2007-10-10 19:32:04 -06:00
|
|
|
|
2008-04-30 12:31:30 -06:00
|
|
|
// True if we're in between a begin/endObjectAnnotations
|
|
|
|
bool objectAnnotationSetOpen;
|
2008-09-25 12:31:48 -06:00
|
|
|
|
2008-10-10 16:43:02 -06:00
|
|
|
double realTime;
|
2018-03-11 07:12:58 -06:00
|
|
|
|
2008-05-22 14:30:45 -06:00
|
|
|
// Location markers
|
2008-09-22 15:03:43 -06:00
|
|
|
public:
|
2008-05-22 14:30:45 -06:00
|
|
|
MarkerRepresentation mountainRep;
|
|
|
|
MarkerRepresentation craterRep;
|
|
|
|
MarkerRepresentation observatoryRep;
|
|
|
|
MarkerRepresentation cityRep;
|
|
|
|
MarkerRepresentation genericLocationRep;
|
2008-09-22 15:03:43 -06:00
|
|
|
MarkerRepresentation galaxyRep;
|
|
|
|
MarkerRepresentation nebulaRep;
|
|
|
|
MarkerRepresentation openClusterRep;
|
|
|
|
MarkerRepresentation globularRep;
|
2008-04-30 12:31:30 -06:00
|
|
|
|
2008-01-19 15:21:56 -07:00
|
|
|
std::list<RendererWatcher*> watchers;
|
|
|
|
|
2007-10-10 19:32:04 -06:00
|
|
|
public:
|
|
|
|
// Colors for all lines and labels
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color StarLabelColor;
|
|
|
|
static Color PlanetLabelColor;
|
2008-04-15 12:31:53 -06:00
|
|
|
static Color DwarfPlanetLabelColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color MoonLabelColor;
|
2008-04-15 12:31:53 -06:00
|
|
|
static Color MinorMoonLabelColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color AsteroidLabelColor;
|
|
|
|
static Color CometLabelColor;
|
|
|
|
static Color SpacecraftLabelColor;
|
|
|
|
static Color LocationLabelColor;
|
|
|
|
static Color GalaxyLabelColor;
|
2018-03-11 07:12:58 -06:00
|
|
|
static Color GlobularLabelColor;
|
|
|
|
static Color NebulaLabelColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color OpenClusterLabelColor;
|
|
|
|
static Color ConstellationLabelColor;
|
|
|
|
static Color EquatorialGridLabelColor;
|
2008-03-20 15:36:17 -06:00
|
|
|
static Color PlanetographicGridLabelColor;
|
2008-05-29 15:52:27 -06:00
|
|
|
static Color GalacticGridLabelColor;
|
|
|
|
static Color EclipticGridLabelColor;
|
|
|
|
static Color HorizonGridLabelColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
|
|
|
|
static Color StarOrbitColor;
|
|
|
|
static Color PlanetOrbitColor;
|
2008-04-15 12:31:53 -06:00
|
|
|
static Color DwarfPlanetOrbitColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color MoonOrbitColor;
|
2008-04-15 12:31:53 -06:00
|
|
|
static Color MinorMoonOrbitColor;
|
2007-10-13 05:08:13 -06:00
|
|
|
static Color AsteroidOrbitColor;
|
|
|
|
static Color CometOrbitColor;
|
|
|
|
static Color SpacecraftOrbitColor;
|
|
|
|
static Color SelectionOrbitColor;
|
|
|
|
|
|
|
|
static Color ConstellationColor;
|
|
|
|
static Color BoundaryColor;
|
|
|
|
static Color EquatorialGridColor;
|
2008-03-20 15:36:17 -06:00
|
|
|
static Color PlanetographicGridColor;
|
|
|
|
static Color PlanetEquatorColor;
|
2008-05-29 15:52:27 -06:00
|
|
|
static Color GalacticGridColor;
|
|
|
|
static Color EclipticGridColor;
|
|
|
|
static Color HorizonGridColor;
|
2008-06-06 19:35:24 -06:00
|
|
|
static Color EclipticColor;
|
2008-09-25 12:31:48 -06:00
|
|
|
|
|
|
|
static Color SelectionCursorColor;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
2008-01-19 15:21:56 -07:00
|
|
|
|
|
|
|
class RendererWatcher
|
|
|
|
{
|
|
|
|
public:
|
2008-01-24 01:39:30 -07:00
|
|
|
RendererWatcher() {};
|
|
|
|
virtual ~RendererWatcher() {};
|
|
|
|
|
2008-01-19 15:21:56 -07:00
|
|
|
virtual void notifyRenderSettingsChanged(const Renderer*) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-12-17 18:54:17 -07:00
|
|
|
#endif // _CELENGINE_RENDER_H_
|