mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Utilize new docs functionality in API scripts that are defined in Lua files (#3505)
* Fix a reference to a deprecated and renamed function in navigationstate docs * Review documentation for scripts defined in .lua files And utilize new markdown functionality * Update renderable box grid size specs So that it can have a size less than 1, and throws a specification error when the size is given as negative * Fix some issues with the gaia filtering scripts * Try adding param documentation to the lua script documentation It works! * Utiliize mroe markdown features in the updated documentations * Add function parameter info and make small updated to gaia filtering functions * Replace a long parameter info in description with `param` description * Update usage examples * Add example of how to create debug axes for the current SGN
This commit is contained in:
@@ -2,34 +2,56 @@ openspace.globebrowsing.documentation = {
|
||||
{
|
||||
Name = "setNodePosition",
|
||||
Arguments = {
|
||||
{ "nodeIdentifer", "String" },
|
||||
{ "nodeIdentifier", "String" },
|
||||
{ "globeIdentifier", "String" },
|
||||
{ "latitude", "Number" },
|
||||
{ "longitude", "Number" },
|
||||
{ "altitude", "Number" }
|
||||
{ "altitude", "Number?" }
|
||||
},
|
||||
Documentation = [[
|
||||
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations.
|
||||
Sets the position of a scene graph node that has a
|
||||
[GlobeTranslation](#globebrowsing_translation_globetranslation) and/or
|
||||
[GlobeRotation](#globebrowsing_rotation_globerotation).
|
||||
|
||||
Usage:
|
||||
```lua
|
||||
openspace.globebrowsing.setNodePosition(
|
||||
"Scale_StatueOfLiberty", "Earth", 40.000, -117.5, optionalAltitude
|
||||
)
|
||||
```
|
||||
|
||||
\\param nodeIdentifier The identifier of the scene graph node to move
|
||||
\\param globeIdentifier The identifier of the [RenderableGlobe](#globebrowsing_renderableglobe)
|
||||
that the object should be put on
|
||||
\\param latitude The latitude value for the new position, in degrees
|
||||
\\param longitude The longitude value for the new position, in degrees
|
||||
\\param altitude An optional altitude value for the new position, in meters. If
|
||||
excluded, an altitude of 0 will be used
|
||||
]]
|
||||
},
|
||||
{
|
||||
Name = "setNodePositionFromCamera",
|
||||
Arguments = {
|
||||
{ "nodeIdentifer", "String" },
|
||||
{ "useAltitude", "Boolean" }
|
||||
{ "useAltitude", "Boolean?" }
|
||||
},
|
||||
Documentation = [[
|
||||
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations to
|
||||
match the camera. Only uses camera position not rotation. If useAltitude is true,
|
||||
then the position will also be updated to the camera's altitude.
|
||||
Sets the position of a scene graph node that has a
|
||||
[GlobeTranslation](#globebrowsing_translation_globetranslation) and/or
|
||||
[GlobeRotation](#globebrowsing_rotation_globerotation) to match the camera. Only
|
||||
uses camera position not rotation. If useAltitude is true, then the position
|
||||
will also be updated to the camera's altitude.
|
||||
|
||||
Usage:
|
||||
```lua
|
||||
openspace.globebrowsing.setNodePositionFromCamera(
|
||||
"Scale_StatueOfLiberty", optionalUseAltitude
|
||||
)
|
||||
```
|
||||
|
||||
\\param nodeIdentifier The identifier of the scene graph node to move
|
||||
\\param useAltitude If true, the camera's altitude will also be used for the new
|
||||
positions. Otherwise, it will not.
|
||||
]]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user