Replacing const std::string with const char* to reduce binary size and initialization costs

This commit is contained in:
Alexander Bock
2016-11-23 23:52:16 +01:00
parent 7ffcf81235
commit b00595af40
47 changed files with 242 additions and 266 deletions

View File

@@ -35,8 +35,8 @@ namespace {
const std::string _loggerCat = "ModelGeometry";
const std::string keyGeomModelFile = "GeometryFile";
const int8_t CurrentCacheVersion = 3;
const std::string keyType = "Type";
const std::string keyName = "Name";
const char* keyType = "Type";
const char* keyName = "Name";
}
namespace openspace {

View File

@@ -35,66 +35,53 @@ namespace {
}
namespace openspace {
namespace modelgeometry {
namespace modelgeometry {
MultiModelGeometry::MultiModelGeometry(const ghoul::Dictionary& dictionary)
: ModelGeometry(dictionary)
{
loadObj(_file);
}
MultiModelGeometry::MultiModelGeometry(const ghoul::Dictionary& dictionary)
: ModelGeometry(dictionary)
{
loadObj(_file);
}
bool MultiModelGeometry::initialize(Renderable* parent)
{
bool success = ModelGeometry::initialize(parent);
return success;
}
bool MultiModelGeometry::initialize(Renderable* parent) {
bool success = ModelGeometry::initialize(parent);
return success;
}
void MultiModelGeometry::deinitialize()
{
ModelGeometry::deinitialize();
}
void MultiModelGeometry::deinitialize() {
ModelGeometry::deinitialize();
}
bool MultiModelGeometry::loadModel(const std::string& filename)
{
try {
ghoul::io::ModelReaderMultiFormat modelReader;
bool MultiModelGeometry::loadModel(const std::string& filename) {
ghoul::io::ModelReaderMultiFormat modelReader;
std::vector<ghoul::io::ModelReaderBase::Vertex> vertices;
std::vector<int> indices;
std::vector<ghoul::io::ModelReaderBase::Vertex> vertices;
std::vector<int> indices;
modelReader.loadModel(filename, vertices, indices);
modelReader.loadModel(filename, vertices, indices);
_vertices.reserve(vertices.size());
for (const auto & v : vertices)
{
psc p = PowerScaledCoordinate::CreatePowerScaledCoordinate(
v.location[0],
v.location[1],
v.location[2]
);
_vertices.reserve(vertices.size());
for (const auto & v : vertices) {
psc p = PowerScaledCoordinate::CreatePowerScaledCoordinate(
v.location[0],
v.location[1],
v.location[2]
);
Vertex vv;
memcpy(vv.location, v.location, sizeof(GLfloat) * 3);
vv.location[3] = 1.0;
//memcpy(vv.location, glm::value_ptr(p.vec4()), sizeof(GLfloat) * 4);
memcpy(vv.tex, v.tex, sizeof(GLfloat) * 2);
memcpy(vv.normal, v.normal, sizeof(GLfloat) * 3);
_vertices.push_back(vv);
}
Vertex vv;
memcpy(vv.location, v.location, sizeof(GLfloat) * 3);
vv.location[3] = 1.0;
//memcpy(vv.location, glm::value_ptr(p.vec4()), sizeof(GLfloat) * 4);
memcpy(vv.tex, v.tex, sizeof(GLfloat) * 2);
memcpy(vv.normal, v.normal, sizeof(GLfloat) * 3);
_vertices.push_back(vv);
}
_indices.resize(indices.size());
std::copy(indices.begin(), indices.end(), _indices.begin());
}
catch (ghoul::io::ModelReaderBase::ModelReaderException & e)
{
// Log error reading geometry file.
LERROR(e.message);
return false;
}
_indices.resize(indices.size());
std::copy(indices.begin(), indices.end(), _indices.begin());
return true;
}
return true;
}
} // namespace modelgeometry
} // namespace modelgeometry
} // namespace openspace

View File

@@ -29,7 +29,7 @@
namespace {
const std::string _loggerCat = "PlanetGeometry";
const std::string KeyType = "Type";
const char* KeyType = "Type";
}
namespace openspace {

View File

@@ -40,11 +40,11 @@
namespace {
const std::string _loggerCat = "RenderableConstellationBounds";
const std::string keyVertexFile = "File";
const std::string keyConstellationFile = "ConstellationFile";
const std::string keyReferenceFrame = "ReferenceFrame";
const char* keyVertexFile = "File";
const char* keyConstellationFile = "ConstellationFile";
const char* keyReferenceFrame = "ReferenceFrame";
const std::string defaultReferenceFrame = "J2000";
const char* defaultReferenceFrame = "J2000";
float deg2rad(float deg) {
return static_cast<float>((deg / 360.f) * 2.f * M_PI);

View File

@@ -33,11 +33,11 @@
namespace {
const std::string _loggerCat = "RenderableCrawlingLine";
const std::string KeySource = "Source";
const std::string KeyTarget = "Target";
const std::string KeyInstrument = "Instrument";
const std::string KeyReferenceFrame = "Frame";
const std::string keyColor = "RGB";
const char* KeySource = "Source";
const char* KeyTarget = "Target";
const char* KeyInstrument = "Instrument";
const char* KeyReferenceFrame = "Frame";
const char* keyColor = "RGB";
static const int SourcePosition = 0;
static const int TargetPosition = 1;

View File

@@ -42,13 +42,13 @@
namespace {
const std::string _loggerCat = "RenderableModel";
const std::string keyGeometry = "Geometry";
const std::string keyBody = "Body";
const std::string keyStart = "StartTime";
const std::string keyEnd = "EndTime";
const std::string keyFading = "Shading.Fadeable";
const char* keyGeometry = "Geometry";
const char* keyBody = "Body";
const char* keyStart = "StartTime";
const char* keyEnd = "EndTime";
const char* keyFading = "Shading.Fadeable";
const std::string keyModelTransform = "Rotation.ModelTransform";
const char* keyModelTransform = "Rotation.ModelTransform";
//const std::string keyGhosting = "Shading.Ghosting";
}

View File

@@ -42,16 +42,16 @@
namespace {
const std::string _loggerCat = "RenderableTrail";
//constants
const std::string keyName = "Name";
const std::string keyBody = "Body";
const std::string keyObserver = "Observer";
const std::string keyFrame = "Frame";
const std::string keyPathModule = "ModulePath";
const std::string keyColor = "RGB";
const std::string keyTimeSteps = "TimeSteps";
const std::string keyPointSteps = "PointSteps";
const std::string keyDrawLine = "DrawLine";
const std::string keRenderDistanceInterval = "RenderDistanceInterval";
const char* keyName = "Name";
const char* keyBody = "Body";
const char* keyObserver = "Observer";
const char* keyFrame = "Frame";
const char* keyPathModule = "ModulePath";
const char* keyColor = "RGB";
const char* keyTimeSteps = "TimeSteps";
const char* keyPointSteps = "PointSteps";
const char* keyDrawLine = "DrawLine";
const char* keRenderDistanceInterval = "RenderDistanceInterval";
}

View File

@@ -38,14 +38,14 @@
#include <ghoul/opengl/textureunit.h>
namespace {
const std::string _loggerCat = "RenderablePlane";
static const std::string _loggerCat = "RenderablePlane";
const std::string keyFieldlines = "Fieldlines";
const std::string keyFilename = "File";
const std::string keyHints = "Hints";
const std::string keyShaders = "Shaders";
const std::string keyVertexShader = "VertexShader";
const std::string keyFragmentShader = "FragmentShader";
const char* keyFieldlines = "Fieldlines";
const char* keyFilename = "File";
const char* keyHints = "Hints";
const char* keyShaders = "Shaders";
const char* keyVertexShader = "VertexShader";
const char* keyFragmentShader = "FragmentShader";
}
namespace openspace {

View File

@@ -48,17 +48,17 @@
namespace {
const std::string _loggerCat = "RenderablePlanet";
static const std::string _loggerCat = "RenderablePlanet";
const std::string keyFrame = "Frame";
const std::string keyGeometry = "Geometry";
const std::string keyRadius = "Radius";
const std::string keyShading = "PerformShading";
const std::string keyShadowGroup = "Shadow_Group";
const std::string keyShadowSource = "Source";
const std::string keyShadowCaster = "Caster";
const std::string keyPlanetRadius = "PlanetRadius";
const std::string keyBody = "Body";
const char* keyFrame = "Frame";
const char* keyGeometry = "Geometry";
const char* keyRadius = "Radius";
const char* keyShading = "PerformShading";
const char* keyShadowGroup = "Shadow_Group";
const char* keyShadowSource = "Source";
const char* keyShadowCaster = "Caster";
const char* keyPlanetRadius = "PlanetRadius";
const char* keyBody = "Body";
}
namespace openspace {

View File

@@ -36,9 +36,9 @@
#include <ghoul/opengl/textureunit.h>
namespace {
const std::string KeyTexture = "Texture";
const std::string KeySize = "Size";
const std::string KeyOffset = "Offset";
const char* KeyTexture = "Texture";
const char* KeySize = "Size";
const char* KeyOffset = "Offset";
}
namespace openspace {

View File

@@ -36,12 +36,12 @@
#include <math.h>
namespace {
const std::string _loggerCat = "RenderableSphere";
static const std::string _loggerCat = "RenderableSphere";
const std::string keySize = "Size";
const std::string keySegments = "Segments";
const std::string keyTexture = "Texture";
const std::string keyOrientation = "Orientation";
const char* keySize = "Size";
const char* keySegments = "Segments";
const char* keyTexture = "Texture";
const char* keyOrientation = "Orientation";
enum Orientation {
Outside = 1,

View File

@@ -32,13 +32,13 @@
#include <math.h>
namespace {
const std::string _loggerCat = "RenderableSphericalGrid";
const std::string KeyGridType = "GridType";
const std::string KeyGridColor = "GridColor";
const std::string KeyGridMatrix = "GridMatrix";
const std::string KeyGridSegments = "GridSegments";
const std::string KeyGridRadius = "GridRadius";
const std::string KeyGridParentsRotation = "ParentsRotation";
static const std::string _loggerCat = "RenderableSphericalGrid";
const char* KeyGridType = "GridType";
const char* KeyGridColor = "GridColor";
const char* KeyGridMatrix = "GridMatrix";
const char* KeyGridSegments = "GridSegments";
const char* KeyGridRadius = "GridRadius";
const char* KeyGridParentsRotation = "ParentsRotation";
}
namespace openspace {

View File

@@ -41,11 +41,11 @@
#include <stdint.h>
namespace {
const std::string _loggerCat = "RenderableStars";
static const std::string _loggerCat = "RenderableStars";
const std::string KeyFile = "File";
const std::string KeyTexture = "Texture";
const std::string KeyColorMap = "ColorMap";
const char* KeyFile = "File";
const char* KeyTexture = "Texture";
const char* KeyColorMap = "ColorMap";
const int8_t CurrentCacheVersion = 1;

View File

@@ -30,13 +30,13 @@
#include <openspace/scene/translation.h>
namespace {
static const char* KeyTranslation = "Translation";
static const char* KeyColor = "Color";
static const char* KeyEnableFade = "EnableFade";
static const char* KeyFade = "Fade";
static const char* KeyLineWidth = "LineWidth";
static const char* KeyPointSize = "PointSize";
static const char* KeyRendering = "Rendering";
const char* KeyTranslation = "Translation";
const char* KeyColor = "Color";
const char* KeyEnableFade = "EnableFade";
const char* KeyFade = "Fade";
const char* KeyLineWidth = "LineWidth";
const char* KeyPointSize = "PointSize";
const char* KeyRendering = "Rendering";
// The possible values for the _renderingModes property
enum RenderingMode {

View File

@@ -33,10 +33,11 @@
#include <openspace/engine/wrapper/windowwrapper.h>
namespace openspace {
ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary)
:ScreenSpaceRenderable(dictionary)
,_size("size", "Size", glm::vec4(0), glm::vec4(0), glm::vec4(2000))
,_framebuffer(nullptr)
: ScreenSpaceRenderable(dictionary)
, _size("size", "Size", glm::vec4(0), glm::vec4(0), glm::vec4(2000))
, _framebuffer(nullptr)
{
_id = id();
setName("ScreenSpaceFramebuffer" + std::to_string(_id));

View File

@@ -35,9 +35,9 @@
namespace {
const std::string _loggerCat = "ScreenSpaceImage";
const std::string KeyName = "Name";
const std::string KeyTexturePath = "TexturePath";
const std::string KeyUrl = "URL";
const char* KeyName = "Name";
const char* KeyTexturePath = "TexturePath";
const char* KeyUrl = "URL";
}
namespace openspace {

View File

@@ -34,8 +34,8 @@ namespace openspace {
namespace constants {
namespace simplespheregeometry {
const std::string keyRadius = "Radius";
const std::string keySegments = "Segments";
const char* keyRadius = "Radius";
const char* keySegments = "Segments";
} // namespace simplespheregeometry
}

View File

@@ -28,7 +28,7 @@
#include <tiny_obj_loader.h>
namespace {
const std::string _loggerCat = "WavefrontGeometry";
static const std::string _loggerCat = "WavefrontGeometry";
}
namespace openspace {

View File

@@ -33,9 +33,9 @@ namespace {
const std::string _loggerCat = "SpiceRotation";
//const std::string keyGhosting = "EphmerisGhosting";
const std::string KeySourceFrame = "SourceFrame";
const std::string KeyDestinationFrame = "DestinationFrame";
const std::string KeyKernels = "Kernels";
const char* KeySourceFrame = "SourceFrame";
const char* KeyDestinationFrame = "DestinationFrame";
const char* KeyKernels = "Kernels";
}
namespace openspace {

View File

@@ -27,7 +27,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const std::string KeyRotation = "Rotation";
const char* KeyRotation = "Rotation";
}
namespace openspace {

View File

@@ -27,8 +27,8 @@
#include <openspace/documentation/verifier.h>
namespace {
const std::string _loggerCat = "StaticScale";
const std::string KeyValue = "Scale";
const char* _loggerCat = "StaticScale";
const char* KeyValue = "Scale";
}
namespace openspace {

View File

@@ -27,7 +27,7 @@
#include <openspace/documentation/verifier.h>
namespace {
const std::string KeyPosition = "Position";
const char* KeyPosition = "Position";
}
namespace openspace {

View File

@@ -47,11 +47,11 @@
namespace {
const std::string _loggerCat = "PatchRenderer";
const std::string keyFrame = "Frame";
const std::string keyGeometry = "Geometry";
const std::string keyShading = "PerformShading";
const char* keyFrame = "Frame";
const char* keyGeometry = "Geometry";
const char* keyShading = "PerformShading";
const std::string keyBody = "Body";
const char* keyBody = "Body";
}
namespace openspace {

View File

@@ -22,10 +22,6 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/globebrowsing/chunk/culling.h>
#include <modules/globebrowsing/chunk/chunkedlodglobe.h>
#include <modules/globebrowsing/chunk/chunk.h>

View File

@@ -22,7 +22,6 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/globebrowsing/geometry/aabb.h>
#include <string>

View File

@@ -28,8 +28,6 @@
#include <ghoul/misc/assert.h>
namespace {
const std::string _loggerCat = "Geodetic2";
}

View File

@@ -39,27 +39,22 @@
// ghoul includes
#include <ghoul/misc/assert.h>
namespace {
const std::string _loggerCat = "RenderableGlobe";
// Keys for the dictionary
const std::string keyFrame = "Frame";
const std::string keyRadii = "Radii";
const std::string keyInteractionDepthBelowEllipsoid = "InteractionDepthBelowEllipsoid";
const std::string keyCameraMinHeight = "CameraMinHeight";
const std::string keySegmentsPerPatch = "SegmentsPerPatch";
const std::string keyTextureInitData = "TextureInitData";
const std::string keyTextures = "Textures";
const std::string keyColorTextures = "ColorTextures";
const std::string keyHeightMaps = "HeightMaps";
const char* keyFrame = "Frame";
const char* keyRadii = "Radii";
const char* keyInteractionDepthBelowEllipsoid = "InteractionDepthBelowEllipsoid";
const char* keyCameraMinHeight = "CameraMinHeight";
const char* keySegmentsPerPatch = "SegmentsPerPatch";
const char* keyTextureInitData = "TextureInitData";
const char* keyTextures = "Textures";
const char* keyColorTextures = "ColorTextures";
const char* keyHeightMaps = "HeightMaps";
}
namespace openspace {
RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
: _isEnabled(properties::BoolProperty("Enabled", "Enabled", true))
, _toggleEnabledEveryFrame(properties::BoolProperty("Toggle enabled every frame", "Toggle enabled every frame", false))

View File

@@ -35,11 +35,11 @@
namespace {
const std::string _loggerCat = "CachingTileProvider";
const std::string KeyDoPreProcessing = "DoPreProcessing";
const std::string KeyMinimumPixelSize = "MinimumPixelSize";
const std::string KeyFilePath = "FilePath";
const std::string KeyCacheSize = "CacheSize";
const std::string KeyFlushInterval = "FlushInterval";
const char* KeyDoPreProcessing = "DoPreProcessing";
const char* KeyMinimumPixelSize = "MinimumPixelSize";
const char* KeyFilePath = "FilePath";
const char* KeyCacheSize = "CacheSize";
const char* KeyFlushInterval = "FlushInterval";
}
namespace openspace {
@@ -54,7 +54,7 @@ namespace openspace {
// 1. Get required Keys
std::string filePath;
if (!dictionary.getValue<std::string>(KeyFilePath, filePath)) {
throw std::runtime_error("Must define key '" + KeyFilePath + "'");
throw std::runtime_error(std::string("Must define key '") + KeyFilePath + "'");
}
// 2. Initialize default values for any optional Keys

View File

@@ -35,7 +35,7 @@
namespace {
const std::string _loggerCat = "SingleImageProvider";
const std::string KeyFilePath = "FilePath";
const char* KeyFilePath = "FilePath";
}
namespace openspace {
@@ -43,7 +43,7 @@ namespace openspace {
SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) {
// Required input
if (!dictionary.getValue<std::string>(KeyFilePath, _imagePath)) {
throw std::runtime_error("Must define key '" + KeyFilePath + "'");
throw std::runtime_error(std::string("Must define key '") + KeyFilePath + "'");
}
reset();

View File

@@ -48,11 +48,11 @@
namespace {
const std::string _loggerCat = "TemporalTileProvider";
const std::string KeyDoPreProcessing = "DoPreProcessing";
const std::string KeyMinimumPixelSize = "MinimumPixelSize";
const std::string KeyFilePath = "FilePath";
const std::string KeyCacheSize = "CacheSize";
const std::string KeyFlushInterval = "FlushInterval";
const char* KeyDoPreProcessing = "DoPreProcessing";
const char* KeyMinimumPixelSize = "MinimumPixelSize";
const char* KeyFilePath = "FilePath";
const char* KeyCacheSize = "CacheSize";
const char* KeyFlushInterval = "FlushInterval";
}
@@ -71,7 +71,7 @@ namespace openspace {
{
if (!dictionary.getValue<std::string>(KeyFilePath, _datasetFile)) {
throw std::runtime_error("Must define key '" + KeyFilePath + "'");
throw std::runtime_error(std::string("Must define key '") + KeyFilePath + "'");
}

View File

@@ -32,7 +32,7 @@
namespace {
const std::string _loggerCat = "TileProvider";
const std::string KeyType = "Type";
const char* KeyType = "Type";
}

View File

@@ -32,11 +32,11 @@
namespace {
const std::string _loggerCat = "RenderableCrawlingLine";
const std::string KeySource = "Source";
const std::string KeyTarget = "Target";
const std::string KeyInstrument = "Instrument";
const std::string KeyReferenceFrame = "Frame";
const std::string keyColor = "RGB";
const char* KeySource = "Source";
const char* KeyTarget = "Target";
const char* KeyInstrument = "Instrument";
const char* KeyReferenceFrame = "Frame";
const char* KeyColor = "RGB";
static const int SourcePosition = 0;
static const int TargetPosition = 1;
@@ -59,10 +59,12 @@ RenderableCrawlingLine::RenderableCrawlingLine(const ghoul::Dictionary& dictiona
dictionary.getValue(KeyReferenceFrame, _referenceFrame);
if (dictionary.hasKeyAndValue<glm::vec3>(keyColor))
dictionary.getValue(keyColor, _lineColor);
else
if (dictionary.hasKeyAndValue<glm::vec3>(KeyColor)) {
dictionary.getValue(KeyColor, _lineColor);
}
else {
_lineColor = glm::vec3(1);
}
}
bool RenderableCrawlingLine::isReady() const {

View File

@@ -38,15 +38,15 @@
namespace {
const std::string _loggerCat = "RenderableFov";
const std::string keyBody = "Body";
const std::string keyFrame = "Frame";
const std::string keyPathModule = "ModulePath";
const std::string keyColor = "RGB";
const std::string keyInstrument = "Instrument.Name";
const std::string keyInstrumentMethod = "Instrument.Method";
const std::string keyInstrumentAberration = "Instrument.Aberration";
const std::string keyPotentialTargets = "PotentialTargets";
const std::string keyFrameConversions = "FrameConversions";
const char* keyBody = "Body";
const char* keyFrame = "Frame";
const char* keyPathModule = "ModulePath";
const char* keyColor = "RGB";
const char* keyInstrument = "Instrument.Name";
const char* keyInstrumentMethod = "Instrument.Method";
const char* keyInstrumentAberration = "Instrument.Aberration";
const char* keyPotentialTargets = "PotentialTargets";
const char* keyFrameConversions = "FrameConversions";
const int InterpolationSteps = 10;
const int Stride = 8;

View File

@@ -37,15 +37,15 @@
namespace {
const std::string _loggerCat = "RenderableModelProjection";
const std::string keySource = "Rotation.Source";
const std::string keyDestination = "Rotation.Destination";
const std::string keyGeometry = "Geometry";
const std::string keyProjection = "Projection";
const std::string keyBoundingSphereRadius = "BoundingSphereRadius";
const char* keySource = "Rotation.Source";
const char* keyDestination = "Rotation.Destination";
const char* keyGeometry = "Geometry";
const char* keyProjection = "Projection";
const char* keyBoundingSphereRadius = "BoundingSphereRadius";
const std::string keyTextureColor = "Textures.Color";
const char* keyTextureColor = "Textures.Color";
const std::string _destination = "GALACTIC";
const char* _destination = "GALACTIC";
}
namespace openspace {

View File

@@ -41,13 +41,13 @@
namespace {
const std::string _loggerCat = "RenderablePlaneProjection";
const std::string KeySpacecraft = "Spacecraft";
const std::string KeyInstrument = "Instrument";
const std::string KeyMoving = "Moving";
const std::string KeyTexture = "Texture";
const std::string KeyName = "Name";
const std::string KeyTarget = "DefaultTarget";
const std::string GalacticFrame = "GALACTIC";
const char* KeySpacecraft = "Spacecraft";
const char* KeyInstrument = "Instrument";
const char* KeyMoving = "Moving";
const char* KeyTexture = "Texture";
const char* KeyName = "Name";
const char* KeyTarget = "DefaultTarget";
const char* GalacticFrame = "GALACTIC";
const double REALLY_FAR = 99999999999;
}

View File

@@ -46,15 +46,14 @@
namespace {
const std::string _loggerCat = "RenderablePlanetProjection";
const std::string keyGeometry = "Geometry";
const std::string keyProjection = "Projection";
const std::string keyColorTexture = "Textures.Color";
const std::string keyHeightTexture = "Textures.Height";
const char* keyGeometry = "Geometry";
const char* keyProjection = "Projection";
const char* keyColorTexture = "Textures.Color";
const char* keyHeightTexture = "Textures.Height";
const std::string keyRadius = "Geometry.Radius";
const std::string keyShading = "PerformShading";
const std::string _mainFrame = "GALACTIC";
const char* keyRadius = "Geometry.Radius";
const char* keyShading = "PerformShading";
const char* _mainFrame = "GALACTIC";
}
namespace openspace {

View File

@@ -35,13 +35,13 @@
namespace {
const std::string _loggerCat = "RenderablePlane";
const std::string KeyType = "TerminatorType";
const std::string KeyLightSource = "LightSource";
const std::string KeyObserver = "Observer";
const std::string KeyBody = "Body";
const std::string KeyBodyFrame = "BodyFrame";
const std::string KeyMainFrame = "MainFrame";
const std::string KeyAberration = "Aberration";
const char* KeyType = "TerminatorType";
const char* KeyLightSource = "LightSource";
const char* KeyObserver = "Observer";
const char* KeyBody = "Body";
const char* KeyBodyFrame = "BodyFrame";
const char* KeyMainFrame = "MainFrame";
const char* KeyAberration = "Aberration";
}
namespace openspace {

View File

@@ -30,7 +30,7 @@
#include <ghoul/misc/exception.h>
namespace {
const std::string _loggerCat = "Decoder";
const std::string _loggerCat = "Decoder";
}
namespace openspace {

View File

@@ -42,7 +42,7 @@
namespace {
const std::string _loggerCat = "HongKangParser";
const std::string keyTranslation = "DataInputTranslation";
const char* keyTranslation = "DataInputTranslation";
const std::string PlaybookIdentifierName = "HongKang";
}

View File

@@ -37,7 +37,7 @@
#include <limits>
namespace {
const std::string _loggerCat = "ImageSequencer";
const std::string _loggerCat = "ImageSequencer";
}
namespace openspace {

View File

@@ -29,9 +29,9 @@
namespace {
const std::string _loggerCat = "InstrumentDecoder";
const std::string keyDetector = "DetectorType";
const std::string keySpice = "Spice";
const std::string keyStopCommand = "StopCommand";
const char* keyDetector = "DetectorType";
const char* keySpice = "Spice";
const char* keyStopCommand = "StopCommand";
}
namespace openspace {

View File

@@ -39,11 +39,11 @@
namespace {
const std::string _loggerCat = "InstrumentTimesParser";
const std::string PlaybookIdentifierName = "InstrumentTimesParser";
const std::string KeyTargetBody = "Target.Body";
const std::string KeyInstruments = "Instruments";
const std::string KeyInstrument = "Instrument";
const std::string KeyInstrumentFiles = "Files";
const char* PlaybookIdentifierName = "InstrumentTimesParser";
const char* KeyTargetBody = "Target.Body";
const char* KeyInstruments = "Instruments";
const char* KeyInstrument = "Instrument";
const char* KeyInstrumentFiles = "Files";
}
namespace openspace {

View File

@@ -39,13 +39,12 @@
#include <iomanip>
#include <limits>
namespace {
const std::string _loggerCat = "LabelParser";
const std::string keySpecs = "Read";
const std::string keyConvert = "Convert";
const char* keySpecs = "Read";
const char* keyConvert = "Convert";
const std::string PlaybookIdentifierName = "LabelParser";
const char* PlaybookIdentifierName = "LabelParser";
}
namespace openspace {

View File

@@ -40,34 +40,34 @@
#include <ghoul/systemcapabilities/openglcapabilitiescomponent.h>
namespace {
const std::string keyPotentialTargets = "PotentialTargets";
const char* keyPotentialTargets = "PotentialTargets";
const std::string keyInstrument = "Instrument.Name";
const std::string keyInstrumentFovy = "Instrument.Fovy";
const std::string keyInstrumentAspect = "Instrument.Aspect";
const char* keyInstrument = "Instrument.Name";
const char* keyInstrumentFovy = "Instrument.Fovy";
const char* keyInstrumentAspect = "Instrument.Aspect";
const std::string keyTranslation = "DataInputTranslation";
const char* keyTranslation = "DataInputTranslation";
const std::string keyProjObserver = "Observer";
const std::string keyProjTarget = "Target";
const std::string keyProjAberration = "Aberration";
const char* keyProjObserver = "Observer";
const char* keyProjTarget = "Target";
const char* keyProjAberration = "Aberration";
const std::string keySequenceDir = "Sequence";
const std::string keySequenceType = "SequenceType";
const char* keySequenceDir = "Sequence";
const char* keySequenceType = "SequenceType";
const std::string keyNeedsTextureMapDilation = "TextureMap";
const std::string keyNeedsShadowing = "ShadowMap";
const std::string keyTextureMapAspectRatio = "AspectRatio";
const char* keyNeedsTextureMapDilation = "TextureMap";
const char* keyNeedsShadowing = "ShadowMap";
const char* keyTextureMapAspectRatio = "AspectRatio";
const std::string sequenceTypeImage = "image-sequence";
const std::string sequenceTypePlaybook = "playbook";
const std::string sequenceTypeHybrid = "hybrid";
const std::string sequenceTypeInstrumentTimes = "instrument-times";
const char* sequenceTypeImage = "image-sequence";
const char* sequenceTypePlaybook = "playbook";
const char* sequenceTypeHybrid = "hybrid";
const char* sequenceTypeInstrumentTimes = "instrument-times";
const std::string placeholderFile =
const char* placeholderFile =
"${OPENSPACE_DATA}/scene/common/textures/placeholder.png";
const std::string _loggerCat = "ProjectionComponent";
const char* _loggerCat = "ProjectionComponent";
}
namespace openspace {

View File

@@ -32,9 +32,9 @@
namespace {
const std::string _loggerCat = "SequenceParser";
const std::string keyTranslation = "DataInputTranslation";
const char* keyTranslation = "DataInputTranslation";
const std::string PlaybookIdentifierName = "Playbook";
const char* PlaybookIdentifierName = "Playbook";
}
namespace openspace {
@@ -79,7 +79,7 @@ void writeToBuffer<std::string>(std::vector<char>& buffer, size_t& currentWriteL
}
void SequenceParser::sendPlaybookInformation(const std::string& name) {
std::string fullName = PlaybookIdentifierName + "_" + name;
std::string fullName = std::string(PlaybookIdentifierName) + "_" + name;
_messageIdentifier = OsEng.networkEngine().identifier(fullName);
std::vector<char> buffer(1024);

View File

@@ -44,8 +44,8 @@
namespace {
const std::string _loggerCat = "GUI";
const std::string configurationFile = "imgui.ini";
const std::string GuiFont = "${FONTS}/Roboto/Roboto-Regular.ttf";
const char* configurationFile = "imgui.ini";
const char* GuiFont = "${FONTS}/Roboto/Roboto-Regular.ttf";
const ImVec2 size = ImVec2(350, 500);
//GLuint fontTex = 0;

View File

@@ -33,9 +33,9 @@
#include <openspace/rendering/renderable.h>
namespace {
const std::string GlslRaycastPath = "${MODULES}/toyvolume/shaders/raycast.glsl";
const std::string GlslBoundsVsPath = "${MODULES}/toyvolume/shaders/boundsvs.glsl";
const std::string GlslBoundsFsPath = "${MODULES}/toyvolume/shaders/boundsfs.glsl";
const char* GlslRaycastPath = "${MODULES}/toyvolume/shaders/raycast.glsl";
const char* GlslBoundsVsPath = "${MODULES}/toyvolume/shaders/boundsvs.glsl";
const char* GlslBoundsFsPath = "${MODULES}/toyvolume/shaders/boundsfs.glsl";
}
namespace openspace {