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
@@ -42,27 +42,27 @@ namespace {
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
};
const openspace::properties::Property::PropertyInfo SourceTypeInfo = {
constexpr openspace::properties::Property::PropertyInfo SourceTypeInfo = {
"SourceType",
"Source Type",
"The type of position that is used as the triangle apex used to calculate the "
"angle. The default value is 'Camera'."
};
const openspace::properties::Property::PropertyInfo SourceNodeNameInfo = {
constexpr openspace::properties::Property::PropertyInfo SourceNodeNameInfo = {
"SourceNodeName",
"Source Node Name",
"If a scene graph node is selected as type, this value specifies the name of the "
@@ -71,7 +71,7 @@ namespace {
"Source, Reference, Destination)."
};
const openspace::properties::Property::PropertyInfo ReferenceTypeInfo = {
constexpr openspace::properties::Property::PropertyInfo ReferenceTypeInfo = {
"ReferenceType",
"Reference Type",
"The type of position that is used as the destination of the reference line used "
@@ -79,14 +79,14 @@ namespace {
"the triangle (Source, Reference, Destination)."
};
const openspace::properties::Property::PropertyInfo ReferenceNodeNameInfo = {
constexpr openspace::properties::Property::PropertyInfo ReferenceNodeNameInfo = {
"ReferenceNodeName",
"Reference Node Name",
"If a scene graph node is selected as type, this value specifies the name of the "
"node that is to be used as the reference direction to compute the angle."
};
const openspace::properties::Property::PropertyInfo DestinationTypeInfo = {
constexpr openspace::properties::Property::PropertyInfo DestinationTypeInfo = {
"DestinationType",
"Destination Type",
"The type of position that is used as the destination to calculate the angle. "
@@ -94,7 +94,7 @@ namespace {
"Source, Reference, Destination). The default value for this is 'Focus'."
};
const openspace::properties::Property::PropertyInfo DestinationNodeNameInfo = {
constexpr openspace::properties::Property::PropertyInfo DestinationNodeNameInfo = {
"DestinationNodeName",
"Destination Node Name",
"If a scene graph node is selected as type, this value specifies the name of the "
+2 -2
View File
@@ -36,14 +36,14 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 15.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
@@ -43,48 +43,48 @@ namespace {
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
};
const openspace::properties::Property::PropertyInfo SourceTypeInfo = {
constexpr openspace::properties::Property::PropertyInfo SourceTypeInfo = {
"SourceType",
"Source Type",
"The type of position that is used as the source to calculate the distance. The "
"default value is 'Camera'."
};
const openspace::properties::Property::PropertyInfo SourceNodeNameInfo = {
constexpr openspace::properties::Property::PropertyInfo SourceNodeNameInfo = {
"SourceNodeName",
"Source Node Name",
"If a scene graph node is selected as type, this value specifies the name of the "
"node that is to be used as the source for computing the distance."
};
const openspace::properties::Property::PropertyInfo DestinationTypeInfo = {
constexpr openspace::properties::Property::PropertyInfo DestinationTypeInfo = {
"DestinationType",
"Destination Type",
"The type of position that is used as the destination to calculate the distance. "
"The default value for this is 'Focus'."
};
const openspace::properties::Property::PropertyInfo DestinationNodeNameInfo = {
constexpr openspace::properties::Property::PropertyInfo DestinationNodeNameInfo = {
"DestinationNodeName",
"Destination Node Name",
"If a scene graph node is selected as type, this value specifies the name of the "
"node that is to be used as the destination for computing the distance."
};
const openspace::properties::Property::PropertyInfo SimplificationInfo = {
constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = {
"Simplification",
"Simplification",
"If this value is enabled, the distace is displayed in nuanced units, such as "
@@ -92,7 +92,7 @@ namespace {
"displayed in meters."
};
const openspace::properties::Property::PropertyInfo RequestedUnitInfo = {
constexpr openspace::properties::Property::PropertyInfo RequestedUnitInfo = {
"RequestedUnit",
"Requested Unit",
"If the simplification is disabled, this distance unit is used as a destination "
@@ -36,20 +36,20 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
};
const openspace::properties::Property::PropertyInfo FrametimeInfo = {
constexpr openspace::properties::Property::PropertyInfo FrametimeInfo = {
"FrametimeType",
"Type of the frame time display",
"This value determines the units in which the frame time is displayed."
@@ -39,14 +39,14 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 15.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
@@ -39,14 +39,14 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
@@ -37,26 +37,26 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
};
const openspace::properties::Property::PropertyInfo PropertyUriInfo = {
constexpr openspace::properties::Property::PropertyInfo PropertyUriInfo = {
"URI",
"Property URI",
"The URI of the property that is displayed in this dashboarditem"
};
const openspace::properties::Property::PropertyInfo DisplayStringInfo = {
constexpr openspace::properties::Property::PropertyInfo DisplayStringInfo = {
"DisplayString",
"Display String",
"The String that is being displayed. It must either be empty (in which case only "
@@ -37,20 +37,20 @@ namespace {
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 10.f;
const openspace::properties::Property::PropertyInfo FontNameInfo = {
constexpr openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
};
const openspace::properties::Property::PropertyInfo SimplificationInfo = {
constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = {
"Simplification",
"Time Simplification",
"If this value is enabled, the time is displayed in nuanced units, such as "
@@ -58,7 +58,7 @@ namespace {
"displayed in seconds."
};
const openspace::properties::Property::PropertyInfo RequestedUnitInfo = {
constexpr openspace::properties::Property::PropertyInfo RequestedUnitInfo = {
"RequestedUnit",
"Requested Unit",
"If the simplification is disabled, this time unit is used as a destination to "
@@ -28,7 +28,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const openspace::properties::Property::PropertyInfo SpacingInfo = {
constexpr openspace::properties::Property::PropertyInfo SpacingInfo = {
"Spacing",
"Spacing",
"This value determines the spacing (in pixels) that this item represents. The "
+3 -3
View File
@@ -45,21 +45,21 @@ namespace {
constexpr const char* ProgramName = "ModelProgram";
constexpr const char* KeyGeometry = "Geometry";
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"ColorTexture",
"Color Texture",
"This value points to a color texture file that is applied to the geometry "
"rendered in this object."
};
const openspace::properties::Property::PropertyInfo ShadingInfo = {
constexpr openspace::properties::Property::PropertyInfo ShadingInfo = {
"PerformShading",
"Perform Shading",
"This value determines whether this model should be shaded by using the position "
"of the Sun."
};
const openspace::properties::Property::PropertyInfo ModelTransformInfo = {
constexpr openspace::properties::Property::PropertyInfo ModelTransformInfo = {
"ModelTransform",
"Model Transform",
"This value specifies the model transform that is applied to the model before "
+3 -3
View File
@@ -49,7 +49,7 @@ namespace {
BlendModeAdditive
};
const openspace::properties::Property::PropertyInfo BillboardInfo = {
constexpr openspace::properties::Property::PropertyInfo BillboardInfo = {
"Billboard",
"Billboard mode",
"This value specifies whether the plane is a billboard, which means that it is "
@@ -57,13 +57,13 @@ namespace {
"transformations."
};
const openspace::properties::Property::PropertyInfo SizeInfo = {
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size (in meters)",
"This value specifies the size of the plane in meters."
};
const openspace::properties::Property::PropertyInfo BlendModeInfo = {
constexpr openspace::properties::Property::PropertyInfo BlendModeInfo = {
"BlendMode",
"Blending Mode",
"This determines the blending mode that is applied to this plane."
@@ -33,7 +33,7 @@
#include <ghoul/opengl/texture.h>
namespace {
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"Texture",
"Texture",
"This value specifies an image that is loaded from disk and is used as a texture "
@@ -34,7 +34,7 @@
#include <ghoul/opengl/textureunit.h>
namespace {
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"URL",
"Image URL",
"Sets the URL of the texture that is displayed on this screen space plane. If "
+7 -7
View File
@@ -48,7 +48,7 @@ namespace {
Inside = 2
};
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"Texture",
"Texture",
"This value specifies an image that is loaded from disk and is used as a texture "
@@ -56,40 +56,40 @@ namespace {
"projection."
};
const openspace::properties::Property::PropertyInfo OrientationInfo = {
constexpr openspace::properties::Property::PropertyInfo OrientationInfo = {
"Orientation",
"Orientation",
"Specifies whether the texture is applied to the inside of the sphere, the "
"outside of the sphere, or both."
};
const openspace::properties::Property::PropertyInfo SegmentsInfo = {
constexpr openspace::properties::Property::PropertyInfo SegmentsInfo = {
"Segments",
"Number of Segments",
"This value specifies the number of segments that the sphere is separated in."
};
const openspace::properties::Property::PropertyInfo SizeInfo = {
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size (in meters)",
"This value specifies the radius of the sphere in meters."
};
const openspace::properties::Property::PropertyInfo FadeOutThreshouldInfo = {
constexpr openspace::properties::Property::PropertyInfo FadeOutThreshouldInfo = {
"FadeOutThreshould",
"Fade-Out Threshould",
"This value determines percentage of the sphere is visible before starting "
"fading-out it."
};
const openspace::properties::Property::PropertyInfo FadeInThreshouldInfo = {
constexpr openspace::properties::Property::PropertyInfo FadeInThreshouldInfo = {
"FadeInThreshould",
"Fade-In Threshould",
"Distance from center of MilkyWay from where the astronomical object starts to "
"fade in."
};
const openspace::properties::Property::PropertyInfo DisableFadeInOuInfo = {
constexpr openspace::properties::Property::PropertyInfo DisableFadeInOuInfo = {
"DisableFadeInOu",
"Disable Fade-In/Fade-Out effects",
"Enables/Disables the Fade-In/Out effects."
@@ -37,33 +37,33 @@
namespace {
constexpr const char* ProgramName = "GridProgram";
const openspace::properties::Property::PropertyInfo GridColorInfo = {
constexpr openspace::properties::Property::PropertyInfo GridColorInfo = {
"GridColor",
"Grid Color",
"This value determines the color of the grid lines that are rendered."
};
const openspace::properties::Property::PropertyInfo GridMatrixInfo = {
constexpr openspace::properties::Property::PropertyInfo GridMatrixInfo = {
"GridMatrix",
"Grid Matrix",
"This value specifies the local transformation matrix that defines the "
"orientation of this grid relative to the parent's rotation."
};
const openspace::properties::Property::PropertyInfo SegmentsInfo = {
constexpr openspace::properties::Property::PropertyInfo SegmentsInfo = {
"Segments",
"Number of Segments",
"This value specifies the number of segments that are used to render the "
"surrounding sphere."
};
const openspace::properties::Property::PropertyInfo LineWidthInfo = {
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
"LineWidth",
"Line Width",
"This value specifies the line width of the spherical grid."
};
const openspace::properties::Property::PropertyInfo RadiusInfo = {
constexpr openspace::properties::Property::PropertyInfo RadiusInfo = {
"Radius",
"Radius",
"This value specifies the radius of the grid."
+6 -6
View File
@@ -53,13 +53,13 @@ namespace {
{ "Points+Lines", RenderingModeLinesPoints }
};
const openspace::properties::Property::PropertyInfo LineColorInfo = {
constexpr openspace::properties::Property::PropertyInfo LineColorInfo = {
"Color",
"Color",
"This value determines the RGB main color for the lines and points of the trail."
};
const openspace::properties::Property::PropertyInfo EnableFadeInfo = {
constexpr openspace::properties::Property::PropertyInfo EnableFadeInfo = {
"EnableFade",
"Enable line fading of old points",
"Toggles whether the trail should fade older points out. If this value is "
@@ -67,7 +67,7 @@ namespace {
"'false', the entire trail is rendered at full opacity and color."
};
const openspace::properties::Property::PropertyInfo FadeInfo = {
constexpr openspace::properties::Property::PropertyInfo FadeInfo = {
"Fade",
"Line fade",
"The fading factor that is applied to the trail if the 'EnableFade' value is "
@@ -75,7 +75,7 @@ namespace {
"the less fading is applied."
};
const openspace::properties::Property::PropertyInfo LineWidthInfo = {
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
"LineWidth",
"Line Width",
"This value specifies the line width of the trail if the selected rendering "
@@ -83,7 +83,7 @@ namespace {
"ignored."
};
const openspace::properties::Property::PropertyInfo PointSizeInfo = {
constexpr openspace::properties::Property::PropertyInfo PointSizeInfo = {
"PointSize",
"Point Size",
"This value specifies the base size of the points along the line if the selected "
@@ -92,7 +92,7 @@ namespace {
"values are half this size."
};
const openspace::properties::Property::PropertyInfo RenderingModeInfo = {
constexpr openspace::properties::Property::PropertyInfo RenderingModeInfo = {
"Rendering",
"Rendering Mode",
"Determines how the trail should be rendered to the screen.If 'Lines' is "
@@ -79,7 +79,7 @@
// items in memory as was shown to be much slower than the current system. ---abock
namespace {
const openspace::properties::Property::PropertyInfo PeriodInfo = {
constexpr openspace::properties::Property::PropertyInfo PeriodInfo = {
"Period",
"Period (in days)",
"The objects period, i.e. the length of its orbit around the parent object given "
@@ -88,7 +88,7 @@ namespace {
"possible to show the effects of precession."
};
const openspace::properties::Property::PropertyInfo ResolutionInfo = {
constexpr openspace::properties::Property::PropertyInfo ResolutionInfo = {
"Resolution",
"Number of samples along the orbit",
"The number of samples along the orbit. This determines the resolution of the "
@@ -43,21 +43,21 @@
// _endTime. This buffer is updated every frame.
namespace {
const openspace::properties::Property::PropertyInfo StartTimeInfo = {
constexpr openspace::properties::Property::PropertyInfo StartTimeInfo = {
"StartTime",
"Start Time",
"The start time for the range of this trajectory. The date must be in ISO 8601 "
"format: YYYY MM DD HH:mm:ss.xxx."
};
const openspace::properties::Property::PropertyInfo EndTimeInfo = {
constexpr openspace::properties::Property::PropertyInfo EndTimeInfo = {
"EndTime",
"End Time",
"The end time for the range of this trajectory. The date must be in ISO 8601 "
"format: YYYY MM DD HH:mm:ss.xxx."
};
const openspace::properties::Property::PropertyInfo SampleIntervalInfo = {
constexpr openspace::properties::Property::PropertyInfo SampleIntervalInfo = {
"SampleInterval",
"Sample Interval",
"The interval between samples of the trajectory. This value (together with "
@@ -66,7 +66,7 @@ namespace {
"'EndTime' is split into 'SampleInterval' * 'TimeStampSubsampleFactor' segments."
};
const openspace::properties::Property::PropertyInfo TimeSubSampleInfo = {
constexpr openspace::properties::Property::PropertyInfo TimeSubSampleInfo = {
"TimeStampSubsampleFactor",
"Time Stamp Subsampling Factor",
"The factor that is used to create subsamples along the trajectory. This value "
@@ -75,7 +75,7 @@ namespace {
"'EndTime' is split into 'SampleInterval' * 'TimeStampSubsampleFactor' segments."
};
const openspace::properties::Property::PropertyInfo RenderFullPathInfo = {
constexpr openspace::properties::Property::PropertyInfo RenderFullPathInfo = {
"ShowFullTrail",
"Render Full Trail",
"If this value is set to 'true', the entire trail will be rendered; if it is "
@@ -36,7 +36,7 @@
#include <ghoul/logging/logmanager.h>
namespace {
const openspace::properties::Property::PropertyInfo UseMainInfo = {
constexpr openspace::properties::Property::PropertyInfo UseMainInfo = {
"UseMainDashboard",
"Use main dashboard",
"If this value is set to 'true', this ScreenSpaceDashboard will use the "
@@ -32,7 +32,7 @@
#include <ghoul/opengl/textureunit.h>
namespace {
const openspace::properties::Property::PropertyInfo SizeInfo = {
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size",
"This value explicitly specifies the size of the screen space plane."
@@ -33,7 +33,7 @@
#include <ghoul/opengl/textureconversion.h>
namespace {
const openspace::properties::Property::PropertyInfo TexturePathInfo = {
constexpr openspace::properties::Property::PropertyInfo TexturePathInfo = {
"TexturePath",
"Texture path",
"Sets the path of the texture that is displayed on this screen space plane. If "
@@ -35,7 +35,7 @@
#include <ghoul/opengl/programobject.h>
namespace {
const openspace::properties::Property::PropertyInfo TextureInfo = {
constexpr openspace::properties::Property::PropertyInfo TextureInfo = {
"URL",
"Image URL",
"Sets the URL of the texture that is displayed on this screen space plane. If "
+1 -1
View File
@@ -35,7 +35,7 @@
#include <chrono>
namespace {
const openspace::properties::Property::PropertyInfo ScriptInfo = {
constexpr openspace::properties::Property::PropertyInfo ScriptInfo = {
"Script",
"Script",
"This value is the path to the Lua script that will be executed to compute the "
+1 -1
View File
@@ -28,7 +28,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const openspace::properties::Property::PropertyInfo RotationInfo = {
constexpr openspace::properties::Property::PropertyInfo RotationInfo = {
"Rotation",
"Rotation",
"This value is the used as a 3x3 rotation matrix that is applied to the scene "
+1 -1
View File
@@ -36,7 +36,7 @@
#include <chrono>
namespace {
const openspace::properties::Property::PropertyInfo ScriptInfo = {
constexpr openspace::properties::Property::PropertyInfo ScriptInfo = {
"Script",
"Script",
"This value is the path to the Lua script that will be executed to compute the "
+1 -1
View File
@@ -28,7 +28,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const openspace::properties::Property::PropertyInfo ScaleInfo = {
constexpr openspace::properties::Property::PropertyInfo ScaleInfo = {
"Scale",
"Scale",
"This value is used as a scaling factor for the scene graph node that this "
+1 -1
View File
@@ -37,7 +37,7 @@
#include <chrono>
namespace {
const openspace::properties::Property::PropertyInfo ScriptInfo = {
constexpr openspace::properties::Property::PropertyInfo ScriptInfo = {
"Script",
"Script",
"This value is the path to the Lua script that will be executed to compute the "
@@ -28,7 +28,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const openspace::properties::Property::PropertyInfo PositionInfo = {
constexpr openspace::properties::Property::PropertyInfo PositionInfo = {
"Position",
"Position",
"This value is used as a static offset (in meters) that is applied to the scene "