StaticRotation
Inherits Rotation
A StaticRotation is using a fixed and constant rotation factor that does not change over time. The rotation value is provided as a property that can be changed at runtime, but it will not change automatically over time.
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Stores the static rotation as a vector containing Euler angles, a quaternion representation, or a rotation matrix. For the Euler angles, the values have to be provided in radians. To convert degres to radians, you can use the |
|
Value of type ‘Vector3 |
No |
Inherited members from Rotation
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
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 |
|
Must name a valid Rotation type |
No |
Asset Examples
Quaternion
This asset creates a SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes are determined by a constant and unchanging static rotation that is provided by a four-dimensional quaternion.
1local Node = {
2 Identifier = "StaticRotation_Example_Quaternion",
3 Transform = {
4 Rotation = {
5 Type = "StaticRotation",
6 Rotation = { 0.4873552, -0.4869268, -0.5127203, 0.5123526 }
7 }
8 },
9 Renderable = {
10 Type = "RenderableCartesianAxes"
11 },
12 GUI = {
13 Name = "StaticRotation - Quaternion",
14 Path = "/Examples"
15 }
16}
17
18asset.onInitialize(function()
19 openspace.addSceneGraphNode(Node)
20end)
21
22asset.onDeinitialize(function()
23 openspace.removeSceneGraphNode(Node)
24end)
Euler Angles
This asset creates a rotation provided by Euler angles and applies it to a SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes are determined by a constant and unchanging static rotation.
1local Node = {
2 Identifier = "StaticRotation_Example_Euler",
3 Transform = {
4 Rotation = {
5 Type = "StaticRotation",
6 Rotation = { math.pi / 2.0, 0.0, math.pi }
7 }
8 },
9 Renderable = {
10 Type = "RenderableCartesianAxes"
11 },
12 GUI = {
13 Name = "StaticRotation - Euler Angles",
14 Path = "/Examples"
15 }
16}
17
18asset.onInitialize(function()
19 openspace.addSceneGraphNode(Node)
20end)
21
22asset.onDeinitialize(function()
23 openspace.removeSceneGraphNode(Node)
24end)
Matrix
This asset creates a SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes are determined by a constant and unchanging static rotation that is provided by a 3-by-3 rotation matrix in column-major order.
1local Node = {
2 Identifier = "StaticRotation_Example_Matrix",
3 Transform = {
4 Rotation = {
5 Type = "StaticRotation",
6 Rotation = {
7 -0.9999987, -0.0015927, 0.0000000,
8 0.0015927, -0.9999987, 0.0000000,
9 0.0000000, 0.0000000, 1.0000000
10 }
11 }
12 },
13 Renderable = {
14 Type = "RenderableCartesianAxes"
15 },
16 GUI = {
17 Name = "StaticRotation - Matrix",
18 Path = "/Examples"
19 }
20}
21
22asset.onInitialize(function()
23 openspace.addSceneGraphNode(Node)
24end)
25
26asset.onDeinitialize(function()
27 openspace.removeSceneGraphNode(Node)
28end)