StaticRotation

Inherits Rotation

Members

Name

Documentation

Type

Description

Optional

Rotation

Stores the static rotation as a vector containing Euler angles, a quaternion or a rotation matrix

Vector3<double>, Vector4<double>, or Matrix3x3<double>

Value of type ‘Vector3’, Value of type ‘Vector4’, or Value of type ‘Matrix3x3

No

Inherited members from Rotation

Name

Documentation

Type

Description

Optional

Type

The type of the rotation that is described in this element. The available types of rotations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation

String

Must name a valid Rotation type

No

Asset Examples

 1-- Fading
 2-- Example of a point cloud with distance-based fading.
 3
 4local Node = {
 5  Identifier = "RenderablePointCloud_Example_Fading",
 6  Renderable = {
 7    Type = "RenderablePointCloud",
 8    File = asset.resource("../data/dummydata.csv"),
 9    Coloring = {
10      FixedColor = { 0.0, 0.3, 1.0 }
11    },
12    Fading = {
13      -- Control at what distance the points fade in. The points will be invisible
14      -- when the camera is closer than the first value, and fully visible when the
15      -- camera is further away then the last value. In-between they will linearly
16      -- fade in or out
17      FadeInDistances = { 150000000.0, 350000000.0 }
18    }
19  },
20  GUI = {
21    Name = "Fading",
22    Path = "/Examples/RenderablePointCloud/Advanced",
23    Description = [[Example of a point cloud with distance-based fading (the points
24      are visible when the camera reaches a certain distance away from the origin)]]
25  }
26}
27
28local Node_Invert = {
29  Identifier = "RenderablePointCloud_Example_FadingInverted",
30  -- Rotate to not overlap with the other dataset
31  Transform = {
32    Rotation = {
33      Type = "StaticRotation",
34      Rotation = { 0, 0, -0.5 * math.pi }
35    }
36  },
37  Renderable = {
38    Type = "RenderablePointCloud",
39    File = asset.resource("../data/dummydata.csv"),
40    Coloring = {
41      FixedColor = { 1.0, 0.3, 0.0 }
42    },
43    Fading = {
44      -- Use the same fade distances, but invert the fading so that the points are
45      -- visible when the camera is closer to the origin that the first value, and
46      -- invisible when further away than the last value
47      FadeInDistances = { 150000000.0, 350000000.0 },
48      Invert = true
49    }
50  },
51  GUI = {
52    Name = "Fading (Inverted)",
53    Path = "/Examples/RenderablePointCloud/Advanced",
54    Description = [[Example of a point cloud with inverted distance-based fading
55      (the points are visible when the camera is close to the origin, and invisible
56      when further away)]]
57  }
58}
59
60
61asset.onInitialize(function()
62  openspace.addSceneGraphNode(Node)
63  openspace.addSceneGraphNode(Node_Invert)
64end)
65
66asset.onDeinitialize(function()
67  openspace.removeSceneGraphNode(Node_Invert)
68  openspace.removeSceneGraphNode(Node)
69end)