RenderableCrawlingLine

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Color

Specifies the colors that are used for the crawling line. One value determines the starting color of the line, the second value is the color at the end

Table

Table parameters

No

Instrument

Denotes the SPICE name of the instrument that is used to render the crawling line

String

Value of type ‘String’

No

Source

Denotes the SPICE name of the source of the renderable crawling line, for example, the spacecraft

String

Value of type ‘String’

No

Target

Denotes the SPICE name of the target of the crawling line

String

Value of type ‘String’

No

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting determines whether this object will be visible or not

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

This tells the type of the renderable

String

Value of type ‘String’

Yes

Table parameters for Color

Specifies the colors that are used for the crawling line. One value determines the starting color of the line, the second value is the color at the end

  • Optional: No

Name

Documentation

Type

Description

Optional

End

The color at the end of the line

Color4

Value of type ‘Color4’

No

Start

The color at the start of the line

Color4

Value of type ‘Color4’

No

Asset Examples

  1local transforms = asset.require("./transforms")
  2local kernels = asset.require("./kernels")
  3local coreKernels = asset.require("spice/core")
  4
  5
  6
  7local LorriOffset = { -6.626, -4.1, -3.23 }
  8local RalphOffset = {   -6.9, -4.6,  8.7  }
  9local AliceOffset = {   -7.9, -1.7,  8.3  }
 10local RexOffset   = {      0,    0,    0  }
 11
 12local Lorri = {
 13  Identifier = "NH_LORRI",
 14  Parent = transforms.NewHorizonsPosition.Identifier,
 15  Transform = {
 16    Translation = {
 17      Type = "StaticTranslation",
 18      Position = LorriOffset
 19    }
 20  },
 21  Renderable = {
 22    Type = "RenderableFov",
 23    Body = kernels.ID.NewHorizons,
 24    Frame = kernels.Frame.NewHorizons,
 25    Color = { 0.8, 0.7, 0.7 },
 26    Instrument = {
 27      Name = kernels.Frame.Lorri,
 28      Aberration = "NONE"
 29    },
 30    PotentialTargets = {
 31      kernels.ID.Pluto,
 32      kernels.ID.Charon
 33    }
 34  },
 35  GUI = {
 36    Name = "LORRI",
 37    Path = "/Solar System/Missions/New Horizons/Instruments"
 38  }
 39}
 40
 41local RalphLeisa = {
 42  Identifier = "NH_RALPH_LEISA",
 43  Parent = transforms.NewHorizonsPosition.Identifier,
 44  Transform = {
 45    Translation = {
 46      Type = "StaticTranslation",
 47      Position = RalphOffset
 48    }
 49  },
 50  Renderable = {
 51    Type = "RenderableFov",
 52    Body = kernels.ID.NewHorizons,
 53    Frame = kernels.Frame.NewHorizons,
 54    RGB = { 0.8, 0.7, 0.7 },
 55    Instrument = {
 56      Name = kernels.Frame.RalphLeisa,
 57      Aberration = "NONE"
 58    },
 59    PotentialTargets = {
 60      kernels.ID.Pluto,
 61      kernels.ID.Charon
 62    }
 63  },
 64  GUI = {
 65    Name = "RALPH LEISA",
 66    Path = "/Solar System/Missions/New Horizons/Instruments"
 67  }
 68}
 69
 70local RalphMvicPan1 = {
 71  Identifier = "NH_RALPH_MVIC_PAN1",
 72  Parent = transforms.NewHorizonsPosition.Identifier,
 73  Transform = {
 74    Translation = {
 75      Type = "StaticTranslation",
 76      Position = RalphOffset
 77    }
 78  },
 79  Renderable = {
 80    Type = "RenderableFov",
 81    Body = kernels.ID.NewHorizons,
 82    Frame = kernels.Frame.NewHorizons,
 83    RGB = { 0.8, 0.7, 0.7 },
 84    Instrument = {
 85      Name = kernels.Frame.RalphMvicPan1,
 86      Aberration = "NONE"
 87    },
 88    PotentialTargets = {
 89      kernels.ID.Pluto,
 90      kernels.ID.Charon
 91    }
 92  },
 93  GUI = {
 94    Name = "RALPH MVIC PAN 1",
 95    Path = "/Solar System/Missions/New Horizons/Instruments"
 96  }
 97}
 98
 99local RalphMvicPan2 = {
100  Identifier = "NH_RALPH_MVIC_PAN2",
101  Parent = transforms.NewHorizonsPosition.Identifier,
102  Transform = {
103    Translation = {
104      Type = "StaticTranslation",
105      Position = RalphOffset
106    }
107  },
108  Renderable = {
109    Type = "RenderableFov",
110    Body = kernels.ID.NewHorizons,
111    Frame = kernels.Frame.NewHorizons,
112    RGB = { 0.8, 0.7, 0.7 },
113    Instrument = {
114      Name = kernels.Frame.RalphMvicPan2,
115      Aberration = "NONE"
116    },
117    PotentialTargets = {
118      kernels.ID.Pluto,
119      kernels.ID.Charon
120    }
121  },
122  GUI = {
123    Name = "RALPH MVIC PAN 2",
124    Path = "/Solar System/Missions/New Horizons/Instruments"
125  }
126}
127
128local RalphMvicRed = {
129  Identifier = "NH_RALPH_MVIC_RED",
130  Parent = transforms.NewHorizonsPosition.Identifier,
131  Transform = {
132    Translation = {
133      Type = "StaticTranslation",
134      Position = RalphOffset
135    }
136  },
137  Renderable = {
138    Type = "RenderableFov",
139    Body = kernels.ID.NewHorizons,
140    Frame = kernels.Frame.NewHorizons,
141    RGB = { 0.8, 0.7, 0.7 },
142    Instrument = {
143      Name = kernels.Frame.RalphMvicRed,
144      Aberration = "NONE"
145    },
146    PotentialTargets = {
147      kernels.ID.Pluto,
148      kernels.ID.Charon
149    }
150  },
151  GUI = {
152    Name = "RALPH MVIC RED",
153    Path = "/Solar System/Missions/New Horizons/Instruments"
154  }
155}
156
157local RalphMvicBlue = {
158  Identifier = "NH_RALPH_MVIC_BLUE",
159  Parent = transforms.NewHorizonsPosition.Identifier,
160  Transform = {
161    Translation = {
162      Type = "StaticTranslation",
163      Position = RalphOffset
164    }
165  },
166  Renderable = {
167    Type = "RenderableFov",
168    Body = kernels.ID.NewHorizons,
169    Frame = kernels.Frame.NewHorizons,
170    RGB = { 0.8, 0.7, 0.7 },
171    Instrument = {
172      Name = kernels.Frame.RalphMvicBlue,
173      Aberration = "NONE"
174    },
175    PotentialTargets = {
176      kernels.ID.Pluto,
177      kernels.ID.Charon
178    }
179  },
180  GUI = {
181    Name = "RALPH MVIC BLUE",
182    Path = "/Solar System/Missions/New Horizons/Instruments"
183  }
184}
185
186local RalphMvicFt = {
187  Identifier = "NH_RALPH_MVIC_FT",
188  Parent = transforms.NewHorizonsPosition.Identifier,
189  Transform = {
190    Translation = {
191      Type = "StaticTranslation",
192      Position = RalphOffset
193    }
194  },
195  Renderable = {
196    Type = "RenderableFov",
197    Body = kernels.ID.NewHorizons,
198    Frame = kernels.Frame.NewHorizons,
199    RGB = { 0.8, 0.7, 0.7 },
200    Instrument = {
201      Name = kernels.Frame.RalphMvicFT,
202      Aberration = "NONE"
203    },
204    PotentialTargets = {
205      kernels.ID.Pluto,
206      kernels.ID.Charon
207    }
208  },
209  GUI = {
210    Name = "RALPH MVIC FT",
211    Path = "/Solar System/Missions/New Horizons/Instruments"
212  }
213}
214
215local RalphMvicMethane = {
216  Identifier = "NH_RALPH_MVIC_METHANE",
217  Parent = transforms.NewHorizonsPosition.Identifier,
218  Transform = {
219    Translation = {
220      Type = "StaticTranslation",
221      Position = RalphOffset
222    }
223  },
224  Renderable = {
225    Type = "RenderableFov",
226    Body = kernels.ID.NewHorizons,
227    Frame = kernels.Frame.NewHorizons,
228    RGB = { 0.8, 0.7, 0.7 },
229    Instrument = {
230      Name = kernels.Frame.RalphMvicMethane,
231      Aberration = "NONE"
232    },
233    PotentialTargets = {
234      kernels.ID.Pluto,
235      kernels.ID.Charon
236    }
237  },
238  GUI = {
239    Name = "RALPH MVIC METHANE",
240    Path = "/Solar System/Missions/New Horizons/Instruments"
241  }
242}
243
244local RalphMvicNir = {
245  Identifier = "NH_RALPH_MVIC_NIR",
246  Parent = transforms.NewHorizonsPosition.Identifier,
247  Transform = {
248    Translation = {
249      Type = "StaticTranslation",
250      Position = RalphOffset
251    }
252  },
253  Renderable = {
254    Type = "RenderableFov",
255    Body = kernels.ID.NewHorizons,
256    Frame = kernels.Frame.NewHorizons,
257    RGB = { 0.8, 0.7, 0.7 },
258    Instrument = {
259      Name = kernels.Frame.RalphMvicNIR,
260      Aberration = "NONE"
261    },
262    PotentialTargets = {
263      kernels.ID.Pluto,
264      kernels.ID.Charon
265    }
266  },
267  GUI = {
268    Name = "RALPH MVIC NIR",
269    Path = "/Solar System/Missions/New Horizons/Instruments"
270  }
271}
272
273local AliceAirglow = {
274  Identifier = "NH_ALICE_AIRGLOW",
275  Parent = transforms.NewHorizonsPosition.Identifier,
276  Transform = {
277    Translation = {
278      Type = "StaticTranslation",
279      Position = AliceOffset
280    }
281  },
282  Renderable = {
283    Type = "RenderableFov",
284    Body = kernels.ID.NewHorizons,
285    Frame = kernels.Frame.NewHorizons,
286    RGB = { 0.8, 0.7, 0.7 },
287    Instrument = {
288      Name = kernels.Frame.AliceAirglow,
289      Aberration = "NONE"
290    },
291    PotentialTargets = {
292      kernels.ID.Pluto,
293      kernels.ID.Charon
294    },
295    SimplifyBounds = true
296  },
297  GUI = {
298    Name = "ALICE AIRGLOW",
299    Path = "/Solar System/Missions/New Horizons/Instruments"
300  }
301}
302
303local AliceSoc = {
304  Identifier = "NH_ALICE_SOC",
305  Parent = transforms.NewHorizonsPosition.Identifier,
306  Transform = {
307    Translation = {
308      Type = "StaticTranslation",
309      Position = AliceOffset
310    }
311  },
312  Renderable = {
313    Type = "RenderableFov",
314    Body = kernels.ID.NewHorizons,
315    Frame = kernels.Frame.NewHorizons,
316    RGB = { 0.8, 0.7, 0.7 },
317    Instrument = {
318      Name = kernels.Frame.AliceSOC,
319      Aberration = "NONE"
320    },
321    PotentialTargets = {
322      kernels.ID.Pluto,
323      kernels.ID.Charon
324    }
325  },
326  GUI = {
327    Name = "ALICE SOC",
328    Path = "/Solar System/Missions/New Horizons/Instruments"
329  }
330}
331
332local Rex = {
333  Identifier = "NH_REX",
334  Parent = transforms.NewHorizonsPosition.Identifier,
335  Transform = {
336    Translation = {
337      Type = "StaticTranslation",
338      Position = RexOffset
339    },
340    Rotation = {
341      Type = "StaticRotation",
342      Rotation = { -math.pi / 2, 0.0, -math.pi / 2 }
343    }
344  },
345  Renderable = {
346    Type = "RenderableCrawlingLine",
347    Source = kernels.ID.Rex,
348    Target = coreKernels.ID.Earth,
349    Instrument = kernels.Frame.Rex,
350    Color = {
351      Start = { 1.0, 0.7, 0.0, 1.0 },
352      End = { 0.0, 0.0, 0.0, 0.0 }
353    }
354  },
355  GUI = {
356    Name = "REX",
357    Path = "/Solar System/Missions/New Horizons/Instruments"
358  }
359}
360
361
362asset.onInitialize(function()
363  openspace.addSceneGraphNode(Lorri)
364  openspace.addSceneGraphNode(RalphLeisa)
365  openspace.addSceneGraphNode(RalphMvicPan1)
366  openspace.addSceneGraphNode(RalphMvicPan2)
367  openspace.addSceneGraphNode(RalphMvicRed)
368  openspace.addSceneGraphNode(RalphMvicBlue)
369  openspace.addSceneGraphNode(RalphMvicFt)
370  openspace.addSceneGraphNode(RalphMvicMethane)
371  openspace.addSceneGraphNode(RalphMvicNir)
372  openspace.addSceneGraphNode(AliceAirglow)
373  openspace.addSceneGraphNode(AliceSoc)
374  openspace.addSceneGraphNode(Rex)
375end)
376
377asset.onDeinitialize(function()
378  openspace.removeSceneGraphNode(Rex)
379  openspace.removeSceneGraphNode(AliceSoc)
380  openspace.removeSceneGraphNode(AliceAirglow)
381  openspace.removeSceneGraphNode(RalphMvicNir)
382  openspace.removeSceneGraphNode(RalphMvicMethane)
383  openspace.removeSceneGraphNode(RalphMvicFt)
384  openspace.removeSceneGraphNode(RalphMvicBlue)
385  openspace.removeSceneGraphNode(RalphMvicRed)
386  openspace.removeSceneGraphNode(RalphMvicPan2)
387  openspace.removeSceneGraphNode(RalphMvicPan1)
388  openspace.removeSceneGraphNode(RalphLeisa)
389  openspace.removeSceneGraphNode(Lorri)
390end)
391
392asset.export(Lorri)
393asset.export(RalphLeisa)
394asset.export(RalphMvicPan1)
395asset.export(RalphMvicPan2)
396asset.export(RalphMvicRed)
397asset.export(RalphMvicBlue)
398asset.export(RalphMvicFt)
399asset.export(RalphMvicMethane)
400asset.export(RalphMvicNir)
401asset.export(AliceAirglow)
402asset.export(AliceSoc)
403asset.export(Rex)