diff --git a/data/assets/examples/grids.asset b/data/assets/examples/grids.asset deleted file mode 100644 index 4c51b3d8c5..0000000000 --- a/data/assets/examples/grids.asset +++ /dev/null @@ -1,123 +0,0 @@ -local AU = 149597870700 -- 1 AU - -local RadialGrid = { - Identifier = "ExampleRadialGrid", - Parent = "Root", - Transform = { - Scale = { - Type = "StaticScale", - Scale = AU - } - }, - Renderable = { - Type = "RenderableRadialGrid", - Opacity = 0.8, - Color = { 0.6, 1.0, 0.7 }, - LineWidth = 3.0, - GridSegments = { 3, 4 }, - Radii = { 0.2, 1.0 } - }, - GUI = { - Name = "Example Radial Grid", - Description = "A circular 2D grid, with segments based on the radius and angle.", - Path = "/Examples/Grids" - } -} - -local PlanarGrid = { - Identifier = "ExampleGrid", - Transform = { - Scale = { - Type = "StaticScale", - Scale = AU - } - }, - Renderable = { - Type = "RenderableGrid", - Color = { 0.0, 1.0, 0.8 }, - LineWidth = 2.0, - Segments = { 6, 10 }, - Size = { 1, 2 }, - HighlightColor = { 1.0, 0.8, 0.0 }, - HighlightLineWidth = 3.2, - HighlightRate = { 3, 3 } - }, - GUI = { - Name = "Example Grid", - Description = "A basic 2D grid, with a given size and number of segments.", - Path = "/Examples/Grids" - } -} - -local SphericalGrid = { - Identifier = "ExampleSphericalGrid", - Transform = { - Scale = { - Type = "StaticScale", - Scale = AU - } - }, - Renderable = { - Type = "RenderableSphericalGrid", - Color = { 1.0, 0.5, 0.2 }, - LineWidth = 2.0, - Segments = 40 - }, - GUI = { - Name = "Example Spherical Grid", - Description = "A grid in the form of a 3D sphere.", - Path = "/Examples/Grids" - } -} - -local BoxGrid = { - Identifier = "ExampleBoxGrid", - Transform = { - Scale = { - Type = "StaticScale", - Scale = AU - } - }, - Renderable = { - Type = "RenderableBoxGrid", - Enabled = false, - Color = { 0.5, 0.0, 1.0 }, - LineWidth = 2.0, - Size = { 2, 2, 2 }, - }, - GUI = { - Name = "Example Box Grid", - Description = "A grid in the form of a 3D box.", - Path = "/Examples/Grids" - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(RadialGrid) - openspace.addSceneGraphNode(PlanarGrid) - openspace.addSceneGraphNode(SphericalGrid) - openspace.addSceneGraphNode(BoxGrid) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(BoxGrid) - openspace.removeSceneGraphNode(SphericalGrid) - openspace.removeSceneGraphNode(PlanarGrid) - openspace.removeSceneGraphNode(RadialGrid) -end) - -asset.export(RadialGrid) -asset.export(PlanarGrid) -asset.export(SphericalGrid) -asset.export(BoxGrid) - - - -asset.meta = { - Name = "Example Grids", - Description = [[Examples of different types of rendered grids.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/examples/nodeline.asset b/data/assets/examples/nodeline.asset deleted file mode 100644 index 91f8319822..0000000000 --- a/data/assets/examples/nodeline.asset +++ /dev/null @@ -1,42 +0,0 @@ -local earth = asset.require("scene/solarsystem/planets/earth/earth") -local mars = asset.require("scene/solarsystem/planets/mars/mars") - - - -local RenderableNodeLineExample = { - Identifier = "RenderableNodeLineExample", - Renderable = { - Type = "RenderableNodeLine", - StartNode = earth.Earth.Identifier, - EndNode = mars.Mars.Identifier, - Color = { 0.5, 0.5, 0.5 }, - LineWidth = 2 - }, - GUI = { - Name = "RenderableNodeLine - Basic", - Path = "/Examples", - Description = "Draws a line between two nodes in the scene." - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(RenderableNodeLineExample) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(RenderableNodeLineExample) -end) - -asset.export(RenderableNodeLineExample) - - - -asset.meta = { - Name = "RenderableNodeLine Example asset", - Description = [[Example of a RenderableNodeLine, that can be used to draw an line - between two scene graph nodes.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/examples/renderable/renderablegrid/grid.asset b/data/assets/examples/renderable/renderablegrid/grid.asset new file mode 100644 index 0000000000..b2dd06e565 --- /dev/null +++ b/data/assets/examples/renderable/renderablegrid/grid.asset @@ -0,0 +1,23 @@ +-- Basic +-- This example adds a planar grid of 100x100 meters to the scene. Per default, the grid +-- consist of 10x10 segments. + +local Node = { + Identifier = "RenderableGrid_Example", + Renderable = { + Type = "RenderableGrid", + Size = { 100.0, 100.0 } + }, + GUI = { + Name = "RenderableGrid - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablegrid/grid_segments.asset b/data/assets/examples/renderable/renderablegrid/grid_segments.asset new file mode 100644 index 0000000000..39000a6dbc --- /dev/null +++ b/data/assets/examples/renderable/renderablegrid/grid_segments.asset @@ -0,0 +1,24 @@ +-- Specifying Segments +-- This example adds a planar grid of 50x100 meters, split into 5 segments in the +-- x-direction and 10 segments in the y-direction so that each segment is 10x10 meters. + +local Node = { + Identifier = "RenderableGrid_Example_Segments", + Renderable = { + Type = "RenderableGrid", + Size = { 50.0, 100.0 }, + Segments = { 5, 10 } + }, + GUI = { + Name = "RenderableGrid - Segments", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablegrid/grid_styled.asset b/data/assets/examples/renderable/renderablegrid/grid_styled.asset new file mode 100644 index 0000000000..008bf2ad62 --- /dev/null +++ b/data/assets/examples/renderable/renderablegrid/grid_styled.asset @@ -0,0 +1,24 @@ +-- Styled +-- This example adds a planar grid of 100x100 meters, with a custom color and line width. + +local Node = { + Identifier = "RenderableGrid_Example_Styled", + Renderable = { + Type = "RenderableGrid", + Size = { 100.0, 100.0 }, + Color = { 0.0, 1.0, 0.0 }, + LineWidth = 2.0 + }, + GUI = { + Name = "RenderableGrid - Styled", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablegrid/grid_styled_highlights.asset b/data/assets/examples/renderable/renderablegrid/grid_styled_highlights.asset new file mode 100644 index 0000000000..ef4353de5b --- /dev/null +++ b/data/assets/examples/renderable/renderablegrid/grid_styled_highlights.asset @@ -0,0 +1,26 @@ +-- Higlighting Grid Lines +-- This example adds a planar grid of 100x100 meters, with highlight color for every 5th +-- grid line in each direction. + +local Node = { + Identifier = "RenderableGrid_Example_Highlights", + Renderable = { + Type = "RenderableGrid", + Size = { 100.0, 100.0 }, + HighlightColor = { 0.0, 1.0, 0.0 }, + HighlightRate = { 5, 5 }, + HighlightLineWidth = 2.0 + }, + GUI = { + Name = "RenderableGrid - Highlights", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderableradialgrid/radialgrid.asset b/data/assets/examples/renderable/renderableradialgrid/radialgrid.asset new file mode 100644 index 0000000000..48df2f067d --- /dev/null +++ b/data/assets/examples/renderable/renderableradialgrid/radialgrid.asset @@ -0,0 +1,31 @@ +-- Basic +-- This example adds a circular grid with a radius of 100 meters to the scene. Per +-- default, the grid is split into 10 angular and radial segments. +-- +-- The grid is created with a radius of 1 meter per default. Here we scale it up by a +-- factor of 100 to get the desired size. + +local Node = { + Identifier = "RenderableRadialGrid_Example", + Transform = { + Scale = { + Type = "StaticScale", + Scale = 100.0 + } + }, + Renderable = { + Type = "RenderableRadialGrid" + }, + GUI = { + Name = "RenderableRadialGrid - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderableradialgrid/radialgrid_radii.asset b/data/assets/examples/renderable/renderableradialgrid/radialgrid_radii.asset new file mode 100644 index 0000000000..c3899313aa --- /dev/null +++ b/data/assets/examples/renderable/renderableradialgrid/radialgrid_radii.asset @@ -0,0 +1,24 @@ +-- Custom Radii +-- This example adds a circular grid with a radius of 100 meters with a hole of 10 meters +-- in the center. This is achieved by specifying two radii, the first one being the radius +-- of the inner circle and the second one being the radius of the outer circle. + +local Node = { + Identifier = "RenderableRadialGrid_Example_Radii", + Renderable = { + Type = "RenderableRadialGrid", + Radii = { 10.0, 100.0 } + }, + GUI = { + Name = "RenderableRadialGrid - Custom Radii", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments.asset b/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments.asset new file mode 100644 index 0000000000..d11da27fef --- /dev/null +++ b/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments.asset @@ -0,0 +1,24 @@ +-- Custom Grid Segments +-- This example adds a circular grid with 10 segments in the radial direction and 1 +-- segment in the angular direction. 1 here means that we do not split the grid into +-- smaller segments in the angular direction. + +local Node = { + Identifier = "RenderableRadialGrid_Example_Segments", + Renderable = { + Type = "RenderableRadialGrid", + GridSegments = { 10, 1 } + }, + GUI = { + Name = "RenderableRadialGrid - Segments", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments_ring.asset b/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments_ring.asset new file mode 100644 index 0000000000..e5cb56fb29 --- /dev/null +++ b/data/assets/examples/renderable/renderableradialgrid/radialgrid_segments_ring.asset @@ -0,0 +1,24 @@ +-- Ring +-- The `RenderableRadialGrid` can also be used to create a simple ring. This is done by +-- setting the number of segments in each direction to 1 and make sure the inner radius +-- is zero (which is the default). + +local Node = { + Identifier = "RenderableRadialGrid_Example_Ring", + Renderable = { + Type = "RenderableRadialGrid", + GridSegments = { 1, 1 } + }, + GUI = { + Name = "RenderableRadialGrid - Ring", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderableradialgrid/radialgrid_styled.asset b/data/assets/examples/renderable/renderableradialgrid/radialgrid_styled.asset new file mode 100644 index 0000000000..3dc92d5c3b --- /dev/null +++ b/data/assets/examples/renderable/renderableradialgrid/radialgrid_styled.asset @@ -0,0 +1,24 @@ +-- Styled +-- This example adds a circular grid with a specific color and line width. Note that we +-- keep the size at its default value. + +local Node = { + Identifier = "RenderableRadialGrid_Example_Styled", + Renderable = { + Type = "RenderableRadialGrid", + Color = { 1.0, 0.0, 0.0 }, + LineWidth = 2.0 + }, + GUI = { + Name = "RenderableRadialGrid - Styled", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid.asset b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid.asset new file mode 100644 index 0000000000..9416b1fb0a --- /dev/null +++ b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid.asset @@ -0,0 +1,27 @@ +-- Basic +-- This example adds a spherical grid with a radius of 100 meters. + +local Node = { + Identifier = "RenderableSphericalGrid_Example", + Transform = { + Scale = { + Type = "StaticScale", + Scale = 100.0 + } + }, + Renderable = { + Type = "RenderableSphericalGrid" + }, + GUI = { + Name = "RenderableSphericalGrid - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments.asset b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments.asset new file mode 100644 index 0000000000..94b3186f01 --- /dev/null +++ b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments.asset @@ -0,0 +1,29 @@ +-- Segments +-- This example adds a spherical grid with a radius of 100 meters, where the sphere is +-- split up into 100 segments in each direction. The default is 64. + +local Node = { + Identifier = "RenderableSphericalGrid_Example_Segments", + Transform = { + Scale = { + Type = "StaticScale", + Scale = 100.0 + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Segments = 100 + }, + GUI = { + Name = "RenderableSphericalGrid - Segments", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments_latlong.asset b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments_latlong.asset new file mode 100644 index 0000000000..7b9bdcd85b --- /dev/null +++ b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_segments_latlong.asset @@ -0,0 +1,31 @@ +-- Different Number of Segments in Latitudinal and Longitudinal Direction +-- This example adds a spherical grid with a radius of 100 meters, where the sphere is +-- split up into 100 segments in the longitudinal direction and 10 segments in the +-- latitudinal direction. + +local Node = { + Identifier = "RenderableSphericalGrid_Example_SegmentsLatLong", + Transform = { + Scale = { + Type = "StaticScale", + Scale = 100.0 + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + LatSegments = 100, + LongSegments = 10 + }, + GUI = { + Name = "RenderableSphericalGrid - Segments Lat/Long", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_styled.asset b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_styled.asset new file mode 100644 index 0000000000..2afabfaa2a --- /dev/null +++ b/data/assets/examples/renderable/renderablesphericalgrid/sphericalgrid_styled.asset @@ -0,0 +1,23 @@ +-- Styled +-- This example adds a spherical grid with a custom color and line width. + +local Node = { + Identifier = "RenderableSphericalGrid_Example_Styled", + Renderable = { + Type = "RenderableSphericalGrid", + Color = { 0.0, 0.0, 1.0 }, + LineWidth = 2.0 + }, + GUI = { + Name = "RenderableSphericalGrid - Styled", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/screenspacebrowser.asset b/data/assets/examples/screenspacebrowser.asset deleted file mode 100644 index 651c905055..0000000000 --- a/data/assets/examples/screenspacebrowser.asset +++ /dev/null @@ -1,28 +0,0 @@ -local Browser = { - Type = "ScreenSpaceBrowser", - Identifier = "ScreenSpaceBrowserExample", - Name = "Screen Space Browser Example", - Url = "https://www.openspaceproject.com/" -} - - -asset.onInitialize(function() - openspace.addScreenSpaceRenderable(Browser) -end) - -asset.onDeinitialize(function() - openspace.removeScreenSpaceRenderable(Browser) -end) - -asset.export(Browser) - - - -asset.meta = { - Name = "ScreenSpaceBrowser Example", - Description = [[Example of how to load and show a webpage in the rendering. The loaded - webpage is shown in screen space.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/examples/screenspacerenderable/screenspacebrowser/browser.asset b/data/assets/examples/screenspacerenderable/screenspacebrowser/browser.asset new file mode 100644 index 0000000000..b931298a27 --- /dev/null +++ b/data/assets/examples/screenspacerenderable/screenspacebrowser/browser.asset @@ -0,0 +1,17 @@ +-- Basic +-- This example shows how to load and show a webpage in the rendering, in screen space. + +local Object = { + Type = "ScreenSpaceBrowser", + Identifier = "ScreenSpaceBrowser_Example", + Url = "https://www.openspaceproject.com/", + Name = "ScreenSpaceBrowser Example - Basic" +} + +asset.onInitialize(function() + openspace.addScreenSpaceRenderable(Object) +end) + +asset.onDeinitialize(function() + openspace.removeScreenSpaceRenderable(Object) +end) diff --git a/data/assets/examples/screenspacerenderable/screenspaceimagelocal/imagelocal.asset b/data/assets/examples/screenspacerenderable/screenspaceimagelocal/imagelocal.asset new file mode 100644 index 0000000000..b875331e17 --- /dev/null +++ b/data/assets/examples/screenspacerenderable/screenspaceimagelocal/imagelocal.asset @@ -0,0 +1,18 @@ +-- Basic +-- Create a screenspace image plane that shows the content of a local image file on disk. +-- In this case we use a test image from the OpenSpace/data folder. + +local Object = { + Type = "ScreenSpaceImageLocal", + Identifier = "ScreenSpaceImageLocal_Example", + TexturePath = openspace.absPath("${DATA}/test3.jpg"), + Name = "ScreenSpaceImageLocal Example - Basic" +} + +asset.onInitialize(function() + openspace.addScreenSpaceRenderable(Object) +end) + +asset.onDeinitialize(function() + openspace.removeScreenSpaceRenderable(Object) +end) diff --git a/data/assets/examples/screenspacerenderable/screenspaceimageonline/imageonline.asset b/data/assets/examples/screenspacerenderable/screenspaceimageonline/imageonline.asset new file mode 100644 index 0000000000..61b6bd3e6f --- /dev/null +++ b/data/assets/examples/screenspacerenderable/screenspaceimageonline/imageonline.asset @@ -0,0 +1,17 @@ +-- Basic +-- Create a screenspace image plane that shows the content of an image from a web URL. + +local Object = { + Type = "ScreenSpaceImageOnline", + Identifier = "ScreenSpaceImageOnline_Example", + URL = "https://data.openspaceproject.com/moon_mars/apollo8/earthrise.jpg", + Name = "ScreenSpaceImageOnline Example - Basic" +} + +asset.onInitialize(function() + openspace.addScreenSpaceRenderable(Object) +end) + +asset.onDeinitialize(function() + openspace.removeScreenSpaceRenderable(Object) +end) diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index b4e30221bb..14302035b2 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -94,6 +94,12 @@ namespace { "The labels for the grid." }; + // This `Renderable` can be used to create a planar grid, to for example illustrate + // distances in 3D space. + // + // The grid is created by specifying a size and how many segments to split each + // dimension into. A secondary color can be used to highlight grid lines with a + // given interval. struct [[codegen::Dictionary(RenderableGrid)]] Parameters { // [[codegen::verbatim(ColorInfo.description)]] std::optional color [[codegen::color()]]; diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index c724b7629c..316bb446c5 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -81,6 +81,12 @@ namespace { "The labels for the grid." }; + // This `Renderable` creates a planar circular grid with a given size. Optionally, it + // may have a hole in the center. + // + // The size is determined by two radii values: The first (inner) radius defines the + // hole in the center. The second (outer) radius defines the full grid size. To create + // a solid circle that connects at the center, set the inner radius to zero (default). struct [[codegen::Dictionary(RenderableRadialGrid)]] Parameters { // [[codegen::verbatim(ColorInfo.description)]] std::optional color [[codegen::color()]]; @@ -113,7 +119,7 @@ documentation::Documentation RenderableRadialGrid::Documentation() { RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _color(ColorInfo, glm::vec3(0.5f), glm::vec3(0.f), glm::vec3(1.f)) - , _gridSegments(GridSegmentsInfo, glm::ivec2(1), glm::ivec2(1), glm::ivec2(200)) + , _gridSegments(GridSegmentsInfo, glm::ivec2(10), glm::ivec2(1), glm::ivec2(200)) , _circleSegments(CircleSegmentsInfo, 36, 4, 200) , _lineWidth(LineWidthInfo, 0.5f, 1.f, 20.f) , _radii(RadiiInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(20.f)) diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index 27d597048c..45fd35f818 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -65,18 +65,6 @@ namespace { openspace::properties::Property::Visibility::User }; - constexpr openspace::properties::Property::PropertyInfo SegmentsInfo = { - "Segments", - "Number of Segments", - "The number of segments the sphere is split into. Determines the resolution " - "of the rendered sphere. Should be an even value (if an odd value is provided, " - "the value will be set to the new value minus one). Setting this value is equal " - "to setting `LongSegments` and `LatSegments` to the same value. If this value is " - "specified, it will overwrite the values provided in `LongSegments` and " - "`LatSegments`.", - openspace::properties::Property::Visibility::User - }; - constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = { "LineWidth", "Line Width", @@ -90,6 +78,13 @@ namespace { "The labels for the grid." }; + // This `Renderable` creates a grid in the shape of a sphere. Note that the sphere + // will always be given a radius of one meter. To change its size, use a `Scale` + // transform, such as the [StaticScale](#base_scale_static). + // + // The grid may be split up into equal segments in both directions using the `Segments` + // parameter, or different number of segments in the latitudal and longtudal direction + // using the `LatSegments` and `LongSegments` parameters. struct [[codegen::Dictionary(RenderableSphericalGrid)]] Parameters { // [[codegen::verbatim(ColorInfo.description)]] std::optional color [[codegen::color()]]; @@ -100,7 +95,12 @@ namespace { // [[codegen::verbatim(LatSegmentsInfo.description)]] std::optional latSegments; - // [[codegen::verbatim(SegmentsInfo.description)]] + // The number of segments the sphere is split into. Determines the resolution + // of the rendered sphere. Should be an even value (if an odd value is provided, + // the value will be set to the new value minus one). Setting this value is equal + // to setting `LongSegments` and `LatSegments` to the same value. If this value is + // specified, it will overwrite the values provided in `LongSegments` and + //`LatSegments`. std::optional segments; // [[codegen::verbatim(LineWidthInfo.description)]]