mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 15:29:26 -05:00
Update Dawn model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
|
||||
local M_PI = 3.141592657
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Dawn Kernels",
|
||||
@@ -20,7 +20,7 @@ local models = asset.syncedResource({
|
||||
Name = "Dawn Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "dawn_model",
|
||||
Version = 1
|
||||
Version = 2
|
||||
})
|
||||
|
||||
local KernelFiles = {
|
||||
@@ -75,8 +75,8 @@ local LightSources = {
|
||||
}
|
||||
}
|
||||
|
||||
local Dawn = {
|
||||
Identifier = "Dawn",
|
||||
local DawnPosition = {
|
||||
Identifier = "DawnPosition",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
@@ -85,6 +85,23 @@ local Dawn = {
|
||||
Observer = "SSB",
|
||||
Kernels = KernelFiles
|
||||
},
|
||||
-- Rotation for model version 2
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { M_PI/2.0, 0, M_PI/2.0 }
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "Dawn Position",
|
||||
Path = "/Solar System/Missions/Dawn",
|
||||
Hidden = true
|
||||
}
|
||||
}
|
||||
|
||||
local Dawn = {
|
||||
Identifier = "Dawn",
|
||||
Parent = DawnPosition.Identifier,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "DAWN_SPACECRAFT",
|
||||
@@ -94,67 +111,11 @@ local Dawn = {
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Body = "DAWN",
|
||||
GeometryFile = models .. "mainbodydawn.obj",
|
||||
GeometryFile = models .. "Dawn_19.glb",
|
||||
LightSources = LightSources
|
||||
},
|
||||
GUI = {
|
||||
Path = "/Solar System/Missions/Dawn"
|
||||
}
|
||||
}
|
||||
|
||||
-- Dawn Solar Array module 1
|
||||
local DawnSolarArray1 = {
|
||||
Identifier = "DawnSolar1",
|
||||
Parent = Dawn.Identifier,
|
||||
Transform = {
|
||||
-- JCC: Spice rotations are commented because spice ck files
|
||||
-- are not present.
|
||||
-- Rotation = {
|
||||
-- Type = "SpiceRotation",
|
||||
-- SourceFrame = "DAWN_SA-Y",
|
||||
-- DestinationFrame = "DAWN_SPACECRAFT"
|
||||
-- }
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { 0.0, 4.71225, 0.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Body = "DAWN",
|
||||
GeometryFile = models .. "solarpanelleft.obj",
|
||||
LightSources = LightSources
|
||||
},
|
||||
GUI = {
|
||||
Name = "Dawn Solar 1",
|
||||
Path = "/Solar System/Missions/Dawn"
|
||||
}
|
||||
}
|
||||
|
||||
-- Dawn Solar Array module 2
|
||||
local DawnSolarArray2 = {
|
||||
Identifier = "DawnSolar2",
|
||||
Parent = Dawn.Identifier,
|
||||
Transform = {
|
||||
-- Rotation = {
|
||||
-- Type = "SpiceRotation",
|
||||
-- SourceFrame = "DAWN_SA+Y",
|
||||
-- DestinationFrame = "DAWN_SPACECRAFT"
|
||||
-- }
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { math.pi, math.pi/2, 0.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Body = "DAWN",
|
||||
GeometryFile = models .. "solarpanelright.obj",
|
||||
LightSources = LightSources
|
||||
},
|
||||
GUI = {
|
||||
Name = "Dawn Solar 2",
|
||||
Name = "Dawn",
|
||||
Path = "/Solar System/Missions/Dawn"
|
||||
}
|
||||
}
|
||||
@@ -228,10 +189,38 @@ local DawnFramingCamera2 = {
|
||||
}
|
||||
}
|
||||
|
||||
-- To make sure the size is correct
|
||||
--[[local MeassureStick = {
|
||||
Identifier = "MeassureStick",
|
||||
Parent = DawnPosition.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderablePrism",
|
||||
Segments = 16,
|
||||
Lines = 16,
|
||||
Radius = 0.855,
|
||||
LineWidth = 1.0,
|
||||
Color = { 1.0, 1.0, 1.0 },
|
||||
Length = 19.7
|
||||
},
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { -9.85, 0, 0 }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { 0, M_PI/2.0, 0 }
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Name = "MeassureStick",
|
||||
Path = "/Solar System/Missions/Dawn",
|
||||
}
|
||||
}]]
|
||||
|
||||
local nodes = {
|
||||
DawnPosition,
|
||||
Dawn,
|
||||
DawnSolarArray1,
|
||||
DawnSolarArray2,
|
||||
DawnTrail,
|
||||
DawnFramingCamera1,
|
||||
DawnFramingCamera2
|
||||
|
||||
Reference in New Issue
Block a user