Merge branch 'master' into feature/profile-gui

This commit is contained in:
Micah
2020-10-09 19:40:46 -04:00
185 changed files with 3796 additions and 2308 deletions

View File

@@ -31,7 +31,6 @@ set(OPENSPACE_VERSION_MINOR 15)
set(OPENSPACE_VERSION_PATCH 2)
set(OPENSPACE_VERSION_STRING "Beta-7")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul")
@@ -134,6 +133,11 @@ if (MSVC)
set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE)
endif ()
if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi")
endif ()
include(src/CMakeLists.txt)
##########################################################################################

4
Jenkinsfile vendored
View File

@@ -100,8 +100,10 @@ linux: {
gitHelper.checkoutGit(url, branch);
}
stage('linux/build') {
def cmakeBuildingOptionLinux = moduleMakeFlags()
cmakeBuildingOptionLinux += '-DMAKE_BUILD_TYPE=Release'
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), moduleCMakeFlags(), 'OpenSpace', 'build-all');
compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeBuildingOptionLinux, 'OpenSpace', 'build-all');
}
stage('linux/warnings') {
// compileHelper.recordCompileIssues(compileHelper.Gcc());

View File

@@ -5,11 +5,11 @@ local images = asset.syncedResource({
Name = "Constellation Images",
Type = "HttpSynchronization",
Identifier = "constellation_images",
Version = 1
Version = 2
})
--function that reads the file
local createConstellations = function (guiPath, constellationfile)
local createConstellations = function (baseIdentifier, guiPath, constellationfile)
local genConstellations = {};
--skip the first line
local notFirstLine = false;
@@ -33,7 +33,8 @@ local createConstellations = function (guiPath, constellationfile)
group = (group == '' and globe or group)
local aconstellation = {
Identifier = guiPath .. '-' .. name,
-- Identifier = guiPath .. '-' .. name,
Identifier = baseIdentifier .. '-' .. abbreviation,
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
@@ -83,7 +84,7 @@ local nodes = {}
asset.onInitialize(function ()
local constellationsCSV = images .. "/constellation_data.csv"
nodes = createConstellations('Constellation Art', constellationsCSV)
nodes = createConstellations('ConstellationArt', 'Constellation Art', constellationsCSV)
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n);
end

View File

@@ -1,85 +0,0 @@
Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523
1 Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
2 normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
3 zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
4 zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
5 zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
6 zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
7 zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
8 zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
9 zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
10 zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
11 zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
12 zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
13 zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
14 zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
15 northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
16 northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
17 southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
18 southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
19 southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
20 southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
21 northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
22 equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
23 southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
24 northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
25 southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
26 northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
27 southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
28 northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
29 northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
30 southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
31 southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
32 southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
33 southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
34 southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
35 northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
36 equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
37 southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
38 southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
39 southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
40 equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
41 southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
42 southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
43 northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
44 northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
45 northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
46 southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
47 southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
48 northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
49 southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
50 northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
51 southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
52 southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
53 southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
54 southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
55 southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
56 northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
57 southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
58 southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
59 southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
60 northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
61 southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
62 southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
63 southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
64 southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
65 southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
66 northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
67 southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
68 northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
69 northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
70 northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
71 northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
72 northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
73 southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
74 northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
75 southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
76 northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
77 northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
78 northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
79 southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
80 northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
81 northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
82 northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
83 southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
84 southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
85 southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523

View File

@@ -4,9 +4,9 @@ local Keybindings = {
{
Key = "c",
Name = "Show Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);",
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0);" ..
"openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', true);" ..
"openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0.1, 2);",
Documentation = "Enables and fades up constellation art work",
GuiPath = "/Rendering",
Local = false
@@ -14,7 +14,7 @@ local Keybindings = {
{
Key = "SHIFT+c",
Name = "Hide Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);",
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0, 2);",
Documentation = "Fades out constellation artwork",
GuiPath = "/Rendering",
Local = false
@@ -22,7 +22,7 @@ local Keybindings = {
{
Key = "CTRL+c",
Name = "Disable Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);",
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', false);",
Documentation = "Disable constellation artwork",
GuiPath = "/Rendering",
Local = false

View File

@@ -1,22 +1,30 @@
#Version
1.0
#Asset
base
scene/solarsystem/planets/earth/earth earthAsset
scene/solarsystem/planets/earth/satellites/satellites
#Property
setPropertyValue {earth_satellites}.Renderable.Enabled false
#Time
relative -1d
#Camera
goToGeo earthAsset.Earth.Identifier 58.5877 16.1924 20000000
#MarkNodes
Earth
Mars
Moon
Sun
{
"version": {
"major": 1,
"minor": 0
},
"assets": [
"base",
"scene/solarsystem/planets/earth/earth",
"scene/solarsystem/planets/earth/satellites/satellites"
],
"properties": [
{
"type": "setPropertyValue",
"name": "{earth_satellites}.Renderable.Enabled",
"value": "false"
}
],
"time": {
"type": "relative",
"value": "-1d"
},
"camera": {
"type": "goToGeo",
"anchor": "Earth",
"latitude": 58.5877,
"longitude": 16.1924,
"altitude": 20000000
},
"mark_nodes": [ "Earth", "Mars", "Moon", "Sun" ]
}

View File

@@ -0,0 +1,7 @@
return {
{
Type = "ConvertRecFormatTask",
InputFilePath = "../../recordings/input",
OutputFilePath = "../../recordings/output"
}
}

View File

@@ -50,10 +50,13 @@ public:
struct CameraPose {
glm::dvec3 position = glm::dvec3(0.0);
glm::quat rotation = glm::quat(1.f, 0.f, 0.f, 0.f);
glm::quat rotation = glm::quat(0.f, 0.f, 0.f, 0.f);
std::string focusNode;
float scale;
bool followFocusNodeRotation;
float scale = 1.f;
bool followFocusNodeRotation = false;
CameraPose() = default;
CameraPose(datamessagestructures::CameraKeyframe&& kf);
};
/**

View File

@@ -33,11 +33,24 @@
namespace openspace::interaction {
class SessionRecording : public properties::PropertyOwner {
public:
enum class RecordedDataMode {
inline static const std::string FileHeaderTitle = "OpenSpace_record/playback";
inline static const std::string HeaderCameraAscii = "camera";
inline static const std::string HeaderTimeAscii = "time";
inline static const std::string HeaderScriptAscii = "script";
inline static const std::string HeaderCommentAscii = "#";
inline static const char HeaderCameraBinary = 'c';
inline static const char HeaderTimeBinary = 't';
inline static const char HeaderScriptBinary = 's';
inline static const std::string FileExtensionBinary = ".osrec";
inline static const std::string FileExtensionAscii = ".osrectxt";
enum class DataMode {
Ascii = 0,
Binary
Binary,
Unknown
};
enum class SessionState {
@@ -46,6 +59,24 @@ public:
Playback
};
struct Timestamps {
double timeOs;
double timeRec;
double timeSim;
};
static const size_t FileHeaderVersionLength = 5;
static constexpr char FileHeaderVersion[FileHeaderVersionLength] = {
'0', '0', '.', '8', '5'
};
static const char DataFormatAsciiTag = 'A';
static const char DataFormatBinaryTag = 'B';
static const size_t keyframeHeaderSize_bytes = 33;
static const size_t saveBufferCameraSize_min = 82;
static const size_t saveBufferStringSize_max = 500;
static const size_t _saveBufferMaxSize_bytes = keyframeHeaderSize_bytes +
+ saveBufferCameraSize_min + saveBufferStringSize_max;
using CallbackHandle = int;
using StateChangeCallback = std::function<void()>;
@@ -101,7 +132,7 @@ public:
*
* \return \c true if recording to file starts without errors
*/
void setRecordDataFormat(RecordedDataMode dataMode);
void setRecordDataFormat(DataMode dataMode);
/**
* Used to stop a recording in progress. If open, the recording file will be closed,
@@ -215,6 +246,195 @@ public:
*/
std::vector<std::string> playbackList() const;
/**
* Reads a camera keyframe from a binary format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a camera keyframe which contains camera details
* \param file an ifstream reference to the playback file being read
* \param lineN keyframe number in playback file where this keyframe resides
*/
static void readCameraKeyframeBinary(Timestamps& times,
datamessagestructures::CameraKeyframe& kf, std::ifstream& file, int lineN);
/**
* Reads a camera keyframe from an ascii format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a camera keyframe which contains camera details
* \param currentParsingLine string containing the most current line that was read
* \param lineN line number in playback file where this keyframe resides
*/
static void readCameraKeyframeAscii(Timestamps& times,
datamessagestructures::CameraKeyframe& kf, std::string currentParsingLine,
int lineN);
/**
* Reads a time keyframe from a binary format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a time keyframe which contains time details
* \param file an ifstream reference to the playback file being read
* \param lineN keyframe number in playback file where this keyframe resides
*/
static void readTimeKeyframeBinary(Timestamps& times,
datamessagestructures::TimeKeyframe& kf, std::ifstream& file, int lineN);
/**
* Reads a time keyframe from an ascii format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a time keyframe which contains time details
* \param currentParsingLine string containing the most current line that was read
* \param lineN line number in playback file where this keyframe resides
*/
static void readTimeKeyframeAscii(Timestamps& times,
datamessagestructures::TimeKeyframe& kf, std::string currentParsingLine,
int lineN);
/**
* Reads a script keyframe from a binary format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a script keyframe which contains the size of the script
* (in chars) and the text itself
* \param file an ifstream reference to the playback file being read
* \param lineN keyframe number in playback file where this keyframe resides
*/
static void readScriptKeyframeBinary(Timestamps& times,
datamessagestructures::ScriptMessage& kf, std::ifstream& file, int lineN);
/**
* Reads a script keyframe from an ascii format playback file, and populates input
* references with the parameters of the keyframe.
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a script keyframe which contains the size of the script
* (in chars) and the text itself
* \param currentParsingLine string containing the most current line that was read
* \param lineN line number in playback file where this keyframe resides
*/
static void readScriptKeyframeAscii(Timestamps& times,
datamessagestructures::ScriptMessage& kf, std::string currentParsingLine,
int lineN);
/**
* Writes a camera keyframe to a binary format recording file using a CameraKeyframe
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a camera keyframe which contains the camera details
* \param kfBuffer a buffer temporarily used for preparing data to be written
* \param file an ofstream reference to the recording file being written-to
*/
static void saveCameraKeyframeBinary(Timestamps times,
datamessagestructures::CameraKeyframe& kf, unsigned char* kfBuffer,
std::ofstream& file);
/**
* Writes a camera keyframe to an ascii format recording file using a CameraKeyframe
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a camera keyframe which contains the camera details
* \param file an ofstream reference to the recording file being written-to
*/
static void saveCameraKeyframeAscii(Timestamps times,
datamessagestructures::CameraKeyframe& kf, std::ofstream& file);
/**
* Writes a time keyframe to a binary format recording file using a TimeKeyframe
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a time keyframe which contains the time details
* \param kfBuffer a buffer temporarily used for preparing data to be written
* \param file an ofstream reference to the recording file being written-to
*/
static void saveTimeKeyframeBinary(Timestamps times,
datamessagestructures::TimeKeyframe& kf, unsigned char* kfBuffer,
std::ofstream& file);
/**
* Writes a time keyframe to an ascii format recording file using a TimeKeyframe
*
* \param times reference to a timestamps structure which contains recorded times
* \param kf reference to a time keyframe which contains the time details
* \param file an ofstream reference to the recording file being written-to
*/
static void saveTimeKeyframeAscii(Timestamps times,
datamessagestructures::TimeKeyframe& kf, std::ofstream& file);
/**
* Writes a script keyframe to a binary format recording file using a ScriptMessage
*
* \param times reference to a timestamps structure which contains recorded times
* \param sm reference to a ScriptMessage object which contains the script details
* \param smBuffer a buffer temporarily used for preparing data to be written
* \param file an ofstream reference to the recording file being written-to
*/
static void saveScriptKeyframeBinary(Timestamps times,
datamessagestructures::ScriptMessage& sm, unsigned char* smBuffer,
std::ofstream& file);
/**
* Writes a script keyframe to an ascii format recording file using a ScriptMessage
*
* \param times reference to a timestamps structure which contains recorded times
* \param sm reference to a ScriptMessage which contains the script details
* \param file an ofstream reference to the recording file being written-to
*/
static void saveScriptKeyframeAscii(Timestamps times,
datamessagestructures::ScriptMessage& sm, std::ofstream& file);
/**
* Reads header information from a session recording file
*
* \param stream reference to ifstream that contains the session recording file data
* \param readLen_chars number of characters to be read, which may be the expected
* length of the header line, or an arbitrary number of characters within it
*/
static std::string readHeaderElement(std::ifstream& stream, size_t readLen_chars);
/**
* Writes a header to a binary recording file buffer
*
* \param times reference to a timestamps structure which contains recorded times
* \param type single character signifying the keyframe type
* \param kfBuffer the char buffer holding the recording info to be written
* \param idx index into write buffer (this is updated with the num of chars written)
*/
static void saveHeaderBinary(Timestamps times, char type, unsigned char* kfBuffer,
size_t& idx);
/**
* Writes a header to an ascii recording file buffer
*
* \param times reference to a timestamps structure which contains recorded times
* \param type string signifying the keyframe type
* \param line the stringstream buffer being written to
*/
static void saveHeaderAscii(Timestamps times, const std::string& type,
std::stringstream& line);
/**
* Saves a keyframe to an ascii recording file
*
* \param entry the ascii string version of the keyframe (any type)
* \param file ofstream object to write to
*/
static void saveKeyframeToFile(std::string entry, std::ofstream& file);
/**
* Checks if a specified recording file ends with a particular file extension
*
* \param filename the name of the file to record to
* \param extension the file extension to check for
*/
static bool hasFileExtension(std::string filename, std::string extension);
private:
properties::BoolProperty _renderPlaybackInformation;
@@ -238,25 +458,25 @@ private:
double appropriateTimestamp(double timeOs, double timeRec, double timeSim);
double equivalentSimulationTime(double timeOs, double timeRec, double timeSim);
double equivalentApplicationTime(double timeOs, double timeRec, double timeSim);
void playbackCamera();
void playbackTimeChange();
void playbackScript();
bool handleRecordingFile(std::string filenameIn);
bool playbackCamera();
bool playbackTimeChange();
bool playbackScript();
bool playbackAddEntriesToTimeline();
void signalPlaybackFinishedForComponent(RecordedType type);
void writeToFileBuffer(double src);
void writeToFileBuffer(std::vector<char>& cvec);
void writeToFileBuffer(unsigned char c);
void writeToFileBuffer(bool b);
void saveStringToFile(const std::string& s);
void saveKeyframeToFileBinary(unsigned char* bufferSource, size_t size);
void findFirstCameraKeyframeInTimeline();
void saveKeyframeToFile(std::string entry);
static void saveStringToFile(const std::string& s, unsigned char* kfBuffer,
size_t& idx, std::ofstream& file);
static void saveKeyframeToFileBinary(unsigned char* bufferSource, size_t size,
std::ofstream& file);
void addKeyframe(double timestamp,
interaction::KeyframeNavigator::CameraPose keyframe);
void addKeyframe(double timestamp, datamessagestructures::TimeKeyframe keyframe);
void addKeyframe(double timestamp, std::string scriptToQueue);
bool addKeyframe(double timestamp,
interaction::KeyframeNavigator::CameraPose keyframe, int lineNum);
bool addKeyframe(double timestamp, datamessagestructures::TimeKeyframe keyframe,
int lineNum);
bool addKeyframe(double timestamp, std::string scriptToQueue, int lineNum);
bool addKeyframeToTimeline(RecordedType type, size_t indexIntoTypeKeyframes,
double timestamp, int lineNum);
void moveAheadInTime();
void lookForNonCameraKeyframesThatHaveComeDue(double currTime);
void updateCameraWithOrWithoutNewKeyframes(double currTime);
@@ -276,7 +496,12 @@ private:
double getPrevTimestamp();
void cleanUpPlayback();
RecordedDataMode _recordingDataMode = RecordedDataMode::Binary;
static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src);
static void writeToFileBuffer(unsigned char* buf, size_t& idx, std::vector<char>& cv);
static void writeToFileBuffer(unsigned char* buf, size_t& idx, unsigned char c);
static void writeToFileBuffer(unsigned char* buf, size_t& idx, bool b);
DataMode _recordingDataMode = DataMode::Binary;
SessionState _state = SessionState::Idle;
SessionState _lastState = SessionState::Idle;
std::string _playbackFilename;
@@ -296,14 +521,7 @@ private:
double _saveRenderingDeltaTime = 1.0 / 30.0;
double _saveRenderingCurrentRecordedTime;
static const size_t keyframeHeaderSize_bytes = 33;
static const size_t saveBufferCameraSize_min = 82;
static const size_t saveBufferStringSize_max = 500;
static const size_t _saveBufferMaxSize_bytes = keyframeHeaderSize_bytes +
+ saveBufferCameraSize_min
+ saveBufferStringSize_max;
unsigned char _keyframeBuffer[_saveBufferMaxSize_bytes];
size_t _bufferIndex = 0;
bool _cleanupNeeded = false;

View File

@@ -55,4 +55,11 @@ T prevKeyframeObj(unsigned int index, const std::vector<T>& keyframeContainer) {
}
}
template <typename T>
T readFromPlayback(std::ifstream& stream) {
T res;
stream.read(reinterpret_cast<char*>(&res), sizeof(T));
return res;
}
} // namespace openspace::interaction

View File

@@ -0,0 +1,68 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2020 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___CONVERTRECFORMATTASK___H__
#define __OPENSPACE_CORE___CONVERTRECFORMATTASK___H__
#include <openspace/util/task.h>
#include <openspace/interaction/sessionrecording.h>
#include <ghoul/glm.h>
#include <string>
namespace openspace::interaction {
class ConvertRecFormatTask : public Task {
public:
enum class ConversionDirection {
ToAscii = 0,
ToBinary
};
ConvertRecFormatTask(const ghoul::Dictionary& dictionary);
~ConvertRecFormatTask();
std::string description() override;
void perform(const Task::ProgressCallback& progressCallback) override;
static documentation::Documentation documentation();
void convert();
private:
void convertToAscii();
void convertToBinary();
void determineFormatType();
std::string addFileSuffix(const std::string& filePath, const std::string& suffix);
std::string _inFilePath;
std::string _outFilePath;
std::ifstream _iFile;
std::ofstream _oFile;
SessionRecording::DataMode _fileFormatType;
std::string _valueFunctionLua;
};
} // namespace openspace::interaction
#endif //__OPENSPACE_CORE___CONVERTRECFORMATTASK___H__

View File

@@ -26,10 +26,13 @@
#define __OPENSPACE_CORE___MESSAGESTRUCTURES___H__
#include <ghoul/glm.h>
#include <algorithm>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <fstream>
namespace openspace::datamessagestructures {
@@ -167,6 +170,26 @@ struct CameraKeyframe {
out.write(reinterpret_cast<const char*>(&_timestamp), sizeof(_timestamp));
};
void write(std::stringstream& out) const {
// Add camera position
out << std::fixed << std::setprecision(7) << _position.x << ' '
<< std::fixed << std::setprecision(7) << _position.y << ' '
<< std::fixed << std::setprecision(7) << _position.z << ' ';
// Add camera rotation
out << std::fixed << std::setprecision(7) << _rotation.x << ' '
<< std::fixed << std::setprecision(7) << _rotation.y << ' '
<< std::fixed << std::setprecision(7) << _rotation.z << ' '
<< std::fixed << std::setprecision(7) << _rotation.w << ' ';
out << std::scientific << _scale << ' ';
if (_followNodeRotation) {
out << "F ";
}
else {
out << "- ";
}
out << _focusNode;
};
void read(std::istream* in) {
// Read position
in->read(reinterpret_cast<char*>(&_position), sizeof(_position));
@@ -194,6 +217,22 @@ struct CameraKeyframe {
// Read timestamp
in->read(reinterpret_cast<char*>(&_timestamp), sizeof(_timestamp));
};
void read(std::istringstream& iss) {
std::string rotationFollowing;
iss >> _position.x
>> _position.y
>> _position.z
>> _rotation.x
>> _rotation.y
>> _rotation.z
>> _rotation.w
>> _scale
>> rotationFollowing
>> _focusNode;
_followNodeRotation = (rotationFollowing == "F");
};
};
struct TimeKeyframe {
@@ -226,9 +265,35 @@ struct TimeKeyframe {
out->write(reinterpret_cast<const char*>(this), sizeof(TimeKeyframe));
};
void write(std::stringstream& out) const {
out << ' ' << _dt;
if (_paused) {
out << " P";
}
else {
out << " R";
}
if (_requiresTimeJump) {
out << " J";
}
else {
out << " -";
}
};
void read(std::istream* in) {
in->read(reinterpret_cast<char*>(this), sizeof(TimeKeyframe));
};
void read(std::istringstream& iss) {
std::string paused, jump;
iss >> _dt
>> paused
>> jump;
_paused = (paused == "P");
_requiresTimeJump = (jump == "J");
};
};
struct TimeTimeline {
@@ -308,6 +373,12 @@ struct ScriptMessage {
double _timestamp = 0.0;
void serialize(std::vector<char>& buffer) const {
size_t strLen = _script.size();
size_t writeSize_bytes = sizeof(size_t);
unsigned char const *p = reinterpret_cast<unsigned char const*>(&strLen);
buffer.insert(buffer.end(), p, p + writeSize_bytes);
buffer.insert(buffer.end(), _script.begin(), _script.end());
};
@@ -319,6 +390,29 @@ struct ScriptMessage {
out->write(_script.c_str(), _script.size());
};
void write(unsigned char* buf, size_t& idx, std::ofstream& file) const {
size_t strLen = _script.size();
size_t writeSize_bytes = sizeof(size_t);
unsigned char const *p = reinterpret_cast<unsigned char const*>(&strLen);
memcpy((buf + idx), p, writeSize_bytes);
idx += static_cast<unsigned int>(writeSize_bytes);
memcpy((buf + idx), _script.c_str(), _script.size());
idx += static_cast<unsigned int>(strLen);
file.write(reinterpret_cast<char*>(buf), idx);
//Write directly to file because some scripts can be very long
file.write(_script.c_str(), _script.size());
};
void write(std::stringstream& ss) const {
unsigned int numLinesInScript = static_cast<unsigned int>(
std::count(_script.begin(), _script.end(), '\n')
);
ss << ' ' << (numLinesInScript + 1) << ' ';
ss << _script;
}
void read(std::istream* in) {
size_t strLen;
//Read string length from file
@@ -331,6 +425,25 @@ struct ScriptMessage {
_script.erase();
_script = temp.data();
};
void read(std::istringstream& iss) {
int numScriptLines;
iss >> numScriptLines;
if (numScriptLines < 0) {
numScriptLines = 0;
}
std::string tmpReadbackScript;
_script.erase();
for (int i = 0; i < numScriptLines; ++i) {
std::getline(iss, tmpReadbackScript);
size_t start = tmpReadbackScript.find_first_not_of(" ");
tmpReadbackScript = tmpReadbackScript.substr(start);
_script.append(tmpReadbackScript);
if (i < (numScriptLines - 1)) {
_script.append("\n");
}
}
};
};
} // namespace openspace::messagestructures

View File

@@ -29,6 +29,7 @@
#include <openspace/interaction/navigationhandler.h>
#include <openspace/properties/propertyowner.h>
#include <openspace/util/keys.h>
#include <ghoul/misc/exception.h>
#include <optional>
#include <string>
#include <variant>
@@ -40,6 +41,14 @@ namespace scripting { struct LuaLibrary; }
class Profile {
public:
struct ParsingError : public ghoul::RuntimeError {
enum class Severity { Info, Warning, Error };
explicit ParsingError(Severity severity, std::string msg);
Severity severity;
};
// Version
struct Version {
int major = 0;
@@ -47,21 +56,18 @@ public:
};
struct Module {
std::string name;
std::string loadedInstruction;
std::string notLoadedInstruction;
std::optional<std::string> loadedInstruction;
std::optional<std::string> notLoadedInstruction;
};
struct Meta {
std::string name;
std::string version;
std::string description;
std::string author;
std::string url;
std::string license;
};
struct Asset {
std::string path;
std::string name;
std::optional<std::string> name;
std::optional<std::string> version;
std::optional<std::string> description;
std::optional<std::string> author;
std::optional<std::string> url;
std::optional<std::string> license;
};
struct Property {
enum class SetType {
SetPropertyValue,
@@ -87,13 +93,13 @@ public:
};
Type type;
std::string time;
std::string value;
};
struct CameraNavState {
static constexpr const char* Type = "setNavigationState";
std::string anchor;
std::string aim;
std::optional<std::string> aim;
std::string referenceFrame;
glm::dvec3 position;
std::optional<glm::dvec3> up;
@@ -109,21 +115,9 @@ public:
std::optional<double> altitude;
};
using CameraType = std::variant<CameraNavState, CameraGoToGeo>;
struct ParsingError : public ghoul::RuntimeError {
explicit ParsingError(std::string msg)
: ghoul::RuntimeError(std::move(msg), "profileFile")
{}
ParsingError(unsigned int lineNum, std::string msg)
: ghoul::RuntimeError(
fmt::format("Error @ line {}: {}", lineNum, std::move(msg)),
"profileFile"
)
{}
};
Profile() = default;
Profile(const std::vector<std::string>& content);
explicit Profile(const std::string& content);
std::string serialize() const;
std::string convertToScene() const;
@@ -141,7 +135,7 @@ public:
void setIgnoreUpdates(bool ignoreUpdates);
/// Adds a new asset and checks for duplicates
void addAsset(const std::string& path, const std::string& varName = "");
void addAsset(const std::string& path);
/// Removes an asset
void removeAsset(const std::string& path);
@@ -152,7 +146,7 @@ public:
Version version() const;
std::vector<Module> modules() const;
std::optional<Meta> meta() const;
std::vector<Asset> assets() const;
std::vector<std::string> assets() const;
std::vector<Property> properties() const;
std::vector<Keybinding> keybindings() const;
std::optional<Time> time() const;
@@ -176,6 +170,7 @@ public:
void setMarkNodes(std::vector<std::string>& n);
void setAdditionalScripts(std::vector<std::string>& s);
/**
* Returns the Lua library that contains all Lua functions available to provide
* profile functionality.
@@ -189,7 +184,7 @@ private:
Version _version = CurrentVersion;
std::vector<Module> _modules;
std::optional<Meta> _meta;
std::vector<Asset> _assets;
std::vector<std::string> _assets;
std::vector<Property> _properties;
std::vector<Keybinding> _keybindings;
std::optional<Time> _time;

View File

@@ -120,6 +120,7 @@ public:
void removeDeltaTimeChangeCallback(CallbackHandle handle);
void removeDeltaTimeStepsChangeCallback(CallbackHandle handle);
void triggerPlaybackStart();
void stopPlayback();
void removeTimeJumpCallback(CallbackHandle handle);
void removeTimelineChangeCallback(CallbackHandle handle);

View File

@@ -40,6 +40,8 @@
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtx/transform.hpp>
#include <cfloat>
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
@@ -211,7 +213,7 @@ int addExoplanetSystem(lua_State* L) {
);
}
bool notEnoughData = isnan(p.positionX) || isnan(p.a) || isnan(p.per);
bool notEnoughData = std::isnan(p.positionX) || std::isnan(p.a) || std::isnan(p.per);
if (notEnoughData) {
return ghoul::lua::luaError(
@@ -264,7 +266,7 @@ int addExoplanetSystem(lua_State* L) {
// Star renderable globe, if we have a radius
std::string starGlobeRenderableString;
const float starRadius = p.rStar;
if (!isnan(starRadius)) {
if (!std::isnan(starRadius)) {
std::ifstream colorMap(absPath(BvColormapPath), std::ios::in);
if (!colorMap.good()) {
@@ -329,21 +331,21 @@ int addExoplanetSystem(lua_State* L) {
Exoplanet planet = planetSystem[i];
const std::string planetName = planetNames[i];
if (isnan(planet.ecc)) {
if (std::isnan(planet.ecc)) {
planet.ecc = 0.f;
}
if (isnan(planet.i)) {
if (std::isnan(planet.i)) {
planet.i = 90.f;
}
if (isnan(planet.bigOm)) {
if (std::isnan(planet.bigOm)) {
planet.bigOm = 180.f;
}
if (isnan(planet.om)) {
if (std::isnan(planet.om)) {
planet.om = 90.f;
}
Time epoch;
std::string sEpoch;
if (!isnan(planet.tt)) {
if (!std::isnan(planet.tt)) {
epoch.setTime("JD " + std::to_string(planet.tt));
sEpoch = std::string(epoch.ISO8601());
}
@@ -358,8 +360,8 @@ int addExoplanetSystem(lua_State* L) {
const float solarRadius = static_cast<float>(distanceconstants::SolarRadius);
const float jupiterRadius = static_cast<float>(distanceconstants::JupiterRadius);
if (isnan(planet.r)) {
if (isnan(planet.rStar)) {
if (std::isnan(planet.r)) {
if (std::isnan(planet.rStar)) {
planetRadius = planet.a * 0.001f * astronomicalUnit;
}
else {
@@ -446,8 +448,8 @@ int addExoplanetSystem(lua_State* L) {
openspace::scripting::ScriptEngine::RemoteScripting::Yes
);
bool hasUpperAUncertainty = !isnan(planet.aUpper);
bool hasLowerAUncertainty = !isnan(planet.aLower);
bool hasUpperAUncertainty = !std::isnan(planet.aUpper);
bool hasLowerAUncertainty = !std::isnan(planet.aLower);
if (hasUpperAUncertainty && hasLowerAUncertainty) {
// Get the orbit plane of the planet trail orbit from the KeplerTranslation

View File

@@ -22,7 +22,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_MODULE_EXOPLENETS___RENDERABLEORBITDISC___H__
#ifndef __OPENSPACE_MODULE_EXOPLANETS___RENDERABLEORBITDISC___H__
#define __OPENSPACE_MODULE_EXOPLANETS___RENDERABLEORBITDISC___H__
#include <openspace/properties/stringproperty.h>
@@ -30,12 +30,12 @@
#include <openspace/properties/vector/vec2property.h>
#include <openspace/rendering/renderable.h>
#include <openspace/util/updatestructures.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/uniformcache.h>
namespace ghoul::filesystem { class File; }
namespace ghoul::opengl {
class ProgramObject;
class Texture;
} // namespace ghoul::opengl
namespace openspace {
@@ -79,4 +79,4 @@ private:
} // namespace openspace
#endif // __OPENSPACE_MODULE_EXOPLENETS___RENDERABLEORBITDISC___H__
#endif // __OPENSPACE_MODULE_EXOPLANETS___RENDERABLEORBITDISC___H__

View File

@@ -95,21 +95,31 @@ void ExoplanetsCsvToBinTask::perform(const Task::ProgressCallback& progressCallb
LINFOC("CSVTOBIN", fmt::format("Loading {} stars", total));
auto readFloatData = [](const std::string& str) -> float {
#ifdef WIN32
float result;
auto [p, ec] = std::from_chars(str.data(), str.data() + str.size(), result);
if (ec == std::errc()) {
return result;
}
return NAN;
#else
// clang is missing float support for std::from_chars
return !str.empty() ? std::stof(str.c_str(), nullptr) : NAN;
#endif
};
auto readDoubleData = [](const std::string& str) -> double {
#ifdef WIN32
double result;
auto [p, ec] = std::from_chars(str.data(), str.data() + str.size(), result);
if (ec == std::errc()) {
return result;
}
return NAN;
#else
// clang is missing double support for std::from_chars
return !str.empty() ? std::stod(str.c_str(), nullptr) : NAN;
#endif
};
auto readIntegerData = [](const std::string& str) -> int {

View File

@@ -53,9 +53,11 @@ set(MODULE_NAME openspace-module-fitsfilereader)
# CCfits is dependent on cfitsio, let it handle the internal linking
add_subdirectory(${CFITSIO_ROOT_DIR})
set_folder_location(cfitsio "External")
set(cfitsio_BUILD_SHARED_LIBS OFF)
add_subdirectory(${CCFITS_ROOT_DIR})
set_folder_location(CCfits "External")
set(CCfits_BUILD_SHARED_LIBS OFF)
if (GHOUL_DISABLE_EXTERNAL_WARNINGS)
disable_external_warnings(cfitsio)

View File

@@ -51,14 +51,16 @@
#include <ghoul/systemcapabilities/openglcapabilitiescomponent.h>
#include <numeric>
#include <queue>
#ifndef __APPLE__
#include <memory_resource>
#else
#include <vector>
#if defined(__APPLE__) || (defined(__linux__) && defined(__clang__))
#include <experimental/memory_resource>
namespace std {
using namespace experimental;
} // namespace std
#endif // __APPLE__
#else
#include <memory_resource>
#endif
namespace {
// Global flags to modify the RenderableGlobe
@@ -268,22 +270,22 @@ const Chunk& findChunkNode(const Chunk& node, const Geodetic2& location) {
return *n;
}
#ifndef __APPLE__
using ChunkTileVector = std::pmr::vector<std::pair<ChunkTile, const LayerRenderSettings*>>;
#else // __APPLE__
#if defined(__APPLE__) || (defined(__linux__) && defined(__clang__))
using ChunkTileVector = std::vector<std::pair<ChunkTile, const LayerRenderSettings*>>;
#endif // __APPLE__
#else
using ChunkTileVector = std::pmr::vector<std::pair<ChunkTile, const LayerRenderSettings*>>;
#endif
ChunkTileVector tilesAndSettingsUnsorted(const LayerGroup& layerGroup,
const TileIndex& tileIndex)
{
ZoneScoped
#ifndef __APPLE__
ChunkTileVector tilesAndSettings(&global::memoryManager.TemporaryMemory);
#else // __APPLE__
#if defined(__APPLE__) || (defined(__linux__) && defined(__clang__))
ChunkTileVector tilesAndSettings;
#endif // __APPLE__
#else
ChunkTileVector tilesAndSettings(&global::memoryManager.TemporaryMemory);
#endif
for (Layer* layer : layerGroup.activeLayers()) {
if (layer->tileProvider()) {
tilesAndSettings.emplace_back(

View File

@@ -63,6 +63,7 @@ set(OPENSPACE_SOURCE
${OPENSPACE_BASE_DIR}/src/interaction/shortcutmanager_lua.inl
${OPENSPACE_BASE_DIR}/src/interaction/websocketinputstate.cpp
${OPENSPACE_BASE_DIR}/src/interaction/websocketcamerastates.cpp
${OPENSPACE_BASE_DIR}/src/interaction/tasks/convertrecformattask.cpp
${OPENSPACE_BASE_DIR}/src/mission/mission.cpp
${OPENSPACE_BASE_DIR}/src/mission/missionmanager.cpp
${OPENSPACE_BASE_DIR}/src/mission/missionmanager_lua.inl
@@ -244,6 +245,7 @@ set(OPENSPACE_HEADER
${OPENSPACE_BASE_DIR}/include/openspace/interaction/shortcutmanager.h
${OPENSPACE_BASE_DIR}/include/openspace/interaction/websocketinputstate.h
${OPENSPACE_BASE_DIR}/include/openspace/interaction/websocketcamerastates.h
${OPENSPACE_BASE_DIR}/include/openspace/interaction/tasks/convertrecformattask.h
${OPENSPACE_BASE_DIR}/include/openspace/mission/mission.h
${OPENSPACE_BASE_DIR}/include/openspace/mission/missionmanager.h
${OPENSPACE_BASE_DIR}/include/openspace/network/parallelconnection.h
@@ -435,6 +437,8 @@ target_include_directories(openspace-core PUBLIC
${OPENSPACE_BASE_DIR}
# In order to use the date library
${OPENSPACE_BASE_DIR}/ext/date/include
# In order to use the nlohmann JSON library
${OPENSPACE_BASE_DIR}/ext
# In order to be able to include the module_registration file
${CMAKE_BINARY_DIR}/_generated/include
)

View File

@@ -318,12 +318,10 @@ void OpenSpaceEngine::initialize() {
);
}
std::vector<std::string> content;
std::string line;
while (std::getline(inFile, line)) {
content.push_back(std::move(line));
}
std::string content(
(std::istreambuf_iterator<char>(inFile)),
std::istreambuf_iterator<char>()
);
global::profile = Profile(content);
// Then save the profile to a scene so that we can load it with the
@@ -1169,9 +1167,7 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
);
}
if (!global::windowDelegate.isMaster()) {
global::renderEngine.updateScene();
}
global::renderEngine.updateScene();
global::renderEngine.updateRenderer();
global::renderEngine.updateScreenSpaceRenderables();
global::renderEngine.updateShaderPrograms();

View File

@@ -43,6 +43,14 @@ namespace {
namespace openspace::interaction {
KeyframeNavigator::CameraPose::CameraPose(datamessagestructures::CameraKeyframe&& kf)
: position(std::move(kf._position))
, rotation(std::move(kf._rotation))
, focusNode(std::move(kf._focusNode))
, scale(std::move(kf._scale))
, followFocusNodeRotation(std::move(kf._followNodeRotation))
{}
bool KeyframeNavigator::updateCamera(Camera& camera, bool ignoreFutureKeyframes) {
double now = currentTime();
bool foundPrevKeyframe = false;

File diff suppressed because it is too large Load Diff

View File

@@ -40,7 +40,7 @@ int startRecording(lua_State* L) {
return luaL_error(L, "filepath string is empty");
}
global::sessionRecording.setRecordDataFormat(
openspace::interaction::SessionRecording::RecordedDataMode::Binary
interaction::SessionRecording::DataMode::Binary
);
global::sessionRecording.startRecording(recordFilePath);
@@ -63,7 +63,7 @@ int startRecordingAscii(lua_State* L) {
return luaL_error(L, "filepath string is empty");
}
global::sessionRecording.setRecordDataFormat(
openspace::interaction::SessionRecording::RecordedDataMode::Ascii
interaction::SessionRecording::DataMode::Ascii
);
global::sessionRecording.startRecording(recordFilePath);
@@ -80,7 +80,7 @@ int stopRecording(lua_State* L) {
return 0;
}
int startPlayback(lua_State* L, openspace::interaction::KeyframeTimeRef timeMode,
int startPlayback(lua_State* L, interaction::KeyframeTimeRef timeMode,
bool forceSimTimeAtStart)
{
using ghoul::lua::luaTypeToString;
@@ -107,30 +107,30 @@ int startPlayback(lua_State* L, openspace::interaction::KeyframeTimeRef timeMode
int startPlaybackDefault(lua_State* L) {
ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::startPlaybackDefault");
using openspace::interaction::KeyframeNavigator;
using interaction::KeyframeNavigator;
return startPlayback(L,
openspace::interaction::KeyframeTimeRef::Relative_recordedStart, true);
interaction::KeyframeTimeRef::Relative_recordedStart, true);
}
int startPlaybackApplicationTime(lua_State* L) {
ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::startPlaybackApplicationTime");
return startPlayback(L,
openspace::interaction::KeyframeTimeRef::Relative_applicationStart, false);
interaction::KeyframeTimeRef::Relative_applicationStart, false);
}
int startPlaybackRecordedTime(lua_State* L) {
ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::startPlaybackRecordedTime");
using openspace::interaction::KeyframeNavigator;
using interaction::KeyframeNavigator;
return startPlayback(L,
openspace::interaction::KeyframeTimeRef::Relative_recordedStart, false);
interaction::KeyframeTimeRef::Relative_recordedStart, false);
}
int startPlaybackSimulationTime(lua_State* L) {
ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::startPlaybackSimulationTime");
using openspace::interaction::KeyframeNavigator;
using interaction::KeyframeNavigator;
return startPlayback(L,
openspace::interaction::KeyframeTimeRef::Absolute_simTimeJ2000, false);
interaction::KeyframeTimeRef::Absolute_simTimeJ2000, false);
}
int stopPlayback(lua_State* L) {

View File

@@ -0,0 +1,339 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2020 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <openspace/interaction/tasks/convertrecformattask.h>
#include <openspace/interaction/sessionrecording.h>
#include <openspace/documentation/verifier.h>
#include <openspace/engine/globals.h>
#include <ghoul/filesystem/file.h>
#include <ghoul/filesystem/filesystem.h>
#include <iomanip>
#include <ghoul/logging/logmanager.h>
namespace {
constexpr const char* _loggerCat = "ConvertRecFormatTask";
constexpr const char* KeyConvertToAscii = "ConvertToAscii";
constexpr const char* KeyConvertToBinary = "ConvertToBinary";
constexpr const char* KeyInFilePath = "InputFilePath";
constexpr const char* KeyOutFilePath = "OutputFilePath";
} // namespace
namespace openspace::interaction {
ConvertRecFormatTask::ConvertRecFormatTask(const ghoul::Dictionary& dictionary) {
openspace::documentation::testSpecificationAndThrow(
documentation(),
dictionary,
"ConvertRecFormatTask"
);
_inFilePath = absPath(dictionary.value<std::string>(KeyInFilePath));
_outFilePath = absPath(dictionary.value<std::string>(KeyOutFilePath));
ghoul_assert(FileSys.fileExists(_inFilePath), "The filename must exist");
if (!FileSys.fileExists(_inFilePath)) {
LERROR(fmt::format("Failed to load session recording file: {}", _inFilePath));
}
else {
_iFile.open(_inFilePath, std::ifstream::in);
determineFormatType();
}
}
ConvertRecFormatTask::~ConvertRecFormatTask() {
_iFile.close();
_oFile.close();
}
std::string ConvertRecFormatTask::description() {
std::string description = "Convert session recording file '" + _inFilePath + "' ";
if (_fileFormatType == SessionRecording::DataMode::Ascii) {
description += "(ascii format) ";
}
else if (_fileFormatType == SessionRecording::DataMode::Binary) {
description += "(binary format) ";
}
else {
description += "(UNKNOWN format) ";
}
description += "conversion to file '" + _outFilePath + "'.";
return description;
}
void ConvertRecFormatTask::perform(const Task::ProgressCallback& progressCallback) {
convert();
}
void ConvertRecFormatTask::convert() {
std::string expectedFileExtension_in, expectedFileExtension_out;
std::string currentFormat;
if (_fileFormatType == SessionRecording::DataMode::Binary) {
currentFormat = "binary";
expectedFileExtension_in = SessionRecording::FileExtensionBinary;
expectedFileExtension_out = SessionRecording::FileExtensionAscii;
}
else if (_fileFormatType == SessionRecording::DataMode::Ascii) {
currentFormat = "ascii";
expectedFileExtension_in = SessionRecording::FileExtensionAscii;
expectedFileExtension_out = SessionRecording::FileExtensionBinary;
}
if (!SessionRecording::hasFileExtension(_inFilePath, expectedFileExtension_in)) {
LWARNING(fmt::format(
"Input filename doesn't have expected {} "
"format file extension",
currentFormat)
);
}
if (SessionRecording::hasFileExtension(_outFilePath, expectedFileExtension_in)) {
LERROR(fmt::format(
"Output filename has {} file extension, but is conversion from {}",
currentFormat,
currentFormat)
);
return;
}
else if (!SessionRecording::hasFileExtension(_outFilePath, expectedFileExtension_out)) {
_outFilePath += expectedFileExtension_out;
}
if (_fileFormatType == SessionRecording::DataMode::Ascii) {
_oFile.open(_outFilePath);
}
else if (_fileFormatType == SessionRecording::DataMode::Binary) {
_oFile.open(_outFilePath, std::ios::binary);
}
_oFile.write(
SessionRecording::FileHeaderTitle.c_str(),
SessionRecording::FileHeaderTitle.length()
);
_oFile.write(
SessionRecording::FileHeaderVersion,
SessionRecording::FileHeaderVersionLength
);
_oFile.close();
if (_fileFormatType == SessionRecording::DataMode::Ascii) {
convertToBinary();
}
else if (_fileFormatType == SessionRecording::DataMode::Binary) {
convertToAscii();
}
else {
//Add error output for file type not recognized
LERROR("Session recording file unrecognized format type.");
}
}
void ConvertRecFormatTask::determineFormatType() {
_fileFormatType = SessionRecording::DataMode::Unknown;
std::string line;
line = SessionRecording::readHeaderElement(_iFile,
SessionRecording::FileHeaderTitle.length());
if (line.substr(0, SessionRecording::FileHeaderTitle.length())
!= SessionRecording::FileHeaderTitle)
{
LERROR(fmt::format("Session recording file {} does not have expected header.",
_inFilePath));
}
else {
//Read version string and throw it away (and also line feed character at end)
SessionRecording::readHeaderElement(_iFile,
SessionRecording::FileHeaderVersionLength);
line = SessionRecording::readHeaderElement(_iFile, 1);
SessionRecording::readHeaderElement(_iFile, 1);
if (line.at(0) == SessionRecording::DataFormatAsciiTag) {
_fileFormatType = SessionRecording::DataMode::Ascii;
}
else if (line.at(0) == SessionRecording::DataFormatBinaryTag) {
_fileFormatType = SessionRecording::DataMode::Binary;
}
}
}
void ConvertRecFormatTask::convertToAscii() {
SessionRecording::Timestamps times;
datamessagestructures::CameraKeyframe ckf;
datamessagestructures::TimeKeyframe tkf;
datamessagestructures::ScriptMessage skf;
int lineNum = 1;
unsigned char frameType;
_oFile.open(_outFilePath, std::ifstream::app);
char tmpType = SessionRecording::DataFormatAsciiTag;
_oFile.write(&tmpType, 1);
_oFile.write("\n", 1);
bool fileReadOk = true;
while (fileReadOk) {
frameType = readFromPlayback<unsigned char>(_iFile);
// Check if have reached EOF
if (!_iFile) {
LINFO(fmt::format(
"Finished converting {} entries from file {}",
lineNum - 1, _inFilePath
));
fileReadOk = false;
break;
}
std::stringstream keyframeLine = std::stringstream();
keyframeLine.str(std::string());
if (frameType == SessionRecording::HeaderCameraBinary) {
SessionRecording::readCameraKeyframeBinary(times, ckf, _iFile, lineNum);
SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderCameraAscii,
keyframeLine);
ckf.write(keyframeLine);
}
else if (frameType == SessionRecording::HeaderTimeBinary) {
SessionRecording::readTimeKeyframeBinary(times, tkf, _iFile, lineNum);
SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderTimeAscii,
keyframeLine);
tkf.write(keyframeLine);
}
else if (frameType == SessionRecording::HeaderScriptBinary) {
SessionRecording::readScriptKeyframeBinary(times, skf, _iFile, lineNum);
SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderScriptAscii,
keyframeLine);
skf.write(keyframeLine);
}
else {
LERROR(fmt::format(
"Unknown frame type @ index {} of playback file {}",
lineNum - 1, _inFilePath
));
break;
}
SessionRecording::saveKeyframeToFile(keyframeLine.str(), _oFile);
lineNum++;
}
_oFile.close();
}
void ConvertRecFormatTask::convertToBinary() {
SessionRecording::Timestamps times;
datamessagestructures::CameraKeyframe ckf;
datamessagestructures::TimeKeyframe tkf;
datamessagestructures::ScriptMessage skf;
int lineNum = 1;
std::string lineContents;
unsigned char keyframeBuffer[SessionRecording::_saveBufferMaxSize_bytes];
_oFile.open(_outFilePath, std::ifstream::app | std::ios::binary);
char tmpType = SessionRecording::DataFormatBinaryTag;
_oFile.write(&tmpType, 1);
_oFile.write("\n", 1);
size_t idx = 0;
while (std::getline(_iFile, lineContents)) {
lineNum++;
std::istringstream iss(lineContents);
std::string entryType;
if (!(iss >> entryType)) {
LERROR(fmt::format(
"Error reading entry type @ line {} of file {}",
lineNum, _inFilePath
));
break;
}
if (entryType == SessionRecording::HeaderCameraAscii) {
SessionRecording::readCameraKeyframeAscii(times, ckf, lineContents, lineNum);
SessionRecording::saveCameraKeyframeBinary(times, ckf, keyframeBuffer,
_oFile);
}
else if (entryType == SessionRecording::HeaderTimeAscii) {
SessionRecording::readTimeKeyframeAscii(times, tkf, lineContents, lineNum);
SessionRecording::saveTimeKeyframeBinary(times, tkf, keyframeBuffer,
_oFile);
}
else if (entryType == SessionRecording::HeaderScriptAscii) {
SessionRecording::readScriptKeyframeAscii(times, skf, lineContents, lineNum);
SessionRecording::saveScriptKeyframeBinary(times, skf, keyframeBuffer,
_oFile);
}
else if (entryType.substr(0, 1) == SessionRecording::HeaderCommentAscii) {
continue;
}
else {
LERROR(fmt::format(
"Unknown frame type {} @ line {} of file {}",
entryType, lineContents, _inFilePath
));
break;
}
}
_oFile.close();
LINFO(fmt::format(
"Finished converting {} entries from file {}",
lineNum, _inFilePath
));
}
std::string ConvertRecFormatTask::addFileSuffix(const std::string& filePath,
const std::string& suffix)
{
size_t lastdot = filePath.find_last_of(".");
std::string extension = filePath.substr(0, lastdot);
if (lastdot == std::string::npos) {
return filePath + suffix;
}
else {
return filePath.substr(0, lastdot) + suffix + extension;
}
}
documentation::Documentation ConvertRecFormatTask::documentation() {
using namespace documentation;
return {
"ConvertRecFormatTask",
"convert_format_task",
{
{
"Type",
new StringEqualVerifier("ConvertRecFormatTask"),
Optional::No,
"The type of this task",
},
{
KeyInFilePath,
new StringAnnotationVerifier("A valid filename to convert"),
Optional::No,
"The filename to convert to the opposite format.",
},
{
KeyOutFilePath,
new StringAnnotationVerifier("A valid output filename"),
Optional::No,
"The filename containing the converted result.",
},
},
};
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -108,8 +108,7 @@ std::string_view Time::ISO8601() const {
std::memset(b, 0, S);
SpiceManager::ref().dateFromEphemerisTime(_time, b, S, Format);
return std::string_view(b, S-1);
return std::string_view(b, S - 1);
}
void Time::ISO8601(char* buffer) const {

View File

@@ -297,7 +297,6 @@ void TimeManager::progressTime(double dt) {
// and time is not paused, just advance time.
_deltaTime = _targetDeltaTime;
_currentTime.data().advanceTime(dt * _deltaTime);
_playbackModeEnabled = false;
}
if (hasPastKeyframes) {
@@ -523,6 +522,10 @@ void TimeManager::triggerPlaybackStart() {
_playbackModeEnabled = true;
}
void TimeManager::stopPlayback() {
_playbackModeEnabled = false;
}
void TimeManager::removeTimeJumpCallback(CallbackHandle handle) {
const auto it = std::find_if(
_timeJumpCallbacks.begin(),

View File

@@ -111,7 +111,6 @@ function (set_openspace_compile_settings project)
${project}
PRIVATE
"-stdlib=libc++"
"-std=gnu++17"
"-Wall"
"-Wextra"
"-Wabstract-vbase-init"
@@ -192,7 +191,7 @@ function (set_openspace_compile_settings project)
"-Wzero-length-array"
"-Wno-missing-braces"
)
elseif (LINUX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
elseif (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (OPENSPACE_WARNINGS_AS_ERRORS)
target_compile_options(${project} PRIVATE "-Werror")
endif ()
@@ -200,8 +199,8 @@ function (set_openspace_compile_settings project)
target_compile_options(
${project}
PRIVATE
"-stdlib=libstdc++"
"-std=gnu++17"
"-stdlib=libc++"
"-std=c++17"
"-Wall"
"-Wextra"
"-Wabstract-vbase-init"
@@ -282,6 +281,9 @@ function (set_openspace_compile_settings project)
"-Wzero-length-array"
"-Wno-missing-braces"
)
target_link_libraries(${project} PRIVATE "c++" "c++abi")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(
${project}

View File

@@ -0,0 +1,8 @@
{
"version": { "major": 12, "minor": 13 },
"additional_scripts": [
"script-1",
"script-2",
"script-3"
]
}

View File

@@ -0,0 +1,8 @@
{
"version": { "major": 12, "minor": 13 },
"assets": [
"folder1/folder2/asset",
"folder3/folder4/asset2",
"folder5/folder6/asset3"
]
}

View File

@@ -0,0 +1,9 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"longitude": 2.0
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"pitch": -10.0
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"delta_times": [
1.0,
30.0,
60.0,
1000.0,
36000.0
]
}

View File

@@ -0,0 +1,29 @@
{
"version": { "major": 12, "minor": 13 },
"keybindings": [
{
"key": "T",
"documentation": "T documentation",
"name": "T name",
"gui_path": "T Gui-Path",
"is_local": true,
"script": "T script"
},
{
"key": "U",
"documentation": "U documentation",
"name": "U name",
"gui_path": "U Gui-Path",
"is_local": false,
"script": "U script"
},
{
"key": "CTRL+V",
"documentation": "CTRL+V documentation",
"name": "CTRL+V name",
"gui_path": "CTRL+V Gui-Path",
"is_local": false,
"script": "CTRL+V script"
}
]
}

View File

@@ -0,0 +1,6 @@
{
"version": { "major": 12, "minor": 13 },
"mark_nodes": [
"node-1", "node-2", "node-3"
]
}

View File

@@ -0,0 +1,11 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"description": "description",
"author": "author",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,11 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"description": "description",
"author": "author",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"description": "description",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"author": "author",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"description": "description",
"author": "author",
"url": "url"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"version": "version",
"description": "description",
"author": "author",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"version": "version",
"description": "description",
"author": "author",
"license": "license"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"meta": {
"name": "name",
"description": "description",
"author": "author",
"url": "url",
"license": "license"
}
}

View File

@@ -0,0 +1,19 @@
{
"version": { "major": 12, "minor": 13 },
"modules": [
{ "name": "abs-module" },
{
"name": "def-module",
"loadedInstruction": "instr"
},
{
"name": "ghi-module",
"notLoadedInstruction": "not_instr"
},
{
"name": "jkl-module",
"loadedInstruction": "instr",
"notLoadedInstruction": "not_instr"
}
]
}

View File

@@ -0,0 +1,35 @@
{
"version": { "major": 12, "minor": 13 },
"properties": [
{
"type": "setPropertyValue",
"name": "property_name_1",
"value": "property_value_1"
},
{
"type": "setPropertyValue",
"name": "property_name_2",
"value": "property_value_2"
},
{
"type": "setPropertyValue",
"name": "property_name_3",
"value": "property_value_3"
},
{
"type": "setPropertyValueSingle",
"name": "property_name_4",
"value": "property_value_4"
},
{
"type": "setPropertyValueSingle",
"name": "property_name_5",
"value": "property_value_5"
},
{
"type": "setPropertyValueSingle",
"name": "property_name_6",
"value": "property_value_6"
}
]
}

View File

@@ -0,0 +1,7 @@
{
"version": { "major": 12, "minor": 13 },
"time": {
"type": "absolute",
"value": "2020-06-01T12:00:00"
}
}

View File

@@ -0,0 +1,7 @@
{
"version": { "major": 12, "minor": 13 },
"time": {
"type": "relative",
"value": "-1d"
}
}

View File

@@ -1,7 +0,0 @@
#Version
12.13
#AdditionalScripts
script-1
script-2
script-3

View File

@@ -1,7 +0,0 @@
#Version
12.13
#Asset
folder1/folder2/asset
folder3/folder4/asset2 variable
folder5/folder6/asset3

View File

@@ -1,5 +0,0 @@
#Version
12.13
#Camera
goToGeo "anchor" 1.0 2.0

View File

@@ -1,5 +0,0 @@
#Version
12.13
#Camera
goToGeo "anchor" 1.0 2.0 4.0

View File

@@ -1,5 +0,0 @@
#Version
12.13
#Camera
setNavigationState "node" "root" 1.0, 2.0, 3.0 4.0, 5.0, 6.0 10.0 -10.0

View File

@@ -1,9 +0,0 @@
#Version
12.13
#DeltaTimes
1.0
30.0
60.0
1000.0
36000.0

View File

@@ -1,7 +0,0 @@
#Version
12.13
#Keybinding
T T documentation T name T Gui-Path true T script
U U documentation U name U Gui-Path false U script
CTRL+V CTRL+V documentation CTRL+V name CTRL+V Gui-Path false CTRL+V script

View File

@@ -1,7 +0,0 @@
#Version
12.13
#MarkNodes
node-1
node-2
node-3

View File

@@ -1,10 +0,0 @@
#Version
12.13
#Meta
Name name
Version version
Description description
Author author
URL url
License license

View File

@@ -1,7 +0,0 @@
#Version
12.13
#Module
abc-module
def-module
ghi-module

View File

@@ -1,10 +0,0 @@
#Version
12.13
#Property
setPropertyValue property_name_1 property_value_1
setPropertyValue property_name_2 property_value_2
setPropertyValue property_name_3 property_value_3
setPropertyValueSingle property_name_4 property_value_5
setPropertyValueSingle property_name_4 property_value_5
setPropertyValueSingle property_name_4 property_value_5

View File

@@ -1,5 +0,0 @@
#Version
12.13
#Time
absolute 2020-06-01T12:00:00

View File

@@ -1,5 +0,0 @@
#Version
12.13
#Time
relative -1d

View File

@@ -1,2 +0,0 @@
#Version
100

View File

@@ -1,2 +0,0 @@
#Version
100.200

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,9 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"latitude": 1.0,
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,9 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,9 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"longitude": 2.0,
"altitude": "a"
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": 1.0,
"latitude": 1.0,
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": "a",
"longitude": 2.0,
"altitude": 4.0
}
}

View File

@@ -0,0 +1,10 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "goToGeo",
"anchor": "anchor",
"latitude": 1.0,
"longitude": "a",
"altitude": 4.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,12 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0 },
"up": { "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0 },
"up": { "x": 1.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0 },
"up": { "x": 1.0, "y": 5.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": 1.0,
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": 1.0,
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": 1.0,
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": "a"
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": "p",
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": "a", "y": 2.0, "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": "a", "z": 3.0},
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": "a" },
"up": { "x": 4.0, "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0},
"up": "a",
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0 },
"up": { "x": "a", "y": 5.0, "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

View File

@@ -0,0 +1,13 @@
{
"version": { "major": 12, "minor": 13 },
"camera": {
"type": "setNavigationState",
"anchor": "none",
"aim": "aim",
"frame": "root",
"position": { "x": 1.0, "y": 2.0, "z": 3.0 },
"up": { "x": 4.0, "y": "a", "z": 6.0 },
"yaw": 10.0,
"pitch": -10.0
}
}

Some files were not shown because too many files have changed in this diff Show More