mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 01:30:34 -06:00
36 lines
895 B
Lua
36 lines
895 B
Lua
openspace.debugging.documentation = {
|
|
{
|
|
Name = "createCoordinateAxes",
|
|
Arguments = {},
|
|
Documentation = [[
|
|
Creates a new scene graph node that show the coordinate system used for the
|
|
currently selected focus node.
|
|
]]
|
|
}
|
|
}
|
|
|
|
openspace.debugging.createCoordinateAxes = function ()
|
|
local anchor = openspace.navigation.getNavigationState().Anchor
|
|
local radius = openspace.propertyValue("Scene." .. anchor .. ".EvaluatedInteractionSphere")
|
|
|
|
local node = {
|
|
Identifier = anchor .. "_DebugAxes",
|
|
Parent = anchor,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = radius * 2.5
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableCartesianAxes"
|
|
},
|
|
GUI = {
|
|
Name = anchor .. " (Debug Axes)",
|
|
Path = openspace.propertyValue("Scene." .. anchor .. ".GuiPath")
|
|
}
|
|
}
|
|
|
|
openspace.addSceneGraphNode(node)
|
|
end
|