Declare PropertyInfo as constexpr, rather than const

This commit is contained in:
Alexander Bock
2018-06-28 17:08:56 -04:00
parent 9408c0c45f
commit 99a6efca8e
92 changed files with 534 additions and 527 deletions

View File

@@ -41,15 +41,14 @@ namespace {
return glm::radians(rightAscension * 15);
}
const openspace::properties::Property::PropertyInfo VertexInfo = {
constexpr openspace::properties::Property::PropertyInfo VertexInfo = {
"File",
"Vertex File Path",
"The file pointed to with this value contains the vertex locations of the "
"constellations."
};
const openspace::properties::Property::PropertyInfo ConstellationInfo = {
constexpr openspace::properties::Property::PropertyInfo ConstellationInfo = {
"ConstellationFile",
"Constellation File Path",
"Specifies the file that contains the mapping between constellation "
@@ -57,14 +56,14 @@ namespace {
"abbreviations are used as the full names."
};
const openspace::properties::Property::PropertyInfo ColorInfo = {
constexpr openspace::properties::Property::PropertyInfo ColorInfo = {
"Color",
"Color of constellation lines",
"Specifies the color of the constellation lines. The lines are always drawn at "
"full opacity."
};
const openspace::properties::Property::PropertyInfo SelectionInfo = {
constexpr openspace::properties::Property::PropertyInfo SelectionInfo = {
"ConstellationSelection",
"Constellation Selection",
"The constellations that are selected are displayed on the celestial sphere."

View File

@@ -55,21 +55,21 @@ namespace {
constexpr const char* keyShadowSource = "Source";
constexpr const char* keyShadowCaster = "Caster";
const openspace::properties::Property::PropertyInfo ColorTextureInfo = {
constexpr openspace::properties::Property::PropertyInfo ColorTextureInfo = {
"ColorTexture",
"Color Base Texture",
"The path to the base color texture that is used on the planet prior to any "
"image projection."
};
const openspace::properties::Property::PropertyInfo HeightTextureInfo = {
constexpr openspace::properties::Property::PropertyInfo HeightTextureInfo = {
"HeightTexture",
"Heightmap Texture",
"The path to the height map texture that is used for the planet. If no height "
"map is specified the planet does not use a height field."
};
const openspace::properties::Property::PropertyInfo NightTextureInfo = {
constexpr openspace::properties::Property::PropertyInfo NightTextureInfo = {
"NightTexture",
"Night Texture",
"The path to the night texture that is used for the part of the planet that is "
@@ -77,7 +77,7 @@ namespace {
"planet is rendered dark."
};
const openspace::properties::Property::PropertyInfo HeightExaggerationInfo = {
constexpr openspace::properties::Property::PropertyInfo HeightExaggerationInfo = {
"HeightExaggeration",
"Height Exaggeration",
"This value determines the level of height exaggeration that is applied to a "
@@ -85,7 +85,7 @@ namespace {
"value of '1' uses the measured height field."
};
const openspace::properties::Property::PropertyInfo PerformShadingInfo = {
constexpr openspace::properties::Property::PropertyInfo PerformShadingInfo = {
"PerformShading",
"Perform Shading",
"If this value is enabled, the model will be shaded based on the relative "

View File

@@ -38,20 +38,20 @@
#include <ghoul/opengl/textureunit.h>
namespace {
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"Texture",
"Texture",
"This value is the path to a texture on disk that contains a one-dimensional "
"texture which is used for these rings."
};
const openspace::properties::Property::PropertyInfo SizeInfo = {
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size",
"This value specifies the radius of the rings in meter."
};
const openspace::properties::Property::PropertyInfo OffsetInfo = {
constexpr openspace::properties::Property::PropertyInfo OffsetInfo = {
"Offset",
"Offset",
"This value is used to limit the width of the rings.Each of the two values is a "
@@ -60,7 +60,7 @@ namespace {
"only shown between radius/2 and radius. It defaults to {0.0, 1.0}."
};
const openspace::properties::Property::PropertyInfo NightFactorInfo = {
constexpr openspace::properties::Property::PropertyInfo NightFactorInfo = {
"NightFactor",
"Night Factor",
"This value is a multiplicative factor that is applied to the side of the rings "
@@ -68,7 +68,7 @@ namespace {
"of the night side occurs."
};
const openspace::properties::Property::PropertyInfo TransparencyInfo = {
constexpr openspace::properties::Property::PropertyInfo TransparencyInfo = {
"Transparency",
"Transparency",
"This value determines the transparency of part of the rings depending on the "

View File

@@ -80,42 +80,42 @@ namespace {
float speed;
};
const openspace::properties::Property::PropertyInfo PsfTextureInfo = {
constexpr openspace::properties::Property::PropertyInfo PsfTextureInfo = {
"Texture",
"Point Spread Function Texture",
"The path to the texture that should be used as a point spread function for the "
"stars."
};
const openspace::properties::Property::PropertyInfo ColorTextureInfo = {
constexpr openspace::properties::Property::PropertyInfo ColorTextureInfo = {
"ColorMap",
"ColorBV Texture",
"The path to the texture that is used to convert from the B-V value of the star "
"to its color. The texture is used as a one dimensional lookup function."
};
const openspace::properties::Property::PropertyInfo ColorOptionInfo = {
constexpr openspace::properties::Property::PropertyInfo ColorOptionInfo = {
"ColorOption",
"Color Option",
"This value determines which quantity is used for determining the color of the "
"stars."
};
const openspace::properties::Property::PropertyInfo TransparencyInfo = {
constexpr openspace::properties::Property::PropertyInfo TransparencyInfo = {
"Transparency",
"Transparency",
"This value is a multiplicative factor that is applied to the transparency of "
"all stars."
};
const openspace::properties::Property::PropertyInfo ScaleFactorInfo = {
constexpr openspace::properties::Property::PropertyInfo ScaleFactorInfo = {
"ScaleFactor",
"Scale Factor",
"This value is used as a multiplicative factor that is applied to the apparent "
"size of each star."
};
const openspace::properties::Property::PropertyInfo MinBillboardSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo MinBillboardSizeInfo = {
"MinBillboardSize",
"Min Billboard Size",
"This value is used as a lower limit on the size of stars that are rendered. Any "

View File

@@ -30,13 +30,13 @@
#include <openspace/util/powerscaledsphere.h>
namespace {
const openspace::properties::Property::PropertyInfo RadiusInfo = {
constexpr openspace::properties::Property::PropertyInfo RadiusInfo = {
"Radius",
"Radius",
"This value specifies the radius of this sphere in meters."
};
const openspace::properties::Property::PropertyInfo SegmentsInfo = {
constexpr openspace::properties::Property::PropertyInfo SegmentsInfo = {
"Segments",
"Segments",
"This value specifies the number of segments that this sphere is split into."