sketchup-api-stubs 0.7.9 → 0.7.11

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.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +157 -151
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -567
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +282 -183
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -1519
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
  151. data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +399 -389
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
  159. data/lib/sketchup-api-stubs.rb +1 -1
  160. metadata +10 -24
@@ -1,476 +1,500 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # Transformations are a standard construct in the 3D world for representing
5
- # the position, rotation, and sizing of a given entity. In the SketchUp
6
- # world, {Sketchup::ComponentInstance} and {Sketchup::Group} have a
7
- # +.transformation+ method that reports their current state and various methods
8
- # (+.move!+, +transformation=+, etc.) that allow them to be manipulated.
9
- #
10
- # Use of the transformation class requires a knowledge of geometrical
11
- # transformations in 3 dimensions which is covered extensively on
12
- # the internet.
13
- #
14
- # @version SketchUp 6.0
15
- class Geom::Transformation
16
-
17
- # Class Methods
18
-
19
- # The {.axes} method creates a transformation that goes from world coordinates
20
- # to an arbitrary coordinate system defined by an origin and three axis
21
- # vectors.
22
- #
23
- # @example
24
- # # Creates a transformation that "flips" the axes from XYZ to XZY. Something
25
- # # one often need for importers/exporters when dealing with applications
26
- # # that threat Y as "up".
27
- # tr = Geom::Transformation.axes(ORIGIN, X_AXIS, Z_AXIS, Y_AXIS.reverse)
28
- #
29
- # @overload axes(origin, xaxis, yaxis, zaxis)
30
- #
31
- # @param [Geom::Point3d] origin
32
- # @param [Geom::Vector3d] xaxis
33
- # @param [Geom::Vector3d] yaxis
34
- # @param [Geom::Vector3d] zaxis
35
- # @return [Geom::Transformation]
36
- #
37
- # @overload axes(origin, xaxis, yaxis)
38
- #
39
- # When the Z axis is omitted and arbitrary axis is computed from the X and Y
40
- # axes.
41
- # @param [Geom::Point3d] origin
42
- # @param [Geom::Vector3d] xaxis
43
- # @param [Geom::Vector3d] yaxis
44
- # @return [Geom::Transformation]
45
- #
46
- # @raise [ArgumentError] if any of the vectors are zero length.
47
- #
48
- # @version SketchUp 6.0
49
- def self.axes(*args)
50
- end
51
-
52
- # The {.interpolate} method is used to create a new transformation that is the
53
- # result of interpolating between two other transformations.
54
- #
55
- # Parameter is a weight (between `0.0` and `1.0`) that identifies whether to favor
56
- # `transformation1` or `transformation2`.
57
- #
58
- # @example
59
- # origin = Geom::Point3d.new(0, 0, 0)
60
- # x = Geom::Vector3d.new(0, 1, 0)
61
- # y = Geom::Vector3d.new(1, 0, 0)
62
- # z = Geom::Vector3d.new(0, 0, 1)
63
- # point = Geom::Point3d.new(10, 20, 30)
64
- # t1 = Geom::Transformation.new(point)
65
- # t2 = Geom::Transformation.axes(origin, x, y, z)
66
- # # This produce a transformation that is a mix of 75% t1 and 25% t2.
67
- # t3 = Geom::Transformation.interpolate(t1, t2, 0.25)
68
- #
69
- # @param [Geom::Transformation] transform1
70
- #
71
- # @param [Geom::Transformation] transform2
72
- #
73
- # @param [Float] weight
74
- # A value between 0.0 and 1.0 (see comments).
75
- #
76
- # @return [Geom::Transformation]
77
- #
78
- # @version SketchUp 6.0
79
- def self.interpolate(transform1, transform2, weight)
80
- end
81
-
82
- # The {.rotation} method is used to create a transformation that does rotation
83
- # about an axis.
84
- #
85
- # The axis is defined by a point and a vector. The angle is given in radians.
86
- #
87
- # @example
88
- # point = Geom::Point3d.new(10, 20, 0)
89
- # vector = Geom::Vector3d.new(0, 0, 1)
90
- # angle = 45.degrees # Return 45 degrees in radians.
91
- # transformation = Geom::Transformation.rotation(point, vector, angle)
92
- #
93
- # @param [Geom::Point3d] point
94
- #
95
- # @param [Geom::Vector3d] vector
96
- #
97
- # @param [Float] angle
98
- # The angle in radians.
99
- #
100
- # @return [Geom::Transformation]
101
- #
102
- # @version SketchUp 6.0
103
- def self.rotation(point, vector, angle)
104
- end
105
-
106
- # The {.scaling} method is used to create a transformation that does scaling.
107
- #
108
- # @example
109
- # point = Geom::Point3d.new(20, 30, 0)
110
- # scale = 10
111
- # tr = Geom::Transformation.scaling(point, scale)
112
- #
113
- # @overload scaling(scale)
114
- #
115
- # @note This has been fixed in SketchUp 2018 but in previous versions it
116
- # might yield an unexpected transformation. It sets the 16th value
117
- # to the scaling factor. Something not all extensions reading the
118
- # transformation expects. Consider using +scaling(xscale, yscale, zscale)+
119
- # instead.
120
- # With one argument, it does a uniform scale about the origin.
121
- # @param [Float] scale The global scale factor for the transform.
122
- # @return [Geom::Transformation]
123
- #
124
- # @overload scaling(xscale, yscale, zscale)
125
- #
126
- # With three arguments, it does a non-uniform scale about the origin.
127
- # @param [Float] xscale The scale factor in the x direction for the transform.
128
- # @param [Float] yscale The scale factor in the y direction for the transform.
129
- # @param [Float] zscale The scale factor in the z direction for the transform.
130
- # @return [Geom::Transformation]
131
- #
132
- # @overload scaling(point, scale)
133
- #
134
- # With two arguments, it does a uniform scale about an arbitrary point.
135
- # @param [Geom::Point3d] point
136
- # @param [Float] scale The global scale factor for the transform.
137
- # @return [Geom::Transformation]
138
- #
139
- # @overload scaling(point, xscale, yscale, zscale)
140
- #
141
- # With four arguments it does a non-uniform scale about an arbitrary point.
142
- # @param [Geom::Point3d] point
143
- # @param [Float] xscale The scale factor in the x direction for the transform.
144
- # @param [Float] yscale The scale factor in the y direction for the transform.
145
- # @param [Float] zscale The scale factor in the z direction for the transform.
146
- # @return [Geom::Transformation]
147
- #
148
- # @version SketchUp 6.0
149
- def self.scaling(*args)
150
- end
151
-
152
- # The {.translation} method is used to create a transformation that does
153
- # translation.
154
- #
155
- # @example
156
- # vector = Geom::Vector3d.new(0, 1, 0)
157
- # tr = Geom::Transformation.translation(vector)
158
- #
159
- # @overload translation(vector)
160
- #
161
- # @param [Geom::Vector3d] vector
162
- # @return [Geom::Transformation]
163
- #
164
- # @overload translation(point)
165
- #
166
- # @param [Geom::Point3d] point
167
- # @return [Geom::Transformation]
168
- #
169
- # @version SketchUp 6.0
170
- def self.translation(arg)
171
- end
172
-
173
- # Instance Methods
174
-
175
- # The {#*} method is used to do matrix multiplication using the transform.
176
- #
177
- # @example
178
- # point1 = Geom::Point3d.new(10, 20, 30)
179
- # point2 = Geom::Point3d.new(2, 2, 2)
180
- # tr = Geom::Transformation.new(point1)
181
- # # Returns Point3d(12, 22, 32)
182
- # point3 = tr * point2
183
- #
184
- # @overload *(point)
185
- #
186
- # @param [Geom::Point3d] point
187
- # @return [Geom::Point3d]
188
- #
189
- # @overload *(vector)
190
- #
191
- # @param [Geom::Vector3d] vector
192
- # @return [Geom::Vector3d]
193
- #
194
- # @overload *(transformation)
195
- #
196
- # @param [Geom::Transformation] transformation
197
- # @return [Geom::Transformation]
198
- #
199
- # @overload *(point)
200
- #
201
- # @param [Array(Float, Float, Float)] point
202
- # @return [Array(Float, Float, Float)]
203
- #
204
- # @overload *(plane)
205
- #
206
- # @param [Array(Geom::Point3d, Geom::Vector3d)] plane
207
- # @return [Array(Float, Float, Float, Float)] transformed plane
208
- #
209
- # @overload *(plane)
210
- #
211
- # @param [Array(Float, Float, Float, Float)] plane
212
- # @return [Array(Float, Float, Float, Float)] transformed plane
213
- #
214
- # @version SketchUp 6.0
215
- def *(arg)
216
- end
217
-
218
- # The {#clone} method is used to create a copy of a transformation.
219
- #
220
- # @example
221
- # point = Geom::Point3d.new(10, 20, 30)
222
- # tr1 = Geom::Transformation.new(point)
223
- # tr2 = tr1.clone
224
- #
225
- # @return [Geom::Transformation]
226
- #
227
- # @version SketchUp 6.0
228
- def clone
229
- end
230
-
231
- # The {#identity?} method is used to determine if a transformation is the
232
- # {IDENTITY} transform.
233
- #
234
- # @example
235
- # point = Geom::Point3d.new(10, 20, 30)
236
- # tr = Geom::Transformation.new(point)
237
- # # Returns false.
238
- # status = tr.identity?
239
- #
240
- # @example
241
- # tr = Geom::Transformation.new(ORIGIN)
242
- # # Returns false.
243
- # status = tr.identity?
244
- #
245
- # @example
246
- # tr = Geom::Transformation.new
247
- # # Returns true.
248
- # status = tr.identity?
249
- #
250
- # @example
251
- # # Returns true.
252
- # status = IDENTITY.identity?
253
- #
254
- # @note As of SketchUp 2018, this now looks at the data to determine if the
255
- # transformation is identity. Prior to SU2018, this only looks at the flag to
256
- # see if the transform has not been modified. If the transform has been
257
- # changed, this will return false even if it is really the identity.
258
- #
259
- # @return [Boolean] +true+ if the transformation is the identity
260
- #
261
- # @version SketchUp 6.0
262
- def identity?
263
- end
264
-
265
- # You can use this method or one of the more specific methods for creating
266
- # specific kinds of Transformations.
267
- #
268
- # @example
269
- # point = Geom::Point3d.new(10, 20, 30)
270
- # tr = Geom::Transformation.new(point)
271
- #
272
- # @overload initialize
273
- #
274
- # @return [Geom::Transformation] identity transformation.
275
- #
276
- # @overload initialize(point)
277
- #
278
- # Translates the origin to point.
279
- # @param [Geom::Point3d] point
280
- # @return [Geom::Transformation]
281
- #
282
- # @overload initialize(vector)
283
- #
284
- # @param [Geom::Vector3d] vector
285
- # @return [Geom::Transformation]
286
- #
287
- # @overload initialize(transform)
288
- #
289
- # Creates a transformation that is a copy of another transformation. This is
290
- # equivalent to {#clone}.
291
- # @param [Geom::Transformation] transform
292
- # @return [Geom::Transformation]
293
- #
294
- # @overload initialize(array)
295
- #
296
- # @param [Array<Float>] Creates a Transformation from a 16 element Array.
297
- # @return [Geom::Transformation]
298
- #
299
- # @overload initialize(scale)
300
- #
301
- # Creates a transformation that does uniform scaling.
302
- # @note Versions prior to SU2018 would produce transformations which
303
- # didn't always work right in SketchUp. See {.scaling} for more info.
304
- # @param [Float] scale
305
- # @return [Geom::Transformation]
306
- #
307
- # @overload initialize(origin, zaxis)
308
- #
309
- # Creates a Transformation where origin is the new origin, and zaxis is the
310
- # z axis. The x and y axes are determined using an arbitrary axis rule.
311
- # @param [Geom::Point3d] origin
312
- # @param [Geom::Vector3d] zaxis
313
- # @return [Geom::Transformation]
314
- #
315
- # @overload initialize(origin, xaxis, yaxis)
316
- #
317
- # Creates a Transformation given a new origin, x axis and y axis.
318
- # @param [Geom::Point3d] origin
319
- # @param [Geom::Vector3d] xaxis
320
- # @param [Geom::Vector3d] yaxis
321
- # @return [Geom::Transformation]
322
- #
323
- # @overload initialize(pt, axis, angle)
324
- #
325
- # Creates a Transformation that rotates by angle (given in radians) about a
326
- # line defined by pt and axis.
327
- # @param [Geom::Point3d] origin
328
- # @param [Geom::Vector3d] axis
329
- # @param [Float] angle
330
- # @return [Geom::Transformation]
331
- #
332
- # @overload initialize(xaxis, yaxis, zaxis, origin)
333
- #
334
- # @param [Geom::Vector3d] xaxis
335
- # @param [Geom::Vector3d] yaxis
336
- # @param [Geom::Vector3d] zaxis
337
- # @param [Geom::Point3d] origin
338
- # @return [Geom::Transformation]
339
- #
340
- # @version SketchUp 6.0
341
- def initialize(*args)
342
- end
343
-
344
- # The {#inverse} method is used to retrieve the inverse of a transformation.
345
- #
346
- # @example
347
- # point = Geom::Point3d.new(10, 20, 30)
348
- # tr1 = Geom::Transformation.new(point)
349
- # tr2 = tr1.inverse
350
- #
351
- # @return [Geom::Transformation]
352
- #
353
- # @version SketchUp 6.0
354
- def inverse
355
- end
356
-
357
- # The {#invert!} method sets the transformation to its inverse.
358
- #
359
- # @example
360
- # point = Geom::Point3d.new(10, 20, 30)
361
- # tr = Geom::Transformation.new(point)
362
- # tr.invert!
363
- #
364
- # @return [Geom::Transformation]
365
- #
366
- # @version SketchUp 6.0
367
- def invert!
368
- end
369
-
370
- # The {#origin} method retrieves the origin of a rigid transformation.
371
- #
372
- # @example
373
- # point1 = Geom::Point3d.new(10, 20, 30)
374
- # tr = Geom::Transformation.new(point1)
375
- # point2 = tr.origin
376
- #
377
- # @return [Geom::Point3d] the origin of the transformation.
378
- #
379
- # @version SketchUp 6.0
380
- def origin
381
- end
382
-
383
- # The {#set!} method is used to set this transformation to match another one.
384
- #
385
- # The argument is anything that can be converted into a transformation.
386
- #
387
- # @example
388
- # point1 = Geom::Point3d.new(10, 20, 30)
389
- # tr1 = Geom::Transformation.new(point)
390
- # point2 = Geom::Point3d.new(60, 40, 70)
391
- # tr1.set!(point2)
392
- #
393
- # @overload set!(transformation)
394
- #
395
- # @param [Geom::Transformation] transformation
396
- # @return [Geom::Transformation]
397
- #
398
- # @overload set!(point)
399
- #
400
- # @param [Geom::Point3d] point
401
- # @return [Geom::Transformation]
402
- #
403
- # @overload set!(vector)
404
- #
405
- # @param [Geom::Vector3d] vector
406
- # @return [Geom::Transformation]
407
- #
408
- # @overload set!(matrix)
409
- #
410
- # @param [Array<Float>] matrix Array of 16 floats.
411
- # @return [Geom::Transformation]
412
- #
413
- # @overload set!(scale)
414
- #
415
- # @param [Float] scale
416
- # @return [Geom::Transformation]
417
- #
418
- # @version SketchUp 6.0
419
- def set!(arg)
420
- end
421
-
422
- # The {#to_a} method retrieves a 16 element array which contains the values that
423
- # define the transformation.
424
- #
425
- # @example
426
- # point = Geom::Point3d.new(10, 20, 30)
427
- # tr = Geom::Transformation.new(point)
428
- # # This splits the 16 items into a string of 4x4 elements for easier reading.
429
- # str4x4 = tr.to_a.each_slice(4).inject { |str, row| "#{str}\r\n#{row}" }
430
- #
431
- # @return [Array<Float>]
432
- #
433
- # @version SketchUp 6.0
434
- def to_a
435
- end
436
-
437
- # The {#xaxis} method retrieves the x axis of a rigid transformation.
438
- #
439
- # @example
440
- # point = Geom::Point3d.new(10, 20, 30)
441
- # tr = Geom::Transformation.new(point)
442
- # x = tr.xaxis
443
- #
444
- # @return [Geom::Vector3d]
445
- #
446
- # @version SketchUp 6.0
447
- def xaxis
448
- end
449
-
450
- # The {#yaxis} method retrieves the y axis of a rigid transformation.
451
- #
452
- # @example
453
- # point = Geom::Point3d.new(10, 20, 30)
454
- # tr = Geom::Transformation.new(point)
455
- # x = tr.yaxis
456
- #
457
- # @return [Geom::Vector3d]
458
- #
459
- # @version SketchUp 6.0
460
- def yaxis
461
- end
462
-
463
- # The {#zaxis} method retrieves the z axis of a rigid transformation.
464
- #
465
- # @example
466
- # point = Geom::Point3d.new(10, 20, 30)
467
- # tr = Geom::Transformation.new(point)
468
- # x = tr.zaxis
469
- #
470
- # @return [Geom::Vector3d]
471
- #
472
- # @version SketchUp 6.0
473
- def zaxis
474
- end
475
-
476
- end
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # Transformations are a standard construct in the 3D world for representing
5
+ # the position, rotation, and sizing of a given entity. In the SketchUp
6
+ # world, {Sketchup::ComponentInstance} and {Sketchup::Group} have a
7
+ # +.transformation+ method that reports their current state and various methods
8
+ # (+.move!+, +transformation=+, etc.) that allow them to be manipulated.
9
+ #
10
+ # Use of the transformation class requires a knowledge of geometrical
11
+ # transformations in 3 dimensions which is covered extensively on
12
+ # the internet.
13
+ #
14
+ # @version SketchUp 6.0
15
+ class Geom::Transformation
16
+
17
+ # Class Methods
18
+
19
+ # The {.axes} method creates a transformation that goes from world coordinates
20
+ # to an arbitrary coordinate system defined by an origin and three axis
21
+ # vectors.
22
+ #
23
+ # @example
24
+ # # Creates a transformation that "flips" the axes from XYZ to XZY. Something
25
+ # # one often need for importers/exporters when dealing with applications
26
+ # # that threat Y as "up".
27
+ # transformation = Geom::Transformation.axes(ORIGIN, X_AXIS, Z_AXIS, Y_AXIS.reverse)
28
+ #
29
+ # @overload axes(origin, xaxis, yaxis, zaxis)
30
+ #
31
+ # @param [Geom::Point3d] origin
32
+ # @param [Geom::Vector3d] xaxis
33
+ # @param [Geom::Vector3d] yaxis
34
+ # @param [Geom::Vector3d] zaxis
35
+ # @return [Geom::Transformation]
36
+ #
37
+ # @overload axes(origin, xaxis, yaxis)
38
+ #
39
+ # When the Z axis is omitted and arbitrary axis is computed from the X and Y
40
+ # axes.
41
+ # @param [Geom::Point3d] origin
42
+ # @param [Geom::Vector3d] xaxis
43
+ # @param [Geom::Vector3d] yaxis
44
+ # @return [Geom::Transformation]
45
+ #
46
+ # @raise [ArgumentError] if any of the vectors are zero length.
47
+ #
48
+ # @version SketchUp 6.0
49
+ def self.axes(*args)
50
+ end
51
+
52
+ # The {.interpolate} method is used to create a new transformation that is the
53
+ # result of interpolating between two other transformations.
54
+ #
55
+ # Parameter weight is a value (between 0.0 and 1.0) that represents the percentage given to
56
+ # `transformation1` and `transformation2`.
57
+ #
58
+ # @example
59
+ # origin = Geom::Point3d.new(0, 0, 0)
60
+ # xaxis = Geom::Vector3d.new(0, 1, 0)
61
+ # yaxis = Geom::Vector3d.new(1, 0, 0)
62
+ # zaxis = Geom::Vector3d.new(0, 0, 1)
63
+ # point = Geom::Point3d.new(10, 20, 30)
64
+ # transformation1 = Geom::Transformation.new(point)
65
+ # transformation2 = Geom::Transformation.axes(origin, xaxis, yaxis, zaxis)
66
+ # # This produce a transformation that is a mix of 75% transformation1 and 25% transformation2.
67
+ # new_transformation = Geom::Transformation.interpolate(transformation1, transformation2, 0.25)
68
+ #
69
+ # @param [Geom::Transformation] transformation1
70
+ #
71
+ # @param [Geom::Transformation] transformation2
72
+ #
73
+ # @param [Float] weight
74
+ # A value between 0.0 and 1.0.
75
+ #
76
+ # @return [Geom::Transformation]
77
+ #
78
+ # @version SketchUp 6.0
79
+ def self.interpolate(transformation1, transformation2, weight)
80
+ end
81
+
82
+ # The {.rotation} method is used to create a transformation that does rotation
83
+ # about an axis.
84
+ #
85
+ # The axis is defined by a point and a vector. The angle is given in radians.
86
+ #
87
+ # @example
88
+ # point = Geom::Point3d.new(10, 20, 0)
89
+ # vector = Geom::Vector3d.new(0, 0, 1)
90
+ # angle = 45.degrees # Return 45 degrees in radians.
91
+ # transformation = Geom::Transformation.rotation(point, vector, angle)
92
+ #
93
+ # @param [Geom::Point3d] point
94
+ #
95
+ # @param [Geom::Vector3d] vector
96
+ #
97
+ # @param [Float] angle
98
+ # The angle in radians.
99
+ #
100
+ # @return [Geom::Transformation]
101
+ #
102
+ # @version SketchUp 6.0
103
+ def self.rotation(point, vector, angle)
104
+ end
105
+
106
+ # The {.scaling} method is used to create a transformation that does scaling.
107
+ #
108
+ # @example
109
+ # point = Geom::Point3d.new(20, 30, 0)
110
+ # scale = 10
111
+ # transformation = Geom::Transformation.scaling(point, scale)
112
+ #
113
+ # @overload scaling(scale)
114
+ #
115
+ # @note This has been fixed in SketchUp 2018 but in previous versions it
116
+ # might yield an unexpected transformation. It sets the 16th value
117
+ # to the scaling factor. Something not all extensions reading the
118
+ # transformation expects. Consider using +scaling(xscale, yscale, zscale)+
119
+ # instead.
120
+ # With one argument, it does a uniform scale about the origin.
121
+ # @param [Float] scale The global scale factor for the transform.
122
+ # @return [Geom::Transformation]
123
+ #
124
+ # @overload scaling(xscale, yscale, zscale)
125
+ #
126
+ # With three arguments, it does a non-uniform scale about the origin.
127
+ # @param [Float] xscale The scale factor in the x direction for the transform.
128
+ # @param [Float] yscale The scale factor in the y direction for the transform.
129
+ # @param [Float] zscale The scale factor in the z direction for the transform.
130
+ # @return [Geom::Transformation]
131
+ #
132
+ # @overload scaling(point, scale)
133
+ #
134
+ # With two arguments, it does a uniform scale about an arbitrary point.
135
+ # @param [Geom::Point3d] point
136
+ # @param [Float] scale The global scale factor for the transform.
137
+ # @return [Geom::Transformation]
138
+ #
139
+ # @overload scaling(point, xscale, yscale, zscale)
140
+ #
141
+ # With four arguments it does a non-uniform scale about an arbitrary point.
142
+ # @param [Geom::Point3d] point
143
+ # @param [Float] xscale The scale factor in the x direction for the transform.
144
+ # @param [Float] yscale The scale factor in the y direction for the transform.
145
+ # @param [Float] zscale The scale factor in the z direction for the transform.
146
+ # @return [Geom::Transformation]
147
+ #
148
+ # @version SketchUp 6.0
149
+ def self.scaling(*args)
150
+ end
151
+
152
+ # The {.translation} method is used to create a transformation that does
153
+ # translation.
154
+ #
155
+ # @example
156
+ # vector = Geom::Vector3d.new(0, 1, 0)
157
+ # transformation = Geom::Transformation.translation(vector)
158
+ #
159
+ # @overload translation(vector)
160
+ #
161
+ # @param [Geom::Vector3d] vector
162
+ # @return [Geom::Transformation]
163
+ #
164
+ # @overload translation(point)
165
+ #
166
+ # @param [Geom::Point3d] point
167
+ # @return [Geom::Transformation]
168
+ #
169
+ # @version SketchUp 6.0
170
+ def self.translation(arg)
171
+ end
172
+
173
+ # Instance Methods
174
+
175
+ # The {#*} method is used to do matrix multiplication using the transform.
176
+ #
177
+ # @example
178
+ # point1 = Geom::Point3d.new(10, 20, 30)
179
+ # point2 = Geom::Point3d.new(2, 2, 2)
180
+ # transformation = Geom::Transformation.new(point1)
181
+ # # The result is a Point3d(12, 22, 32)
182
+ # new_point = transformation * point2
183
+ #
184
+ # @overload *(point)
185
+ #
186
+ # @param [Geom::Point3d] point
187
+ # @return [Geom::Point3d]
188
+ #
189
+ # @overload *(vector)
190
+ #
191
+ # @param [Geom::Vector3d] vector
192
+ # @return [Geom::Vector3d]
193
+ #
194
+ # @overload *(transformation)
195
+ #
196
+ # @param [Geom::Transformation] transformation
197
+ # @return [Geom::Transformation]
198
+ #
199
+ # @overload *(point)
200
+ #
201
+ # @param [Array(Float, Float, Float)] point
202
+ # @return [Array(Float, Float, Float)]
203
+ #
204
+ # @overload *(plane)
205
+ #
206
+ # @param [Array(Geom::Point3d, Geom::Vector3d)] plane
207
+ # @return [Array(Float, Float, Float, Float)] transformed plane
208
+ #
209
+ # @overload *(plane)
210
+ #
211
+ # @param [Array(Float, Float, Float, Float)] plane
212
+ # @return [Array(Float, Float, Float, Float)] transformed plane
213
+ #
214
+ # @version SketchUp 6.0
215
+ def *(arg)
216
+ end
217
+
218
+ # The {#clone} method is used to create a copy of a transformation.
219
+ #
220
+ # @example
221
+ # point = Geom::Point3d.new(10, 20, 30)
222
+ # transformation = Geom::Transformation.new(point)
223
+ # new_transformation = transformation.clone
224
+ #
225
+ # @return [Geom::Transformation]
226
+ #
227
+ # @version SketchUp 6.0
228
+ def clone
229
+ end
230
+
231
+ # The {#identity?} method is used to determine if a transformation is the
232
+ # {IDENTITY} transform.
233
+ #
234
+ # @example
235
+ # point = Geom::Point3d.new(10, 20, 30)
236
+ # transformation = Geom::Transformation.new(point)
237
+ # # Returns false
238
+ # status = transformation.identity?
239
+ #
240
+ # @example
241
+ # transformation = Geom::Transformation.new(ORIGIN)
242
+ # # Returns true
243
+ # status = transformation.identity?
244
+ #
245
+ # @example
246
+ # transformation = Geom::Transformation.new
247
+ # # Returns true
248
+ # status = transformation.identity?
249
+ #
250
+ # @example
251
+ # # Returns true
252
+ # status = IDENTITY.identity?
253
+ #
254
+ # @note As of SketchUp 2018, this now looks at the data to determine if the
255
+ # transformation is identity. Prior to SU2018, this only looks at the flag to
256
+ # see if the transform has not been modified. If the transform has been
257
+ # changed, this will return false even if it is really the identity.
258
+ #
259
+ # @return [Boolean] +true+ if the transformation is the identity
260
+ #
261
+ # @version SketchUp 6.0
262
+ def identity?
263
+ end
264
+
265
+ # You can use this method or one of the more specific methods for creating
266
+ # specific kinds of Transformations.
267
+ #
268
+ # @example
269
+ # point = Geom::Point3d.new(10, 20, 30)
270
+ # transformation = Geom::Transformation.new(point)
271
+ #
272
+ # @example
273
+ # origin = Geom::Point3d.new(10, 10, 10)
274
+ # zaxis = Geom::Vector3d.new(1, 2, 3)
275
+ # transformation = Geom::Transformation.new(origin, zaxis)
276
+ #
277
+ # @example
278
+ # origin = Geom::Point3d.new(1, 1, 1)
279
+ # axis = Geom::Vector3d.new(1, 0, 0)
280
+ # angle = 45.degrees # Return 45 degrees in radians.
281
+ # transformation = Geom::Transformation.new(origin, axis, angle)
282
+ #
283
+ # @overload initialize
284
+ #
285
+ # @return [Geom::Transformation] identity transformation.
286
+ #
287
+ # @overload initialize(point)
288
+ #
289
+ # Translates the origin to point.
290
+ # @param [Geom::Point3d] point
291
+ # @return [Geom::Transformation]
292
+ #
293
+ # @overload initialize(vector)
294
+ #
295
+ # @param [Geom::Vector3d] vector
296
+ # @return [Geom::Transformation]
297
+ #
298
+ # @overload initialize(transform)
299
+ #
300
+ # Creates a transformation that is a copy of another transformation. This is
301
+ # equivalent to {#clone}.
302
+ # @param [Geom::Transformation] transform
303
+ # @return [Geom::Transformation]
304
+ #
305
+ # @overload initialize(array)
306
+ #
307
+ # @param [Array<Float>] Creates a Transformation from a 16 element Array.
308
+ # @return [Geom::Transformation]
309
+ #
310
+ # @overload initialize(scale)
311
+ #
312
+ # Creates a transformation that does uniform scaling.
313
+ # @note Versions prior to SU2018 would produce transformations which
314
+ # didn't always work right in SketchUp. See {.scaling} for more info.
315
+ # @param [Float] scale
316
+ # @return [Geom::Transformation]
317
+ #
318
+ # @overload initialize(origin, zaxis)
319
+ #
320
+ # Creates a Transformation where origin is the new origin, and z axis is the
321
+ # new z axis. The x and y axes are determined using an arbitrary axis rule.
322
+ # @param [Geom::Point3d] origin
323
+ # @param [Geom::Vector3d] zaxis
324
+ # @return [Geom::Transformation]
325
+ #
326
+ # @overload initialize(origin, xaxis, yaxis)
327
+ #
328
+ # Creates a Transformation given a new origin, x axis and y axis.
329
+ # @param [Geom::Point3d] origin
330
+ # @param [Geom::Vector3d] xaxis
331
+ # @param [Geom::Vector3d] yaxis
332
+ # @return [Geom::Transformation]
333
+ #
334
+ # @overload initialize(pt, axis, angle)
335
+ #
336
+ # Creates a Transformation that rotates by angle (given in radians) about a
337
+ # line defined by pt and axis.
338
+ # @param [Geom::Point3d] origin
339
+ # @param [Geom::Vector3d] axis
340
+ # @param [Float] angle
341
+ # @return [Geom::Transformation]
342
+ #
343
+ # @overload initialize(xaxis, yaxis, zaxis, origin)
344
+ #
345
+ # @param [Geom::Vector3d] xaxis
346
+ # @param [Geom::Vector3d] yaxis
347
+ # @param [Geom::Vector3d] zaxis
348
+ # @param [Geom::Point3d] origin
349
+ # @return [Geom::Transformation]
350
+ #
351
+ # @version SketchUp 6.0
352
+ def initialize(*args)
353
+ end
354
+
355
+ # The {#inverse} method is used to retrieve the inverse of a transformation.
356
+ #
357
+ # @example
358
+ # point = Geom::Point3d.new(10, 20, 30)
359
+ # transformation = Geom::Transformation.new(point)
360
+ # new_transformation = transformation.inverse
361
+ #
362
+ # @note As of SketchUp 2026, this will raise an error if the
363
+ # {Geom::Transformation} is not invertible. Prior to 2026 this would silently attempt
364
+ # to invert the transformation possibly returning in an invalid transformation.
365
+ #
366
+ # @raise ArgumentError if the {Geom::Transformation} is not invertible (as of Sketchup 2026)
367
+ #
368
+ # @return [Geom::Transformation]
369
+ #
370
+ # @version SketchUp 6.0
371
+ def inverse
372
+ end
373
+
374
+ # The {#invert!} method sets the transformation to its inverse.
375
+ #
376
+ # @example
377
+ # point = Geom::Point3d.new(10, 20, 30)
378
+ # transformation = Geom::Transformation.new(point)
379
+ # new_transformation = transformation.invert!
380
+ #
381
+ # @note As of SketchUp 2026, this will raise an error if the
382
+ # {Geom::Transformation} is not invertible. Prior to 2026 this would silently attempt
383
+ # to invert the transformation possibly creating in an invalid transformation.
384
+ #
385
+ # @raise ArgumentError if the {Geom::Transformation} is not invertible (as of Sketchup 2026)
386
+ #
387
+ # @return [Geom::Transformation]
388
+ #
389
+ # @version SketchUp 6.0
390
+ def invert!
391
+ end
392
+
393
+ # The {#origin} method retrieves the origin of a rigid transformation.
394
+ #
395
+ # @example
396
+ # point = Geom::Point3d.new(10, 20, 30)
397
+ # transformation = Geom::Transformation.new(point)
398
+ # new_point = transformation.origin
399
+ #
400
+ # @return [Geom::Point3d] the origin of the transformation.
401
+ #
402
+ # @version SketchUp 6.0
403
+ def origin
404
+ end
405
+
406
+ # The {#set!} method is used to set this transformation to match another one.
407
+ #
408
+ # The argument is anything that can be converted into a transformation.
409
+ #
410
+ # @example
411
+ # point1 = Geom::Point3d.new(10, 20, 30)
412
+ # transformation = Geom::Transformation.new(point1)
413
+ # point2 = Geom::Point3d.new(60, 40, 70)
414
+ # transformation.set!(point2)
415
+ #
416
+ # @overload set!(transformation)
417
+ #
418
+ # @param [Geom::Transformation] transformation
419
+ # @return [Geom::Transformation]
420
+ #
421
+ # @overload set!(point)
422
+ #
423
+ # @param [Geom::Point3d] point
424
+ # @return [Geom::Transformation]
425
+ #
426
+ # @overload set!(vector)
427
+ #
428
+ # @param [Geom::Vector3d] vector
429
+ # @return [Geom::Transformation]
430
+ #
431
+ # @overload set!(matrix)
432
+ #
433
+ # @param [Array<Float>] matrix Array of 16 floats.
434
+ # @return [Geom::Transformation]
435
+ #
436
+ # @overload set!(scale)
437
+ #
438
+ # @param [Float] scale
439
+ # @return [Geom::Transformation]
440
+ #
441
+ # @version SketchUp 6.0
442
+ def set!(arg)
443
+ end
444
+
445
+ # The {#to_a} method retrieves a 16 element array which contains the values that
446
+ # define the transformation.
447
+ #
448
+ # @example
449
+ # point = Geom::Point3d.new(10, 20, 30)
450
+ # transformation = Geom::Transformation.new(point)
451
+ # # This splits the 16 items into a string of 4x4 elements for easier reading.
452
+ # matrix = transformation.to_a.each_slice(4).inject { |str, row|"#{str}\r\n#{row}"}
453
+ # puts matrix
454
+ #
455
+ # @return [Array<Float>]
456
+ #
457
+ # @version SketchUp 6.0
458
+ def to_a
459
+ end
460
+
461
+ # The {#xaxis} method retrieves the x axis of a rigid transformation.
462
+ #
463
+ # @example
464
+ # point = Geom::Point3d.new(10, 20, 30)
465
+ # transformation = Geom::Transformation.new(point)
466
+ # x = transformation.xaxis
467
+ #
468
+ # @return [Geom::Vector3d]
469
+ #
470
+ # @version SketchUp 6.0
471
+ def xaxis
472
+ end
473
+
474
+ # The {#yaxis} method retrieves the y axis of a rigid transformation.
475
+ #
476
+ # @example
477
+ # point = Geom::Point3d.new(10, 20, 30)
478
+ # transformation = Geom::Transformation.new(point)
479
+ # y = transformation.yaxis
480
+ #
481
+ # @return [Geom::Vector3d]
482
+ #
483
+ # @version SketchUp 6.0
484
+ def yaxis
485
+ end
486
+
487
+ # The {#zaxis} method retrieves the z axis of a rigid transformation.
488
+ #
489
+ # @example
490
+ # point = Geom::Point3d.new(10, 20, 30)
491
+ # transformation = Geom::Transformation.new(point)
492
+ # z = transformation.zaxis
493
+ #
494
+ # @return [Geom::Vector3d]
495
+ #
496
+ # @version SketchUp 6.0
497
+ def zaxis
498
+ end
499
+
500
+ end