Change RenderableModel "Rotation.ModelTransform" to "ModelTransform"

Add Property descriptions to the documentation file
Remove update method from StaticTranslation
Remove spelling error in RenderableGlobe
Remove rotation from renderablemodel projection
Fix setting the Origin through the GUI
Reorder Optional and documentation arguments for DocumentationEntry, and making Optional a non-optional argument
This commit is contained in:
Alexander Bock
2017-07-26 21:40:59 -04:00
parent 02ce2a1b2a
commit 19f8e30813
56 changed files with 491 additions and 492 deletions
+14 -14
View File
@@ -48,7 +48,7 @@ RosettaKernels = {
"${OPENSPACE_DATA}/spice/Rosetta/PCK/ROS_CGS_RSOC_V03.TPC",
}
RotationMatrix = {
local RotationMatrix = {
0, 1, 0,
0, 0, 1,
1, 0, 0
@@ -99,7 +99,7 @@ return {
Type = "simple",
Color = "textures/foil_silver_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
{
@@ -116,7 +116,7 @@ return {
Type = "simple",
Color = "textures/foil_silver_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
{
@@ -133,7 +133,7 @@ return {
Type = "simple",
Color = "textures/dish_AO.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
},
-- Transform = {
@@ -158,7 +158,7 @@ return {
Type = "simple",
Color = "textures/parts2_AO.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -176,7 +176,7 @@ return {
Type = "simple",
Color = "textures/foil_silver_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -194,7 +194,7 @@ return {
Type = "simple",
Color = "textures/tex_01.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -212,7 +212,7 @@ return {
Type = "simple",
Color = "textures/tex_01.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
},
-- Transform = {
@@ -237,7 +237,7 @@ return {
Type = "simple",
Color = "textures/tex_01.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
},
-- Transform = {
@@ -262,7 +262,7 @@ return {
Type = "simple",
Color = "textures/foil_gold_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -304,7 +304,7 @@ return {
Type = "simple",
Color = "textures/foil_silver_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -322,7 +322,7 @@ return {
Type = "simple",
Color = "textures/parts2_AO.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -340,7 +340,7 @@ return {
Type = "simple",
Color = "textures/foil_silver_ramp.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
@@ -358,7 +358,7 @@ return {
Type = "simple",
Color = "textures/tex_01.png"
},
Rotation = { ModelTransform = RotationMatrix }
ModelTransform = RotationMatrix
}
},
{
+4
View File
@@ -57,6 +57,10 @@
font-size: 0.9em;
}
.documentation-documentation {
font-size: 0.9em;
}
.documentation-container {
font-size: 1.2em;
}
+1
View File
@@ -10,6 +10,7 @@
<p class="documentation-description">{{fullyQualifiedId}}
<a class="documentation-small" onclick="copyTextToClipboard('{{fullyQualifiedId}}')">copy</a>
</p>
<p class="documentation-documentation">{{description}}</p>
</div>
</div>
</div>
@@ -162,7 +162,7 @@ struct DocumentationEntry {
* \pre \p verifier must not be nullptr
*/
DocumentationEntry(std::string key, std::shared_ptr<Verifier> verifier,
std::string doc = "", Optional optional = Optional::No);
Optional optional, std::string doc = "");
/**
* The constructor for a DocumentationEntry describing a \p key in a Documentation.
@@ -185,8 +185,8 @@ struct DocumentationEntry {
* \pre \p key must not be empty
* \pre \p verifier must not be nullptr
*/
DocumentationEntry(std::string key, Verifier* verifier, std::string doc = "",
Optional optional = Optional::No);
DocumentationEntry(std::string key, Verifier* verifier, Optional optional,
std::string doc = "");
/// The key that is described by this DocumentationEntry
std::string key;
+4 -4
View File
@@ -55,16 +55,16 @@ documentation:: Documentation ModelGeometry::Documentation() {
{
KeyType,
new StringVerifier,
"The type of the Model Geometry that should be generated",
Optional::No
Optional::No,
"The type of the Model Geometry that should be generated"
},
{
KeyGeomModelFile,
new StringVerifier,
Optional::No,
"The file that should be loaded in this ModelGeometry. The file can "
"contain filesystem tokens or can be specified relatively to the "
"location of the .mod file.",
Optional::No
"location of the .mod file."
}
}
};
+20 -15
View File
@@ -42,10 +42,10 @@
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/textureunit.h>
namespace {
namespace {
const char* KeyGeometry = "Geometry";
const char* KeyTexture = "Textures.Color";
const char* KeyModelTransform = "Rotation.ModelTransform";
const char* KeyModelTransform = "ModelTransform";
static const openspace::properties::Property::PropertyInfo TextureInfo = {
"ColorTexture", // @TODO replace with only "Texture"
@@ -60,6 +60,13 @@ namespace {
"This value determines whether this model should be shaded by using the position "
"of the Sun."
};
static const openspace::properties::Property::PropertyInfo ModelTransformInfo = {
"ModelTransform",
"Model Transform",
"This value specifies the model transform that is applied to the model before "
"all other transformations are applied."
};
} // namespace
namespace openspace {
@@ -73,27 +80,26 @@ documentation::Documentation RenderableModel::Documentation() {
{
KeyGeometry,
new ReferencingVerifier("base_geometry_model"),
"This specifies the model that is rendered by the Renderable.",
Optional::No
Optional::No,
"This specifies the model that is rendered by the Renderable."
},
{
KeyTexture, // @TODO replace with TextureInfo.identifier
new StringVerifier,
TextureInfo.description,
Optional::Yes
Optional::Yes,
TextureInfo.description
},
{
ShadingInfo.identifier,
new BoolVerifier,
ShadingInfo.description,
Optional::Yes
Optional::Yes,
ShadingInfo.description
},
{
KeyModelTransform,
ModelTransformInfo.identifier,
new DoubleMatrix3Verifier,
"Specifies a distinct transformation matrix that is applied to the "
"model. If it is not specified, it is equal to the Identity matrix.",
Optional::Yes
Optional::Yes,
ModelTransformInfo.description
}
}
};
@@ -104,9 +110,9 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
, _geometry(nullptr)
, _colorTexturePath(TextureInfo)
, _performShading(ShadingInfo, true)
, _modelTransform(ModelTransformInfo, glm::mat3(1.0))
, _programObject(nullptr)
, _texture(nullptr)
, _modelTransform(1.0)
{
ghoul_precondition(
dictionary.hasKeyAndValue<std::string>(SceneGraphNode::KeyName),
@@ -187,7 +193,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
glm::dmat4 modelTransform =
glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * // Translation
glm::dmat4(data.modelTransform.rotation) * // Spice rotation
glm::dmat4(glm::scale(glm::dmat4(_modelTransform), glm::dvec3(data.modelTransform.scale)));
glm::dmat4(glm::scale(glm::dmat4(_modelTransform.value()), glm::dvec3(data.modelTransform.scale)));
glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() * modelTransform;
glm::vec3 directionToSun = glm::normalize(_sunPos - data.modelTransform.translation);
@@ -197,7 +203,6 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
_programObject->setUniform("modelViewTransform", glm::mat4(modelViewTransform));
_programObject->setUniform("projectionTransform", data.camera.projectionMatrix());
_programObject->setUniform("performShading", _performShading);
_programObject->setUniform("fading", 1.f); // @TODO remove this
_geometry->setUniforms(*_programObject);
+2 -2
View File
@@ -28,9 +28,9 @@
#include <openspace/rendering/renderable.h>
#include <openspace/properties/stringproperty.h>
#include <openspace/properties/matrix/mat3property.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/properties/vector/vec3property.h>
#include <memory>
@@ -69,11 +69,11 @@ private:
properties::StringProperty _colorTexturePath;
properties::BoolProperty _performShading;
properties::Mat3Property _modelTransform;
std::unique_ptr<ghoul::opengl::ProgramObject> _programObject;
std::unique_ptr<ghoul::opengl::Texture> _texture;
glm::dmat3 _modelTransform;
glm::dvec3 _sunPos;
};
+6 -6
View File
@@ -82,26 +82,26 @@ documentation::Documentation RenderablePlane::Documentation() {
{
SizeInfo.identifier,
new DoubleVerifier,
SizeInfo.description,
Optional::No
Optional::No,
SizeInfo.description
},
{
BillboardInfo.identifier,
new BoolVerifier,
BillboardInfo.description,
Optional::Yes
Optional::Yes,
BillboardInfo.description
},
{
BlendModeInfo.identifier,
new StringInListVerifier({ "Normal", "Additive" }),
Optional::Yes,
BlendModeInfo.description, // + " The default value is 'Normal'.",
Optional::Yes
},
{
TextureInfo.identifier,
new StringVerifier,
Optional::No,
TextureInfo.description,
Optional::No
}
}
};
+10 -10
View File
@@ -92,32 +92,32 @@ documentation::Documentation RenderableSphere::Documentation() {
{
SizeInfo.identifier,
new DoubleVerifier,
SizeInfo.description,
Optional::No
Optional::No,
SizeInfo.description
},
{
SegmentsInfo.identifier,
new IntVerifier,
SegmentsInfo.description,
Optional::No
Optional::No,
SegmentsInfo.description
},
{
TextureInfo.identifier,
new StringVerifier,
TextureInfo.description,
Optional::No
Optional::No,
TextureInfo.description
},
{
OrientationInfo.identifier,
new StringInListVerifier({ "Inside", "Outside", "Inside/Outside" }),
OrientationInfo.description,
Optional::Yes
Optional::Yes,
OrientationInfo.description
},
{
TransparencyInfo.identifier,
new DoubleInRangeVerifier(0.0, 1.0),
TransparencyInfo.description,
Optional::Yes
Optional::Yes,
TransparencyInfo.description
}
}
};
+14 -14
View File
@@ -111,39 +111,39 @@ documentation::Documentation RenderableTrail::Documentation() {
{
KeyTranslation,
new ReferencingVerifier("core_transform_translation"),
Optional::No,
"This object is used to compute locations along the path. Any "
"Translation object can be used here.",
Optional::No
"Translation object can be used here."
},
{
LineColorInfo.identifier,
new DoubleVector3Verifier,
LineColorInfo.description,
Optional::No
Optional::No,
LineColorInfo.description
},
{
EnableFadeInfo.identifier,
new BoolVerifier,
EnableFadeInfo.description,
Optional::Yes
Optional::Yes,
EnableFadeInfo.description
},
{
FadeInfo.identifier,
new DoubleVerifier,
FadeInfo.description,
Optional::Yes
Optional::Yes,
FadeInfo.description
},
{
LineWidthInfo.identifier,
new DoubleVerifier,
LineWidthInfo.description,
Optional::Yes
Optional::Yes,
LineWidthInfo.description
},
{
PointSizeInfo.identifier,
new DoubleVerifier,
PointSizeInfo.description,
Optional::Yes
Optional::Yes,
PointSizeInfo.description
},
{
RenderingModeInfo.identifier,
@@ -151,8 +151,8 @@ documentation::Documentation RenderableTrail::Documentation() {
// Taken from the RenderingModeConversion map above
{ "Lines", "Points", "Lines+Points", "Points+Lines" }
),
RenderingModeInfo.description,
Optional::Yes
Optional::Yes,
RenderingModeInfo.description
}
},
Exhaustive::No
@@ -112,14 +112,14 @@ documentation::Documentation RenderableTrailOrbit::Documentation() {
{
PeriodInfo.identifier,
new DoubleVerifier,
PeriodInfo.description,
Optional::No
Optional::No,
PeriodInfo.description
},
{
ResolutionInfo.identifier,
new IntVerifier,
ResolutionInfo.description,
Optional::No
Optional::No,
ResolutionInfo.description
}
}
};
@@ -97,32 +97,32 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() {
{
StartTimeInfo.identifier,
new StringAnnotationVerifier("A valid date in ISO 8601 format"),
StartTimeInfo.description,
Optional::No
Optional::No,
StartTimeInfo.description
},
{
EndTimeInfo.identifier,
new StringAnnotationVerifier("A valid date in ISO 8601 format"),
EndTimeInfo.description,
Optional::No
Optional::No,
EndTimeInfo.description
},
{
SampleIntervalInfo.identifier,
new DoubleVerifier,
SampleIntervalInfo.description,
Optional::No
Optional::No,
SampleIntervalInfo.description
},
{
TimeSubSampleInfo.identifier,
new IntVerifier,
TimeSubSampleInfo.description,
Optional::Yes
Optional::Yes,
TimeSubSampleInfo.description
},
{
RenderFullPathInfo.identifier,
new BoolVerifier,
RenderFullPathInfo.description,
Optional::Yes
Optional::Yes,
RenderFullPathInfo.description
}
}
};
+4 -4
View File
@@ -61,15 +61,15 @@ documentation::Documentation ScreenSpaceImage::Documentation() {
{
KeyName,
new StringVerifier,
"Specifies the GUI name of the ScreenspaceImage",
Optional::Yes
Optional::Yes,
"Specifies the GUI name of the ScreenspaceImage"
},
{
KeyTexturePath,
new StringVerifier,
Optional::Yes,
"Specifies the image that is shown on the screenspace-aligned plane. If "
"this value is set and the URL is not, the disk image is used.",
Optional::Yes
"this value is set and the URL is not, the disk image is used."
}
}
};
+2 -3
View File
@@ -47,7 +47,6 @@ documentation::Documentation StaticRotation::Documentation() {
{
"Type",
new StringEqualVerifier("StaticRotation"),
"",
Optional::No
},
{
@@ -56,9 +55,9 @@ documentation::Documentation StaticRotation::Documentation() {
new DoubleVector3Verifier(),
new DoubleMatrix3Verifier()
),
Optional::No,
"Stores the static rotation as either a vector containing Euler angles "
"or by specifiying the 3x3 rotation matrix directly",
Optional::No
"or by specifiying the 3x3 rotation matrix directly"
}
},
Exhaustive::Yes
+2 -2
View File
@@ -47,8 +47,8 @@ documentation::Documentation StaticScale::Documentation() {
{
ScaleInfo.identifier,
new DoubleVerifier,
ScaleInfo.description,
Optional::No
Optional::No,
ScaleInfo.description
}
}
};
+1 -2
View File
@@ -29,7 +29,6 @@ in vec3 vs_normalViewSpace;
in vec4 vs_positionCameraSpace;
in float vs_screenSpaceDepth;
uniform float fading;
uniform bool performShading = true;
uniform vec3 directionToSunViewSpace;
uniform sampler2D texture1;
@@ -69,7 +68,7 @@ Fragment getFragment() {
frag.color.rgb = diffuseAlbedo;
}
frag.color.a = fading;
frag.color.a = 1.0;
frag.depth = vs_screenSpaceDepth;
return frag;
@@ -47,14 +47,13 @@ documentation::Documentation StaticTranslation::Documentation() {
{
"Type",
new StringEqualVerifier("StaticTranslation"),
"",
Optional::No
},
{
PositionInfo.identifier,
new DoubleVector3Verifier,
PositionInfo.description,
Optional::No
Optional::No,
PositionInfo.description
}
},
Exhaustive::Yes
@@ -89,6 +88,4 @@ glm::dvec3 StaticTranslation::position() const {
return _position;
}
void StaticTranslation::update(const UpdateData&) {}
} // namespace openspace
@@ -38,7 +38,6 @@ public:
StaticTranslation();
StaticTranslation(const ghoul::Dictionary& dictionary);
virtual glm::dvec3 position() const;
virtual void update(const UpdateData& data) override;
static documentation::Documentation Documentation();
@@ -89,28 +89,28 @@ documentation::Documentation RenderableDebugPlane::Documentation() {
{
TextureInfo.identifier,
new IntVerifier,
TextureInfo.description,
Optional::Yes
Optional::Yes,
TextureInfo.description
},
{
BillboardInfo.identifier,
new BoolVerifier,
BillboardInfo.description,
Optional::Yes
Optional::Yes,
BillboardInfo.description
},
{
SizeInfo.identifier,
new DoubleVerifier,
SizeInfo.description,
Optional::Yes
Optional::Yes,
SizeInfo.description
},
{
OriginInfo.identifier,
new StringInListVerifier(
{ "LowerLeft", "LowerRight", "UpperLeft", "UpperRight", "Center" }
),
OriginInfo.description,
Optional::Yes
Optional::Yes,
OriginInfo.description
}
},
Exhaustive::Yes
@@ -199,8 +199,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
// Init layer manager
ghoul::Dictionary layersDictionary;
if (!dictionary.getValue(keyLayers, layersDictionary)) {
throw ghoul::RuntimeError(
std::string(keyLayers) + " must be specified specified!");
throw ghoul::RuntimeError(std::string(keyLayers) + " must be specified");
}
_layerManager = std::make_shared<LayerManager>(layersDictionary);
@@ -145,16 +145,19 @@ documentation::Documentation KameleonDocumentationTask::documentation() {
{
"Type",
new StringEqualVerifier("KameleonDocumentationTask"),
Optional::No,
"The type of this task"
},
{
KeyInput,
new StringAnnotationVerifier("A file path to a cdf file"),
Optional::No,
"The cdf file to extract data from"
},
{
KeyOutput,
new StringAnnotationVerifier("A valid filepath"),
Optional::No,
"The html file to write documentation to"
}
}
@@ -79,16 +79,19 @@ documentation::Documentation KameleonMetadataToJsonTask::documentation() {
{
"Type",
new StringEqualVerifier("KameleonMetadataToJsonTask"),
Optional::No,
"The type of this task"
},
{
KeyInput,
new StringAnnotationVerifier("A file path to a cdf file"),
Optional::No,
"The cdf file to extract data from"
},
{
KeyOutput,
new StringAnnotationVerifier("A valid filepath"),
Optional::No,
"The json file to export data into"
}
}
@@ -61,22 +61,22 @@ documentation::Documentation RenderableCrawlingLine::Documentation() {
{
KeySource,
new StringVerifier,
Optional::No,
"Denotes the SPICE name of the source of the renderable crawling line, "
"for example, the space craft",
Optional::No
"for example, the space craft"
},
{
KeyTarget,
new StringVerifier,
"Denotes the SPICE name of the target of the crawling line",
Optional::Yes
Optional::Yes,
"Denotes the SPICE name of the target of the crawling line"
},
{
KeyInstrument,
new StringVerifier,
Optional::No,
"Denotes the SPICE name of the instrument that is used to render the "
"crawling line",
Optional::No
"crawling line"
},
{
KeyColor,
@@ -85,22 +85,22 @@ documentation::Documentation RenderableCrawlingLine::Documentation() {
{
KeyColorStart,
new DoubleVector4Verifier,
Optional::No,
"The color at the start of the line",
Optional::No
},
{
KeyColorEnd,
new DoubleVector4Verifier,
"The color at the end of the line",
Optional::No
Optional::No,
"The color at the end of the line"
}
},
Exhaustive::Yes
}),
Optional::No,
"Specifies the colors that are used for the crawling line. One value "
"determines the starting color of the line, the second value is the "
"color at the end of the line.",
Optional::No
"color at the end of the line."
}
}
};
+20 -19
View File
@@ -143,16 +143,16 @@ documentation::Documentation RenderableFov::Documentation() {
{
KeyBody,
new StringVerifier,
Optional::No,
"The SPICE name of the source body for which the field of view should be "
"rendered.",
Optional::No
"rendered."
},
{
KeyFrame,
new StringVerifier,
Optional::No,
"The SPICE name of the source body's frame in which the field of view "
"should be rendered.",
Optional::No
"should be rendered."
},
{
KeyInstrument,
@@ -160,8 +160,8 @@ documentation::Documentation RenderableFov::Documentation() {
{
KeyInstrumentName,
new StringVerifier,
"The SPICE name of the instrument that is rendered",
Optional::No
Optional::No,
"The SPICE name of the instrument that is rendered"
},
{
KeyInstrumentAberration,
@@ -173,45 +173,46 @@ documentation::Documentation RenderableFov::Documentation() {
"XLT", "XLT+S",
"XCN", "XCN+S"
}),
Optional::Yes,
"The aberration correction that is used for this field of view. "
"The default is 'NONE'.",
Optional::Yes
"The default is 'NONE'."
}
}),
Optional::No,
"A table describing the instrument whose field of view should be "
"rendered.",
Optional::No
"rendered."
},
{
KeyPotentialTargets,
new StringListVerifier,
Optional::No,
"A list of potential targets (specified as SPICE names) that the field "
"of view should be tested against.",
Optional::No
"of view should be tested against."
},
{
KeyFrameConversions,
new TableVerifier({
{
DocumentationEntry::Wildcard,
new StringVerifier
new StringVerifier,
Optional::No
}
}),
Optional::Yes,
"A list of frame conversions that should be registered with the "
"SpiceManager.",
Optional::Yes
"SpiceManager."
},
{
LineWidthInfo.identifier,
new DoubleVerifier,
LineWidthInfo.description,
Optional::Yes
Optional::Yes,
LineWidthInfo.description
},
{
StandoffDistanceInfo.identifier,
new DoubleVerifier,
StandoffDistanceInfo.description,
Optional::Yes
Optional::Yes,
StandoffDistanceInfo.description
}
}
};
@@ -82,41 +82,41 @@ documentation::Documentation RenderableModelProjection::Documentation() {
{
"Type",
new StringEqualVerifier("RenderableModelProjection"),
"",
Optional::No
Optional::No,
""
},
{
keyGeometry,
new ReferencingVerifier("base_geometry_model"),
"The geometry that is used for rendering this model.",
Optional::No
Optional::No,
"The geometry that is used for rendering this model."
},
{
keyProjection,
new ReferencingVerifier("newhorizons_projectioncomponent"),
"Contains information about projecting onto this planet.",
Optional::No
Optional::No,
"Contains information about projecting onto this planet."
},
{
keyTextureColor, // @TODO Change to ColorTextureInfo.identifier
new StringVerifier,
ColorTextureInfo.description,
Optional::No
Optional::No,
ColorTextureInfo.description
},
{
PerformShadingInfo.identifier,
new BoolVerifier,
PerformShadingInfo.description,
Optional::Yes
Optional::Yes,
PerformShadingInfo.description
},
{
keyBoundingSphereRadius,
new DoubleVerifier,
Optional::Yes,
"The radius of the bounding sphere of this object. This has to be a "
"radius that is larger than anything that is rendered by it. It has to "
"be at least as big as the convex hull of the object. The default value "
"is 10e9 meters.",
Optional::Yes
"is 10e9 meters."
}
}
};
@@ -125,7 +125,6 @@ documentation::Documentation RenderableModelProjection::Documentation() {
RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _colorTexturePath(ColorTextureInfo)
, _rotation({ "Rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Remove this property
, _programObject(nullptr)
, _fboProgramObject(nullptr)
, _baseTexture(nullptr)
@@ -171,7 +170,6 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di
}
Renderable::addProperty(_performShading);
Renderable::addProperty(_rotation);
}
RenderableModelProjection::~RenderableModelProjection() {
@@ -376,30 +374,11 @@ void RenderableModelProjection::attitudeParameters(double time) {
return;
}
_transform = glm::mat4(1);
glm::mat4 rotPropX = glm::rotate(
_transform,
glm::radians(static_cast<float>(_rotation.value().x)),
glm::vec3(1, 0, 0)
);
glm::mat4 rotPropY = glm::rotate(
_transform,
glm::radians(static_cast<float>(_rotation.value().y)),
glm::vec3(0, 1, 0)
);
glm::mat4 rotPropZ = glm::rotate(
_transform,
glm::radians(static_cast<float>(_rotation.value().z)),
glm::vec3(0, 0, 1)
);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
_transform[i][j] = static_cast<float>(_stateMatrix[i][j]);
}
}
_transform = _transform * rotPropX * rotPropY * rotPropZ;
glm::dvec3 boresight;
try {
SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId());
@@ -409,13 +388,14 @@ void RenderableModelProjection::attitudeParameters(double time) {
}
double lightTime;
glm::dvec3 p =
SpiceManager::ref().targetPosition(
_projectionComponent.projectorId(),
_projectionComponent.projecteeId(),
_destination,
_projectionComponent.aberration(),
time, lightTime);
glm::dvec3 p = SpiceManager::ref().targetPosition(
_projectionComponent.projectorId(),
_projectionComponent.projecteeId(),
_destination,
_projectionComponent.aberration(),
time, lightTime
);
psc position = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z);
position[3] += 4;
@@ -434,8 +414,6 @@ void RenderableModelProjection::attitudeParameters(double time) {
);
}
void RenderableModelProjection::project() {
for (auto img : _imageTimes) {
attitudeParameters(img.timeRange.start);
@@ -78,8 +78,6 @@ private:
properties::StringProperty _colorTexturePath;
properties::Vec3Property _rotation;
std::unique_ptr<ghoul::opengl::ProgramObject> _programObject;
std::unique_ptr<ghoul::opengl::ProgramObject> _fboProgramObject;
std::unique_ptr<ghoul::opengl::ProgramObject> _depthFboProgramObject;
@@ -104,45 +104,45 @@ documentation::Documentation RenderablePlanetProjection::Documentation() {
{
"Type",
new StringEqualVerifier("RenderablePlanetProjection"),
"",
Optional::No
Optional::No,
""
},
{
keyGeometry,
new ReferencingVerifier("space_geometry_planet"),
Optional::No,
"The geometry that is used for rendering this planet.",
Optional::No
},
{
keyProjection,
new ReferencingVerifier("newhorizons_projectioncomponent"),
Optional::No,
"Contains information about projecting onto this planet.",
Optional::No
},
{
keyMeridianShift,
new BoolVerifier,
Optional::Yes,
"Determines whether the meridian of the planet should be shifted by 180 "
"degrees. The default value is 'false'",
Optional::Yes
"degrees. The default value is 'false'"
},
{
keyColorTexture, // @TODO This should be ColorTextureInfo.identifier
new StringVerifier,
ColorTextureInfo.description,
Optional::No
Optional::No,
ColorTextureInfo.description
},
{
keyHeightTexture, // @TODO This should be HeightTextureInfo.identifier
new StringVerifier,
HeightTextureInfo.description,
Optional::Yes
Optional::Yes,
HeightTextureInfo.description
},
{
HeightExaggerationInfo.identifier,
new DoubleVerifier,
HeightExaggerationInfo.description,
Optional::Yes
Optional::Yes,
HeightExaggerationInfo.description
}
}
};
@@ -112,26 +112,26 @@ documentation::Documentation RenderableShadowCylinder::Documentation() {
{
"Type",
new StringEqualVerifier("RenderableShadowCylinder"),
"",
Optional::No
Optional::No,
""
},
{
NumberPointsInfo.identifier,
new IntVerifier,
NumberPointsInfo.description,
Optional::Yes
Optional::Yes,
NumberPointsInfo.description
},
{
ShadowLengthInfo.identifier,
new DoubleVerifier,
ShadowLengthInfo.description,
Optional::Yes
Optional::Yes,
ShadowLengthInfo.description
},
{
ShadowColorInfo.identifier,
new DoubleVector4Verifier,
ShadowColorInfo.description,
Optional::Yes
Optional::Yes,
ShadowColorInfo.description
},
{
TerminatorTypeInfo.identifier,
@@ -139,32 +139,32 @@ documentation::Documentation RenderableShadowCylinder::Documentation() {
// Synchronized with SpiceManager::terminatorTypeFromString
"UMBRAL", "PENUMBRAL"
}),
TerminatorTypeInfo.description,
Optional::No
Optional::No,
TerminatorTypeInfo.description
},
{
LightSourceInfo.identifier,
new StringVerifier,
LightSourceInfo.description,
Optional::No
Optional::No,
LightSourceInfo.description
},
{
ObserverInfo.identifier,
new StringVerifier,
ObserverInfo.description,
Optional::No
Optional::No,
ObserverInfo.description
},
{
BodyInfo.identifier,
new StringVerifier,
BodyInfo.description,
Optional::No
Optional::No,
BodyInfo.description
},
{
BodyFrameInfo.identifier,
new StringVerifier,
BodyFrameInfo.description,
Optional::No
Optional::No,
BodyFrameInfo.description
},
{
AberrationInfo.identifier,
@@ -172,8 +172,8 @@ documentation::Documentation RenderableShadowCylinder::Documentation() {
// SpiceManager::AberrationCorrection::AberrationCorrection
"NONE", "LT", "LT+S", "CN", "CN+S"
}),
AberrationInfo.description,
Optional::No
Optional::No,
AberrationInfo.description
},
},
Exhaustive::Yes
@@ -125,34 +125,34 @@ documentation::Documentation ProjectionComponent::Documentation() {
{
keyInstrument,
new StringAnnotationVerifier("A SPICE name of an instrument"),
"The instrument that is used to perform the projections",
Optional::No
Optional::No,
"The instrument that is used to perform the projections"
},
{
keyInstrumentFovy,
new DoubleVerifier,
"The field of view in degrees along the y axis",
Optional::No
Optional::No,
"The field of view in degrees along the y axis"
},
{
keyInstrumentAspect,
new DoubleVerifier,
"The aspect ratio of the instrument in relation between x and y axis",
Optional::No
Optional::No,
"The aspect ratio of the instrument in relation between x and y axis"
},
{
keyProjObserver,
new StringAnnotationVerifier("A SPICE name of the observing object"),
Optional::No,
"The observer that is doing the projection. This has to be a valid SPICE "
"name or SPICE integer.",
Optional::No
"name or SPICE integer."
},
{
keyProjTarget,
new StringAnnotationVerifier("A SPICE name of the observed object"),
Optional::No,
"The observed object that is projected on. This has to be a valid SPICE "
"name or SPICE integer.",
Optional::No
"name or SPICE integer."
},
{
keyProjAberration,
@@ -160,46 +160,45 @@ documentation::Documentation ProjectionComponent::Documentation() {
// from SpiceManager::AberrationCorrection::AberrationCorrection
"NONE", "LT", "LT+S", "CN", "CN+S", "XLT", "XLT+S", "XCN", "XCN+S"
}),
Optional::No,
"The aberration correction that is supposed to be used for the "
"projection. The values for the correction correspond to the SPICE "
"definition as described in "
"ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/IDL/cspice/spkezr_c.html",
Optional::No
"ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/IDL/cspice/spkezr_c.html"
},
{
keyPotentialTargets,
new StringListVerifier,
Optional::Yes,
"The list of potential targets that are involved with the image "
"projection",
Optional::Yes
"projection"
},
{
keyNeedsTextureMapDilation,
new BoolVerifier,
Optional::Yes,
"Determines whether a dilation step of the texture map has to be "
"performed after each projection. This is necessary if the texture of "
"the projected object is a texture map where the borders are not "
"touching. The default value is 'false'.",
Optional::Yes
"touching. The default value is 'false'."
},
{
keyNeedsShadowing,
new BoolVerifier,
Optional::Yes,
"Determines whether the object requires a self-shadowing algorithm. This "
"is necessary if the object is concave and might cast a shadow on itself "
"during presentation. The default value is 'false'.",
Optional::Yes
"during presentation. The default value is 'false'."
},
{
keyTextureMapAspectRatio,
new DoubleVerifier,
Optional::Yes,
"Sets the desired aspect ratio of the projected texture. This might be "
"necessary as planets usually have 2x1 aspect ratios, whereas this does "
"not hold for non-planet objects (comets, asteroids, etc). The default "
"value is '1.0'.",
Optional::Yes
"value is '1.0'."
}
}
};
}
@@ -69,7 +69,7 @@ void GuiOriginComponent::render() {
bool hasChanged = ImGui::Combo("Origin", &currentPosition, nodeNames.c_str());
if (hasChanged) {
OsEng.scriptEngine().queueScript(
"openspace.setPropertyValue('NavigationHandler.origin', '" +
"openspace.setPropertyValue('NavigationHandler.Origin', '" +
nodes[currentPosition]->name() + "');",
scripting::ScriptEngine::RemoteScripting::Yes
);
+2 -2
View File
@@ -45,8 +45,8 @@ documentation::Documentation PlanetGeometry::Documentation() {
{
KeyType,
new StringVerifier,
"The type of the PlanetGeometry that will can be constructed.",
Optional::No
Optional::No,
"The type of the PlanetGeometry that will can be constructed."
}
}
};
@@ -94,28 +94,28 @@ documentation::Documentation RenderableConstellationBounds::Documentation() {
{
VertexInfo.identifier,
new StringVerifier,
VertexInfo.description,
Optional::No
Optional::No,
VertexInfo.description
},
{
ConstellationInfo.identifier,
new StringVerifier,
Optional::Yes,
"Specifies the file that contains the mapping between constellation "
"abbreviations and full name of the constellation. If the file is "
"omitted, the abbreviations are used as the full names.",
Optional::Yes
"omitted, the abbreviations are used as the full names."
},
{
DistanceInfo.identifier,
new DoubleVerifier,
DistanceInfo.description,
Optional::Yes
Optional::Yes,
DistanceInfo.description
},
{
SelectionInfo.identifier,
new StringListVerifier,
SelectionInfo.description,
Optional::Yes
Optional::Yes,
SelectionInfo.description
}
}
};
+16 -16
View File
@@ -116,54 +116,54 @@ documentation::Documentation RenderablePlanet::Documentation() {
{
KeyGeometry,
new ReferencingVerifier("space_geometry_planet"),
"Specifies the planet geometry that is used for this RenderablePlanet.",
Optional::No
Optional::No,
"Specifies the planet geometry that is used for this RenderablePlanet."
},
{
KeyRadius,
new DoubleVerifier,
Optional::Yes,
"Specifies the radius of the planet. If this value is not specified, it "
"will try to query the SPICE library for radius values.",
Optional::Yes
"will try to query the SPICE library for radius values."
},
{
KeyColorTexture, // @TODO Use ColorTextureInfo.identifier instead
new StringVerifier,
"Specifies the color texture that is used for this RenderablePlanet.",
Optional::Yes
Optional::Yes,
"Specifies the color texture that is used for this RenderablePlanet."
},
{
KeyHeightTexture, // @TODO Use HeightTextureInfo.identifier instead
new StringVerifier,
"Specifies the height texture that is used for this RenderablePlanet.",
Optional::Yes
Optional::Yes,
"Specifies the height texture that is used for this RenderablePlanet."
},
{
KeyNightTexture, // @TODO Use NightTextureInfo.identifier instead
new StringVerifier,
Optional::Yes,
"Specifies the texture that is used for the night side of this "
"RenderablePlanet.",
Optional::Yes
"RenderablePlanet."
},
{
KeyShading,
new BoolVerifier,
Optional::Yes,
"Specifies whether the planet should be rendered shaded by the Sun. If "
"this value is 'false', any existing night texture will not be used. "
"This value defaults to 'true'.",
Optional::Yes
"This value defaults to 'true'."
},
{
HeightExaggerationInfo.identifier,
new DoubleVerifier,
HeightExaggerationInfo.description,
Optional::Yes
Optional::Yes,
HeightExaggerationInfo.description
},
{
PerformShadingInfo.identifier,
new BoolVerifier,
PerformShadingInfo.description,
Optional::Yes
Optional::Yes,
PerformShadingInfo.description
}
}
};
+10 -11
View File
@@ -87,38 +87,37 @@ documentation::Documentation RenderableRings::Documentation() {
{
"Type",
new StringEqualVerifier("RenderableRings"),
"",
Optional::No
},
{
TextureInfo.identifier,
new StringVerifier,
TextureInfo.description,
Optional::No
Optional::No,
TextureInfo.description
},
{
SizeInfo.identifier,
new DoubleVerifier,
SizeInfo.description,
Optional::No
Optional::No,
SizeInfo.description
},
{
OffsetInfo.identifier,
new DoubleVector2Verifier,
OffsetInfo.description,
Optional::Yes
Optional::Yes,
OffsetInfo.description
},
{
NightFactorInfo.identifier,
new DoubleVerifier,
NightFactorInfo.description,
Optional::Yes
Optional::Yes,
NightFactorInfo.description
},
{
TransparencyInfo.identifier,
new DoubleVerifier,
TransparencyInfo.description,
Optional::Yes
Optional::Yes,
TransparencyInfo.description
}
}
};
+14 -15
View File
@@ -132,53 +132,52 @@ documentation::Documentation RenderableStars::Documentation() {
{
"Type",
new StringEqualVerifier("RenderableStars"),
"",
Optional::No
},
{
KeyFile,
new StringVerifier,
Optional::No,
"The path to the SPECK file that contains information about the stars "
"being rendered.",
Optional::No
"being rendered."
},
{
PsfTextureInfo.identifier,
new StringVerifier,
PsfTextureInfo.description,
Optional::No
Optional::No,
PsfTextureInfo.description
},
{
ColorTextureInfo.identifier,
new StringVerifier,
ColorTextureInfo.description,
Optional::No
Optional::No,
ColorTextureInfo.description
},
{
ColorOptionInfo.identifier,
new StringInListVerifier({
"Color", "Velocity", "Speed"
}),
ColorOptionInfo.description,
Optional::Yes
Optional::Yes,
ColorOptionInfo.description
},
{
TransparencyInfo.identifier,
new DoubleVerifier,
TransparencyInfo.description,
Optional::Yes
Optional::Yes,
TransparencyInfo.description
},
{
ScaleFactorInfo.identifier,
new DoubleVerifier,
ScaleFactorInfo.description,
Optional::Yes
Optional::Yes,
ScaleFactorInfo.description
},
{
MinBillboardSizeInfo.identifier,
new DoubleVerifier,
MinBillboardSizeInfo.description,
Optional::Yes
Optional::Yes,
MinBillboardSizeInfo.description
}
}
};
@@ -59,14 +59,14 @@ documentation::Documentation SimpleSphereGeometry::Documentation() {
new DoubleVerifier,
new DoubleVector3Verifier
),
RadiusInfo.description,
Optional::No
Optional::No,
RadiusInfo.description
},
{
SegmentsInfo.identifier,
new IntVerifier,
SegmentsInfo.description,
Optional::No
Optional::No,
SegmentsInfo.description
}
}
};
+6 -7
View File
@@ -60,20 +60,19 @@ documentation::Documentation SpiceRotation::Documentation() {
{
"Type",
new StringEqualVerifier("SpiceRotation"),
"",
Optional::No
},
{
SourceInfo.identifier,
new StringAnnotationVerifier("A valid SPICE NAIF name or integer"),
SourceInfo.description,
Optional::No
Optional::No,
SourceInfo.description
},
{
DestinationInfo.identifier,
new StringAnnotationVerifier("A valid SPICE NAIF name or integer"),
DestinationInfo.description,
Optional::No
Optional::No,
DestinationInfo.description
},
{
KeyKernels,
@@ -81,10 +80,10 @@ documentation::Documentation SpiceRotation::Documentation() {
new StringListVerifier,
new StringVerifier
),
Optional::Yes,
"A single kernel or list of kernels that this SpiceTranslation depends "
"on. All provided kernels will be loaded before any other operation is "
"performed.",
Optional::Yes
"performed."
}
}
};
+16 -17
View File
@@ -129,56 +129,55 @@ documentation::Documentation KeplerTranslation::Documentation() {
{
"Type",
new StringEqualVerifier("KeplerTranslation"),
"",
Optional::No
},
{
EccentricityInfo.identifier,
new DoubleInRangeVerifier(0.0, 1.0),
EccentricityInfo.description,
Optional::No
Optional::No,
EccentricityInfo.description
},
{
SemiMajorAxisInfo.identifier,
new DoubleVerifier,
SemiMajorAxisInfo.description,
Optional::No
Optional::No,
SemiMajorAxisInfo.description
},
{
InclinationInfo.identifier,
new DoubleInRangeVerifier(0.0, 360.0),
InclinationInfo.description,
Optional::No
Optional::No,
InclinationInfo.description
},
{
AscendingNodeInfo.identifier,
new DoubleInRangeVerifier(0.0, 360.0),
AscendingNodeInfo.description,
Optional::No
Optional::No,
AscendingNodeInfo.description
},
{
ArgumentOfPeriapsisInfo.identifier,
new DoubleInRangeVerifier(0.0, 360.0),
ArgumentOfPeriapsisInfo.description,
Optional::No
Optional::No,
ArgumentOfPeriapsisInfo.description
},
{
MeanAnomalyAtEpochInfo.identifier,
new DoubleInRangeVerifier(0.0, 360.0),
MeanAnomalyAtEpochInfo.description,
Optional::No
Optional::No,
MeanAnomalyAtEpochInfo.description
},
{
EpochInfo.identifier,
new StringVerifier,
EpochInfo.description,
Optional::No
Optional::No,
EpochInfo.description
},
{
PeriodInfo.identifier,
new DoubleGreaterVerifier(0.0),
PeriodInfo.description,
Optional::No
Optional::No,
PeriodInfo.description
},
},
Exhaustive::Yes
@@ -74,30 +74,29 @@ documentation::Documentation SpiceTranslation::Documentation() {
{
"Type",
new StringEqualVerifier("SpiceTranslation"),
"",
Optional::No
},
{
KeyBody, // @TODO Rename to TargetInfo.identifier
new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"),
Optional::No,
"This is the SPICE NAIF name for the body whose translation is to be "
"computed by the SpiceTranslation. It can either be a fully qualified "
"name (such as 'EARTH') or a NAIF integer id code (such as '399').",
Optional::No
"name (such as 'EARTH') or a NAIF integer id code (such as '399')."
},
{
ObserverInfo.identifier,
new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"),
ObserverInfo.description,
Optional::No
Optional::No,
ObserverInfo.description
},
{
FrameInfo.identifier,
new StringAnnotationVerifier(
"A valid SPICE NAIF name for a reference frame"
),
FrameInfo.description,
Optional::Yes
Optional::Yes,
FrameInfo.description
},
{
KeyKernels,
@@ -105,10 +104,10 @@ documentation::Documentation SpiceTranslation::Documentation() {
new StringListVerifier,
new StringVerifier
),
Optional::Yes,
"A single kernel or list of kernels that this SpiceTranslation depends "
"on. All provided kernels will be loaded before any other operation is "
"performed.",
Optional::Yes
"performed."
}
},
Exhaustive::Yes
+5 -5
View File
@@ -239,20 +239,20 @@ documentation::Documentation TLETranslation::Documentation() {
{
"Type",
new StringEqualVerifier("TLETranslation"),
"",
Optional::No
},
{
KeyFile,
new StringVerifier,
"Specifies the filename of the Two-Line-Element file",
Optional::No
Optional::No,
"Specifies the filename of the Two-Line-Element file"
},
{
KeyLineNum,
new DoubleGreaterVerifier(0),
"Specifies the line number within the file where the group of 3 TLE lines begins (1-based)",
Optional::No
Optional::No,
"Specifies the line number within the file where the group of 3 TLE "
"lines begins (1-based)."
}
},
Exhaustive::No
+5 -5
View File
@@ -115,7 +115,7 @@ SpecificationError::SpecificationError(TestResult res, std::string component)
}
DocumentationEntry::DocumentationEntry(std::string k, std::shared_ptr<Verifier> v,
std::string doc, Optional opt)
Optional opt, std::string doc)
: key(std::move(k))
, verifier(std::move(v))
, optional(opt)
@@ -125,10 +125,10 @@ DocumentationEntry::DocumentationEntry(std::string k, std::shared_ptr<Verifier>
ghoul_assert(verifier, "Verifier must not be nullptr");
}
DocumentationEntry::DocumentationEntry(std::string key, Verifier* v, std::string doc,
Optional optional)
: DocumentationEntry(std::move(key), std::shared_ptr<Verifier>(v), std::move(doc),
optional)
DocumentationEntry::DocumentationEntry(std::string key, Verifier* v, Optional optional,
std::string doc)
: DocumentationEntry(std::move(key), std::shared_ptr<Verifier>(v), optional,
std::move(doc))
{}
Documentation::Documentation(std::string n, std::string id, DocumentationEntries entries,
+6 -2
View File
@@ -204,7 +204,9 @@ std::string TableVerifier::type() const {
}
StringListVerifier::StringListVerifier(std::string elementDocumentation)
: TableVerifier({{ "*", new StringVerifier, std::move(elementDocumentation) }})
: TableVerifier({
{ "*", new StringVerifier, Optional::No, std::move(elementDocumentation) }
})
{}
std::string StringListVerifier::type() const {
@@ -212,7 +214,9 @@ std::string StringListVerifier::type() const {
}
IntListVerifier::IntListVerifier(std::string elementDocumentation)
: TableVerifier({ { "*", new IntVerifier, std::move(elementDocumentation) } })
: TableVerifier({
{ "*", new IntVerifier, Optional::No, std::move(elementDocumentation) }
})
{}
std::string IntListVerifier::type() const {
+90 -84
View File
@@ -37,51 +37,51 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
ConfigurationManager::KeyConfigSgct,
new StringAnnotationVerifier("A valid SGCT configuration file"),
Optional::No,
"The SGCT configuration file that determines the window and view frustum "
"settings that are being used when OpenSpace is started.",
Optional::No
"settings that are being used when OpenSpace is started."
},
{
ConfigurationManager::KeyConfigScene,
new StringAnnotationVerifier(
"A valid scene file as described in the Scene documentation"
),
Optional::No,
"The scene description that is used to populate the application after "
"startup. The scene determines which objects are loaded, the startup "
"time and other scene-specific settings. More information is provided in "
"the Scene documentation.",
Optional::No
"the Scene documentation."
},
{
ConfigurationManager::KeyConfigTask,
new StringAnnotationVerifier(
"A valid task file as described in the Task documentation"),
"The root task to be performed when launching the task runner "
"applicaition.",
Optional::Yes
"A valid task file as described in the Task documentation"
),
Optional::Yes,
"The root task to be performed when launching the task runner application."
},
{
ConfigurationManager::KeyPaths,
new StringListVerifier,
Optional::No,
"A list of paths that are automatically registered with the file system. "
"If a key X is used in the table, it is then useable by referencing ${X} "
"in all other configuration files or scripts.",
Optional::No
"in all other configuration files or scripts."
},
{
ConfigurationManager::KeyPaths + '.' + ConfigurationManager::KeyCache,
new StringVerifier,
Optional::No,
"The path to be used as a cache folder. If per scene caching is enabled, the "
"name of the scene will be appended to this folder",
Optional::No
"name of the scene will be appended to this folder"
},
{
ConfigurationManager::KeyFonts,
new StringListVerifier("Font paths loadable by FreeType"),
Optional::Yes,
"A list of all fonts that will automatically be loaded on startup. Each "
"key-value pair contained in the table will become the name and the file "
"for a font.",
Optional::Yes
"for a font."
},
{
ConfigurationManager::KeyLogging,
@@ -89,15 +89,15 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
ConfigurationManager::PartLogDir,
new StringVerifier,
"The directory for logs. Default value is \"${BASE_PATH}\"",
Optional::Yes
Optional::Yes,
"The directory for logs. Default value is \"${BASE_PATH}\""
},
{
ConfigurationManager::PartLogPerformancePrefix,
new StringVerifier,
Optional::Yes,
"A string to prefix PerformanceMeasurement logfiles."
"Default value is \"PM-\"",
Optional::Yes
"Default value is \"PM-\""
},
{
ConfigurationManager::PartLogLevel,
@@ -105,21 +105,21 @@ documentation::Documentation ConfigurationManager::Documentation() {
// List from logmanager.cpp::levelFromString
{ "Trace", "Debug", "Info", "Warning", "Error", "Fatal", "None" }
),
Optional::Yes,
"The severity of log messages that will be displayed. Only "
"messages of the selected level or higher will be displayed. All "
"levels below will be silently discarded. The order of "
"severities is: Debug < Info < Warning < Error < Fatal < None.",
Optional::Yes
"severities is: Debug < Info < Warning < Error < Fatal < None."
},
{
ConfigurationManager::PartImmediateFlush,
new BoolVerifier,
Optional::Yes,
"Determines whether error messages will be displayed immediately "
"or if it is acceptable to have a short delay, but being more "
"performant. If the delay is allowed ('true'), messages might "
"get lost if the application crashes shortly after a message was "
"logged.",
Optional::Yes
"logged."
},
{
ConfigurationManager::PartLogs,
@@ -127,14 +127,15 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
"*",
new ReferencingVerifier("core_logfactory"),
Optional::No,
"Additional log files"
}
}),
Optional::Yes,
"Per default, log messages are written to the console, the "
"onscreen text, and (if available) the Visual Studio output "
"window. This table can define other logging methods that will "
"be used additionally.",
Optional::Yes
"be used additionally."
},
{
ConfigurationManager::PartCapabilitiesVerbosity,
@@ -142,62 +143,62 @@ documentation::Documentation ConfigurationManager::Documentation() {
// List from OpenspaceEngine::initialize
{ "None", "Minimal", "Default", "Full" }
),
Optional::Yes,
"At startup, a list of system capabilities is created and logged."
"This value determines how verbose this listing should be.",
Optional::Yes
"This value determines how verbose this listing should be."
}
}),
Optional::Yes,
"Configurations for the logging of messages that are generated "
"throughout the code and are useful for debugging potential errors or "
"other information.",
Optional::Yes
"other information."
},
{
ConfigurationManager::KeyLuaDocumentation,
new StringVerifier,
Optional::Yes,
"The filename that will be created on startup containing the documentation "
"of available Lua functions that can be executed in scene files or per "
"console. Any existing file will be silently overwritten.",
Optional::Yes
"console. Any existing file will be silently overwritten."
},
{
ConfigurationManager::KeyPropertyDocumentation,
new StringVerifier,
Optional::Yes,
"The file that will be created on startup containing a list of all "
"properties in the scene. Any existing file will be silently overwritten.",
Optional::Yes
"properties in the scene. Any existing file will be silently overwritten."
},
{
ConfigurationManager::KeyScriptLog,
new StringVerifier,
Optional::Yes,
"The file that will be created on startup containing the log of all Lua "
"scripts that are executed in the last session. Any existing file (including "
"the results from previous runs) will be silently overwritten.",
Optional::Yes
"the results from previous runs) will be silently overwritten."
},
{
ConfigurationManager::KeyKeyboardShortcuts,
new StringVerifier,
Optional::Yes,
"The file that will be created on startup containing the list of all "
"keyboard bindings with their respective Lua scripts. For each key, it "
"mentions which scripts will be executed in the current session.",
Optional::Yes
"mentions which scripts will be executed in the current session."
},
{
ConfigurationManager::KeyDocumentation,
new StringVerifier,
Optional::Yes,
"The file that will be created on startup containing this documentation. Any "
"previous file in this location will be silently overwritten.",
Optional::Yes
"previous file in this location will be silently overwritten."
},
{
ConfigurationManager::KeyFactoryDocumentation,
new StringVerifier,
Optional::Yes,
"The file that will be created on startup containing the factory "
"documentation which shows the different types of objects that can be "
"created in the current application configuration. Any previous file in this "
"location will be silently overritten.",
Optional::Yes
"location will be silently overritten."
},
{
ConfigurationManager::KeyLauncher,
@@ -208,32 +209,32 @@ documentation::Documentation ConfigurationManager::Documentation() {
// List from logmanager.cpp::levelFromString
{ "Trace", "Debug", "Info", "Warning", "Error", "Fatal", "None" }
),
Optional::Yes,
"The severity of log messages that will be displayed. Only "
"messages of the selected level or higher will be displayed. All "
"levels below will be silently discarded. The order of "
"severities is: Debug < Info < Warning < Error < Fatal < None.",
Optional::Yes
"severities is: Debug < Info < Warning < Error < Fatal < None."
},
}),
"Configurations for the Launcher & syncing application.",
Optional::Yes
Optional::Yes,
"Configurations for the Launcher & syncing application."
},
{
ConfigurationManager::KeyShutdownCountdown,
new DoubleGreaterEqualVerifier(0.0),
Optional::Yes,
"The countdown that the application will wait between pressing ESC and "
"actually shutting down. If ESC is pressed again in this time, the "
"shutdown is aborted.",
Optional::Yes
"shutdown is aborted."
},
{
ConfigurationManager::KeyPerSceneCache,
new BoolVerifier,
Optional::Yes,
"If this is set to 'true', the name of the scene will be appended to the "
"cache directory, thus not reusing the same directory. This is useful in "
"cases where the same instance of OpenSpace is run with multiple scenes, but "
"the caches should be retained. This value defaults to 'false'.",
Optional::Yes
"the caches should be retained. This value defaults to 'false'."
},
{
ConfigurationManager::KeyOnScreenTextScaling,
@@ -241,11 +242,11 @@ documentation::Documentation ConfigurationManager::Documentation() {
// Values from RenderEngine:updateRenderer
"window", "framebuffer"
}),
Optional::Yes,
"The method for scaling the onscreen text in the window. As the resolution "
"of the rendering can be different from the size of the window, the onscreen "
"text can either be scaled according to the window size ('window'), or the "
"rendering resolution ('framebuffer'). This value defaults to 'window'.",
Optional::Yes
"rendering resolution ('framebuffer'). This value defaults to 'window'."
},
{
ConfigurationManager::KeyDownloadRequestURL,
@@ -253,10 +254,10 @@ documentation::Documentation ConfigurationManager::Documentation() {
new StringVerifier,
new StringListVerifier
),
Optional::Yes,
"The URL from which files will be downloaded by the Launcher. This can "
"either be a single URL or a list of possible URLs from which the "
"Launcher can then choose.",
Optional::Yes
"Launcher can then choose."
},
{
ConfigurationManager::KeyRenderingMethod,
@@ -264,27 +265,27 @@ documentation::Documentation ConfigurationManager::Documentation() {
// List from RenderEngine::setRendererFromString
{ "Framebuffer", "ABuffer" }
),
Optional::Yes,
"The renderer that is use after startup. The renderer 'ABuffer' requires "
"support for at least OpenGL 4.3",
Optional::Yes
"support for at least OpenGL 4.3"
},
{
ConfigurationManager::KeyDisableMasterRendering,
new BoolVerifier,
Optional::Yes,
"Toggles whether the master in a multi-application setup should be rendering "
"or just managing the state of the network. This is desired in cases where "
"the master computer does not have the resources to render a scene.",
Optional::Yes
"the master computer does not have the resources to render a scene."
},
{
ConfigurationManager::KeyDisableSceneOnMaster,
new BoolVerifier,
Optional::Yes,
"Toggles whether a potential scene transformation matrix, for example as "
"specified in an SGCT configuration file, should apply to the master node. "
"With some configurations, applying such a transformation complicates the "
"interaction and it is thus desired to disable the transformation. The "
"default is false.",
Optional::Yes
"default is false."
},
{
ConfigurationManager::KeyHttpProxy,
@@ -292,11 +293,13 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
ConfigurationManager::PartHttpProxyAddress,
new StringVerifier,
Optional::No,
"The address of the http proxy"
},
{
ConfigurationManager::PartHttpProxyPort,
new StringVerifier,
Optional::No,
"The port of the http proxy"
},
{
@@ -304,25 +307,25 @@ documentation::Documentation ConfigurationManager::Documentation() {
new StringInListVerifier(
{ "basic", "ntlm", "digest", "any" }
),
"The authentication method of the http proxy",
Optional::Yes
Optional::Yes,
"The authentication method of the http proxy"
},
{
ConfigurationManager::PartHttpProxyUser,
new StringVerifier,
"The user of the http proxy",
Optional::Yes
Optional::Yes,
"The user of the http proxy"
},
{
ConfigurationManager::PartHttpProxyPassword,
new StringVerifier,
"The password of the http proxy",
Optional::Yes
Optional::Yes,
"The password of the http proxy"
}
}),
Optional::Yes,
"This defines the use for a proxy when fetching data over http."
"No proxy will be used if this is left out.",
Optional::Yes
"No proxy will be used if this is left out."
},
{
ConfigurationManager::KeyOpenGLDebugContext,
@@ -330,17 +333,17 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
ConfigurationManager::PartActivate,
new BoolVerifier,
"Determines whether the OpenGL context should be a debug context",
Optional::No
Optional::No,
"Determines whether the OpenGL context should be a debug context"
},
{
ConfigurationManager::PartSynchronous,
new BoolVerifier,
Optional::Yes,
"Determines whether the OpenGL debug callbacks are performed "
"synchronously. If set to <True> the callbacks are in the same thead "
"as the context and in the scope of the OpenGL function that "
"triggered the message. The default value is <True>.",
Optional::Yes
"triggered the message. The default value is <True>."
},
{
ConfigurationManager::PartFilterIdentifier,
@@ -350,8 +353,8 @@ documentation::Documentation ConfigurationManager::Documentation() {
{
ConfigurationManager::PartFilterIdentifierIdentifier,
new IntVerifier,
"The identifier that is to be filtered",
Optional::No
Optional::No,
"The identifier that is to be filtered"
},
{
ConfigurationManager::PartFilterIdentifierSource,
@@ -360,8 +363,8 @@ documentation::Documentation ConfigurationManager::Documentation() {
"API", "Window System", "Shader Compiler",
"Third Party", "Application", "Other", "Don't care"
}),
"The source of the identifier to be filtered",
Optional::No
Optional::No,
"The source of the identifier to be filtered"
},
{
ConfigurationManager::PartFilterIdentifierType,
@@ -371,13 +374,15 @@ documentation::Documentation ConfigurationManager::Documentation() {
"Performance", "Marker", "Push group", "Pop group",
"Other", "Don't care"
}),
Optional::No,
"The type of the identifier to be filtered"
}
}),
Optional::No,
"Individual OpenGL debug message identifiers"
}}),
"A list of OpenGL debug messages identifiers that are filtered",
Optional::Yes
Optional::Yes,
"A list of OpenGL debug messages identifiers that are filtered"
},
{
ConfigurationManager::PartFilterSeverity,
@@ -387,32 +392,33 @@ documentation::Documentation ConfigurationManager::Documentation() {
new StringInListVerifier(
// ghoul::debugcontext.cpp
{ "High", "Medium", "Low", "Notification" }
)
),
Optional::No
}
}),
"A list of severities that can are filtered out",
Optional::Yes
Optional::Yes,
"A list of severities that can are filtered out"
}
}),
Optional::Yes,
"Determines the settings for the creation of an OpenGL debug context.",
Optional::Yes
},
{
ConfigurationManager::KeyCheckOpenGLState,
new BoolVerifier,
Optional::Yes,
"Determines whether the OpenGL state is checked after each OpenGL function "
"call. This will dramatically slow down the rendering, but will make finding "
"OpenGL errors easier. This defaults to 'false'.",
Optional::Yes
"OpenGL errors easier. This defaults to 'false'."
},
{
ConfigurationManager::KeyLogEachOpenGLCall,
new BoolVerifier,
Optional::Yes,
"Determines whether each OpenGL call that happens should be logged using the "
"'TRACE' loglevel. This will bring the rendering to a crawl but provides "
"useful debugging features for the order in which OpenGL calls occur. This "
"defaults to 'false'.",
Optional::Yes
"defaults to 'false'."
}
}
};
+12 -10
View File
@@ -67,47 +67,49 @@ documentation::Documentation LogFactoryDocumentation() {
// List from createLog
valueTextLog, valueHtmlLog
}),
Optional::No,
"The type of the new log to be generated."
},
{
keyFilename,
new StringVerifier,
Optional::No,
"The filename to which the log will be written."
},
{
keyAppend,
new BoolVerifier,
Optional::Yes,
"Determines whether the file will be cleared at startup or if the "
"contents will be appended to previous runs.",
Optional::Yes
"contents will be appended to previous runs."
},
{
keyTimeStamping,
new BoolVerifier,
Optional::Yes,
"Determines whether the log entires should be stamped with the time at "
"which the message was logged.",
Optional::Yes
"which the message was logged."
},
{
keyDateStamping,
new BoolVerifier,
Optional::Yes,
"Determines whether the log entries should be stamped with the date at "
"which the message was logged.",
Optional::Yes
"which the message was logged."
},
{
keyCategoryStamping,
new BoolVerifier,
Optional::Yes,
"Determines whether the log entries should be stamped with the "
"category that creates the log message.",
Optional::Yes
"category that creates the log message."
},
{
keyLogLevelStamping,
new BoolVerifier,
Optional::Yes,
"Determines whether the log entries should be stamped with the log level "
"that was used to create the log message.",
Optional::Yes
"that was used to create the log message."
}
},
Exhaustive::Yes
+8 -8
View File
@@ -50,29 +50,29 @@ documentation::Documentation MissionPhase::Documentation() {
{
KeyName,
new StringVerifier,
Optional::No,
"The human readable name of this mission or mission phase that is "
"displayed to the user.",
Optional::No
"displayed to the user."
},
{
KeyDescription,
new StringVerifier,
"A description of this mission or mission phase.",
Optional::Yes
Optional::Yes,
"A description of this mission or mission phase."
},
{
KeyTimeRange,
new ReferencingVerifier("core_util_timerange"),
Optional::Yes,
"The time range for which this mission or mission phase is valid. If no "
"time range is specified, the ranges of sub mission phases are used "
"instead.",
Optional::Yes
"instead."
},
{
KeyPhases,
new ReferencingVerifier("core_mission_mission"),
"The phases into which this mission or mission phase is separated.",
Optional::Yes
Optional::Yes,
"The phases into which this mission or mission phase is separated."
}
},
Exhaustive::Yes
+2 -2
View File
@@ -62,11 +62,11 @@ documentation::Documentation Renderable::Documentation() {
{
KeyType,
new StringAnnotationVerifier("A valid Renderable created by a factory"),
Optional::No,
"This key specifies the type of Renderable that gets created. It has to be one"
"of the valid Renderables that are available for creation (see the "
"FactoryDocumentation for a list of possible Renderables), which depends on "
"the configration of the application",
Optional::No
"the configration of the application"
}
}
};
+2 -2
View File
@@ -121,11 +121,11 @@ documentation::Documentation ScreenSpaceRenderable::Documentation() {
{
KeyType,
new StringAnnotationVerifier("Must name a valid Screenspace renderable"),
Optional::No,
"The type of the Screenspace renderable that is to be created. The "
"available types of Screenspace renderable depend on the configuration of"
"the application and can be written to disk on application startup into "
"the FactoryDocumentation.",
Optional::No
"the FactoryDocumentation."
}
}
};
+2 -2
View File
@@ -47,11 +47,11 @@ documentation::Documentation Rotation::Documentation() {
{
KeyType,
new StringAnnotationVerifier("Must name a valid Rotation type."),
Optional::No,
"The type of the rotation that is described in this element. The "
"available types of rotations depend on the configuration of the "
"application and can be written to disk on application startup into the "
"FactoryDocumentation.",
Optional::No
"FactoryDocumentation."
}
}
};
+2 -2
View File
@@ -48,11 +48,11 @@ documentation::Documentation Scale::Documentation() {
{
KeyType,
new StringAnnotationVerifier("Must name a valid Scale type"),
Optional::No,
"The type of the scaling that is described in this element. "
"The available types of scaling depend on the configuration "
"of the application and can be written to disk on "
"application startup into the FactoryDocumentation.",
Optional::No
"application startup into the FactoryDocumentation."
}
},
Exhaustive::No
+2 -1
View File
@@ -290,7 +290,8 @@ std::string Scene::generateJson() const {
json << "\"id\": \"" << p->identifier() << "\",";
json << "\"type\": \"" << p->className() << "\",";
json << "\"fullyQualifiedId\": \"" << p->fullyQualifiedIdentifier() << "\",";
json << "\"guiName\": \"" << p->guiName() << "\"";
json << "\"guiName\": \"" << p->guiName() << "\",";
json << "\"description\": \"" << escapedJson(p->description()) << "\"";
json << "}";
if (p != properties.back()) {
json << ",";
+17 -12
View File
@@ -37,16 +37,16 @@ documentation::Documentation Scene::Documentation() {
{
"ScenePath",
new StringVerifier,
Optional::Yes,
"The path to the base directory of the scene. The path is considered "
"relative to the location of the scene description file.",
Optional::Yes
"relative to the location of the scene description file."
},
{
"CommonFolder",
new StringAnnotationVerifier("A valid scene module folder"),
Optional::Yes,
"The path to the common folder that is loaded and will be bound to the "
"${COMMON_MODULE} path token so that assets can be reused easily.",
Optional::Yes
"${COMMON_MODULE} path token so that assets can be reused easily."
},
{
"Camera",
@@ -54,37 +54,42 @@ documentation::Documentation Scene::Documentation() {
{
"Focus",
new StringAnnotationVerifier("A valid object in the scene"),
Optional::No,
"The initial focus node of the camera, i.e., the node around which "
"the interaction will be performed."
},
{
"Position",
new DoubleVector3Verifier,
"The initial camera positive relative to the focus object.",
Optional::Yes
Optional::Yes,
"The initial camera positive relative to the focus object."
},
{
"Rotation",
new DoubleVector4Verifier,
"The initial camera rotation expressed as a quaternion.",
Optional::Yes
Optional::Yes,
"The initial camera rotation expressed as a quaternion."
}
}),
Optional::Yes,
"Definitions of the camera starting parameters, such as focus, location, and "
"orientation.",
Optional::Yes
"orientation."
},
{
"Modules",
new TableVerifier({
{ "*", new StringAnnotationVerifier(
{
"*",
new StringVerifier,
Optional::No,
"Loadable module folders. This means that they either have to point "
"to a folder that contains a ModuleFile or a folder which contains "
"other folders that eventually contain ModuleFile. This second "
"recursive approach is useful for grouping modules into logical "
"units."
)}
}
}),
Optional::No,
"This is the list of modules that will be loaded into the initial scene. The "
"values in this table have to correspond to folders relative to the "
"ScenePath key. The order in which the modules are loaded is the same as the "
+14 -14
View File
@@ -37,33 +37,33 @@ documentation::Documentation SceneGraphNode::Documentation() {
{
"Name",
new StringVerifier,
Optional::No,
"The name of this scenegraph node. This name must be unique among all scene "
"graph nodes that are loaded in a specific scene. If a duplicate is detected "
"the loading of the node will fail, as will all childing that depend on the "
"node.",
Optional::No
"node."
},
{
"Parent",
new StringAnnotationVerifier(
"Must be a name for another scenegraph node, or 'Root'"
),
Optional::No,
"This names the parent of the currently specified scenegraph node. The "
"parent must not have been defined earlier, but must exist at loading time, "
"or the scenegraph node creation will fail. A special parent 'Root' is "
"available that denotes the root of the scenegraph.",
Optional::No
"available that denotes the root of the scenegraph."
},
{
"Renderable",
new ReferencingVerifier("renderable"),
Optional::Yes,
"The renderable that is to be created for this scenegraph node. A renderable "
"is a component of a scenegraph node that will lead to some visual result on "
"the screen. The specifics heavily depend on the 'Type' of the renderable. "
"If no Renderable is specified, this scenegraph node is an internal node and "
"can be used for either group children, or apply common transformations to a "
"group of children.",
Optional::Yes
"group of children."
},
{
"Transform",
@@ -71,33 +71,33 @@ documentation::Documentation SceneGraphNode::Documentation() {
{
"Translation",
new ReferencingVerifier("core_transform_translation"),
Optional::Yes,
"This node describes a translation that is applied to the scenegraph "
"node and all its children. Depending on the 'Type' of the "
"translation, this can either be a static translation or a "
"time-varying one.",
Optional::Yes
"time-varying one."
},
{
"Rotation",
new ReferencingVerifier("core_transform_rotation"),
Optional::Yes,
"This nodes describes a rotation that is applied to the scenegraph "
"node and all its children. Depending on the 'Type' of the rotation, "
"this can either be a static rotation or a time-varying one.",
Optional::Yes
"this can either be a static rotation or a time-varying one."
},
{
"Scale",
new ReferencingVerifier("core_transform_scaling"),
Optional::Yes,
"This node describes a scaling that is applied to the scenegraph "
"node and all its children. Depending on the 'Type' of the scaling, "
"this can either be a static scaling or a time-varying one.",
Optional::Yes
"this can either be a static scaling or a time-varying one."
}
}),
Optional::Yes,
"This describes a set of transformations that are applied to this scenegraph "
"node and all of its children. There are only three possible values "
"corresponding to a 'Translation', a 'Rotation', and a 'Scale'.",
Optional::Yes
"corresponding to a 'Translation', a 'Rotation', and a 'Scale'."
},
}
};
+2 -2
View File
@@ -47,11 +47,11 @@ documentation::Documentation Translation::Documentation() {
{
KeyType,
new StringAnnotationVerifier("Must name a valid Translation type"),
Optional::No,
"The type of translation that is described in this element. "
"The available types of translations depend on the "
"configuration of the application and can be written to disk "
"on application startup into the FactoryDocumentation.",
Optional::No
"on application startup into the FactoryDocumentation."
}
},
Exhaustive::No
+10 -9
View File
@@ -61,36 +61,37 @@ documentation::Documentation ScriptScheduler::Documentation() {
{
KeyTime,
new TimeVerifier,
Optional::No,
"The time at which, when the in game time passes it, the two "
"scripts will be executed. If the traversal is forwards (towards "
"+ infinity), the ForwardScript will be executed, otherwise the "
"BackwardScript will be executed instead.",
Optional::No
"BackwardScript will be executed instead."
},
{
KeyUniversalScript,
new LuaScriptVerifier,
Optional::Yes,
"The Lua script that will be executed when the specified time is "
"passed independent of its direction. This script will be "
"executed before the specific scripts if both versions are "
"specified",
Optional::Yes
"specified"
},
{
KeyForwardScript,
new LuaScriptVerifier,
Optional::Yes,
"The Lua script that is executed when OpenSpace passes the time "
"in a forward direction.",
Optional::Yes
"in a forward direction."
},
{
KeyBackwardScript,
new LuaScriptVerifier,
Optional::Yes,
"The Lua script that is executed when OpenSpace passes the time "
"in a backward direction.",
Optional::Yes
"in a backward direction."
}
})
}),
Optional::No
}
},
Exhaustive::Yes
+2 -2
View File
@@ -41,11 +41,11 @@ documentation::Documentation Task::documentation() {
{
"Type",
new StringAnnotationVerifier("A valid Task created by a factory"),
Optional::No,
"This key specifies the type of Task that gets created. It has to be one"
"of the valid Tasks that are available for creation (see the "
"FactoryDocumentation for a list of possible Tasks), which depends on "
"the configration of the application",
Optional::No
"the configration of the application"
}
}
};
+4 -4
View File
@@ -46,14 +46,14 @@ documentation::Documentation TimeRange::Documentation() {
{
KeyStart,
new StringAnnotationVerifier("A string representing a valid date"),
"The start date of the time range",
Optional::No
Optional::No,
"The start date of the time range"
},
{
KeyEnd,
new StringAnnotationVerifier("A string representing a valid date"),
"The end date of the time range",
Optional::No
Optional::No,
"The end date of the time range"
}
},
Exhaustive::Yes