@xeokit/xeokit-sdk 2.4.2-beta-8 → 2.4.2-beta-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,197 @@
1
+ import {SceneModelMesh} from "./SceneModelMesh";
2
+
3
+ /**
4
+ * A dynamically-updatable transform within a {@link SceneModel}.
5
+ *
6
+ * * Can be composed into hierarchies
7
+ * * Shared by multiple {@link SceneModelMesh}es
8
+ * * Created with {@link SceneModel#createTransform}
9
+ * * Stored by ID in {@link SceneModel#transforms}
10
+ * * Referenced by {@link SceneModelMesh#transform}
11
+ */
12
+ export declare class SceneModelTransform {
13
+
14
+ /**
15
+ * Unique ID of this SceneModelTransform.
16
+ *
17
+ * The SceneModelTransform is registered against this ID in {@link SceneModel#transforms}.
18
+ */
19
+ id: string | number;
20
+
21
+ /**
22
+ * The optional parent SceneModelTransform.
23
+ *
24
+ * @type {SceneModelTransform}
25
+ */
26
+ get parentTransform(): SceneModelTransform | null;
27
+
28
+ /**
29
+ * The {@link SceneModelMesh}es transformed by this SceneModelTransform.
30
+ *
31
+ * @returns {[]}
32
+ */
33
+ get meshes(): SceneModelMesh[];
34
+
35
+ /**
36
+ * Sets the SceneModelTransform's local translation.
37
+ *
38
+ * Default value is ````[0,0,0]````.
39
+ *
40
+ * @type {number[]}
41
+ */
42
+ set position(value: number[]);
43
+
44
+ /**
45
+ * Gets the SceneModelTransform's translation.
46
+ *
47
+ * Default value is ````[0,0,0]````.
48
+ *
49
+ * @type {number[]}
50
+ */
51
+ get position(): number[];
52
+
53
+ /**
54
+ * Sets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
55
+ *
56
+ * Default value is ````[0,0,0]````.
57
+ *
58
+ * @type {number[]}
59
+ */
60
+ set rotation(value: number[]);
61
+
62
+ /**
63
+ * Gets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
64
+ *
65
+ * Default value is ````[0,0,0]````.
66
+ *
67
+ * @type {number[]}
68
+ */
69
+ get rotation(): number[];
70
+
71
+ /**
72
+ * Sets the SceneModelTransform's rotation quaternion.
73
+ *
74
+ * Default value is ````[0,0,0,1]````.
75
+ *
76
+ * @type {number[]}
77
+ */
78
+ set quaternion(value: number[]);
79
+
80
+ /**
81
+ * Gets the SceneModelTransform's rotation quaternion.
82
+ *
83
+ * Default value is ````[0,0,0,1]````.
84
+ *
85
+ * @type {number[]}
86
+ */
87
+ get quaternion(): number[];
88
+
89
+ /**
90
+ * Sets the SceneModelTransform's scale.
91
+ *
92
+ * Default value is ````[1,1,1]````.
93
+ *
94
+ * @type {number[]}
95
+ */
96
+ set scale(value: number[]);
97
+
98
+ /**
99
+ * Gets the SceneModelTransform's scale.
100
+ *
101
+ * Default value is ````[1,1,1]````.
102
+ *
103
+ * @type {number[]}
104
+ */
105
+ get scale(): number[];
106
+
107
+ /**
108
+ * Sets the SceneModelTransform's transform matrix.
109
+ *
110
+ * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
111
+ *
112
+ * @type {number[]}
113
+ */
114
+ set matrix(value: number[]);
115
+
116
+ /**
117
+ * Gets the SceneModelTransform's transform matrix.
118
+ *
119
+ * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
120
+ *
121
+ * @type {number[]}
122
+ */
123
+ get matrix(): number[];
124
+
125
+ /**
126
+ * Gets the SceneModelTransform's World matrix.
127
+ *
128
+ * @property worldMatrix
129
+ * @type {number[]}
130
+ */
131
+ get worldMatrix(): number[];
132
+
133
+ /**
134
+ * Rotates the SceneModelTransform about the given axis by the given increment.
135
+ *
136
+ * @param {number[]} axis Local axis about which to rotate.
137
+ * @param {number} angle Angle increment in degrees.
138
+ */
139
+ rotate(axis: number[], angle: number): void;
140
+
141
+ /**
142
+ * Rotates the SceneModelTransform about the given World-space axis by the given increment.
143
+ *
144
+ * @param {number[]} axis Local axis about which to rotate.
145
+ * @param {number} angle Angle increment in degrees.
146
+ */
147
+ rotateOnWorldAxis(axis: number[], angle: number): void;
148
+
149
+ /**
150
+ * Rotates the SceneModelTransform about the local X-axis by the given increment.
151
+ *
152
+ * @param {number} angle Angle increment in degrees.
153
+ */
154
+ rotateX(angle: number): void;
155
+
156
+ /**
157
+ * Rotates the SceneModelTransform about the local Y-axis by the given increment.
158
+ *
159
+ * @param {number} angle Angle increment in degrees.
160
+ */
161
+ rotateY(angle: number): void;
162
+
163
+ /**
164
+ * Rotates the SceneModelTransform about the local Z-axis by the given increment.
165
+ *
166
+ * @param {number} angle Angle increment in degrees.
167
+ */
168
+ rotateZ(angle: number): void;
169
+
170
+ /**
171
+ * Translates the SceneModelTransform along the local axis by the given increment.
172
+ *
173
+ * @param {number[]} axis Normalized local space 3D vector along which to translate.
174
+ */
175
+ translate(axis: number[]): void;
176
+
177
+ /**
178
+ * Translates the SceneModelTransform along the local X-axis by the given increment.
179
+ *
180
+ * @param {number} distance Distance to translate along the X-axis.
181
+ */
182
+ translateX(distance: number): void;
183
+
184
+ /**
185
+ * Translates the SceneModelTransform along the local Y-axis by the given increment.
186
+ *
187
+ * @param {number} distance Distance to translate along the Y-axis.
188
+ */
189
+ translateY(distance: number): void;
190
+
191
+ /**
192
+ * Translates the SceneModelTransform along the local Z-axis by the given increment.
193
+ *
194
+ * @param {number} distance Distance to translate along the Z-axis.
195
+ */
196
+ translateZ(distance: number): void;
197
+ }