sketchup-api-stubs 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +7 -7
  3. data/SketchUp/Geom/BoundingBox.rb +7 -15
  4. data/SketchUp/Geom/Bounds2d.rb +18 -18
  5. data/SketchUp/Geom/LatLong.rb +6 -6
  6. data/SketchUp/Geom/OrientedBounds2d.rb +1 -1
  7. data/SketchUp/Geom/Point2d.rb +42 -6
  8. data/SketchUp/Geom/Point3d.rb +32 -21
  9. data/SketchUp/Geom/PolygonMesh.rb +22 -17
  10. data/SketchUp/Geom/Transformation.rb +35 -35
  11. data/SketchUp/Geom/Transformation2d.rb +153 -13
  12. data/SketchUp/Geom/UTM.rb +1 -1
  13. data/SketchUp/Geom/Vector2d.rb +45 -9
  14. data/SketchUp/Geom/Vector3d.rb +11 -11
  15. data/SketchUp/Layout.rb +1 -1
  16. data/SketchUp/Layout/AngularDimension.rb +25 -25
  17. data/SketchUp/Layout/AutoTextDefinition.rb +5 -5
  18. data/SketchUp/Layout/AutoTextDefinitions.rb +1 -1
  19. data/SketchUp/Layout/ConnectionPoint.rb +1 -1
  20. data/SketchUp/Layout/Document.rb +6 -5
  21. data/SketchUp/Layout/Ellipse.rb +1 -1
  22. data/SketchUp/Layout/Entities.rb +1 -1
  23. data/SketchUp/Layout/Entity.rb +16 -16
  24. data/SketchUp/Layout/FormattedText.rb +21 -21
  25. data/SketchUp/Layout/Grid.rb +1 -1
  26. data/SketchUp/Layout/Group.rb +18 -18
  27. data/SketchUp/Layout/Image.rb +6 -6
  28. data/SketchUp/Layout/Label.rb +15 -15
  29. data/SketchUp/Layout/Layer.rb +5 -5
  30. data/SketchUp/Layout/LayerInstance.rb +3 -3
  31. data/SketchUp/Layout/Layers.rb +1 -1
  32. data/SketchUp/Layout/LinearDimension.rb +25 -25
  33. data/SketchUp/Layout/LockedEntityError.rb +1 -1
  34. data/SketchUp/Layout/LockedLayerError.rb +1 -1
  35. data/SketchUp/Layout/Page.rb +3 -3
  36. data/SketchUp/Layout/PageInfo.rb +1 -1
  37. data/SketchUp/Layout/Pages.rb +1 -1
  38. data/SketchUp/Layout/Path.rb +47 -27
  39. data/SketchUp/Layout/Rectangle.rb +8 -8
  40. data/SketchUp/Layout/SketchUpModel.rb +61 -26
  41. data/SketchUp/Layout/Style.rb +18 -17
  42. data/SketchUp/Layout/Table.rb +14 -14
  43. data/SketchUp/Layout/TableCell.rb +5 -5
  44. data/SketchUp/Layout/TableColumn.rb +7 -7
  45. data/SketchUp/Layout/TableRow.rb +7 -7
  46. data/SketchUp/Sketchup/Animation.rb +1 -1
  47. data/SketchUp/Sketchup/AppObserver.rb +1 -1
  48. data/SketchUp/Sketchup/ArcCurve.rb +1 -1
  49. data/SketchUp/Sketchup/AttributeDictionaries.rb +1 -1
  50. data/SketchUp/Sketchup/AttributeDictionary.rb +7 -7
  51. data/SketchUp/Sketchup/Axes.rb +4 -4
  52. data/SketchUp/Sketchup/Behavior.rb +1 -1
  53. data/SketchUp/Sketchup/Camera.rb +30 -41
  54. data/SketchUp/Sketchup/ClassificationSchema.rb +1 -1
  55. data/SketchUp/Sketchup/Classifications.rb +1 -1
  56. data/SketchUp/Sketchup/Color.rb +1 -1
  57. data/SketchUp/Sketchup/ComponentDefinition.rb +3 -3
  58. data/SketchUp/Sketchup/ComponentInstance.rb +10 -10
  59. data/SketchUp/Sketchup/Console.rb +5 -5
  60. data/SketchUp/Sketchup/ConstructionLine.rb +11 -11
  61. data/SketchUp/Sketchup/ConstructionPoint.rb +1 -1
  62. data/SketchUp/Sketchup/Curve.rb +1 -1
  63. data/SketchUp/Sketchup/DefinitionList.rb +12 -9
  64. data/SketchUp/Sketchup/DefinitionObserver.rb +6 -7
  65. data/SketchUp/Sketchup/DefinitionsObserver.rb +3 -3
  66. data/SketchUp/Sketchup/Dimension.rb +1 -1
  67. data/SketchUp/Sketchup/DimensionLinear.rb +81 -1
  68. data/SketchUp/Sketchup/DimensionObserver.rb +1 -1
  69. data/SketchUp/Sketchup/DimensionRadial.rb +1 -1
  70. data/SketchUp/Sketchup/Drawingelement.rb +1 -1
  71. data/SketchUp/Sketchup/Edge.rb +13 -16
  72. data/SketchUp/Sketchup/EdgeUse.rb +1 -1
  73. data/SketchUp/Sketchup/Entities.rb +181 -100
  74. data/SketchUp/Sketchup/EntitiesObserver.rb +1 -1
  75. data/SketchUp/Sketchup/Entity.rb +29 -26
  76. data/SketchUp/Sketchup/EntityObserver.rb +1 -1
  77. data/SketchUp/Sketchup/ExtensionsManager.rb +1 -1
  78. data/SketchUp/Sketchup/Face.rb +7 -7
  79. data/SketchUp/Sketchup/FrameChangeObserver.rb +4 -4
  80. data/SketchUp/Sketchup/Group.rb +1 -1
  81. data/SketchUp/Sketchup/Http.rb +1 -1
  82. data/SketchUp/Sketchup/Http/Request.rb +3 -3
  83. data/SketchUp/Sketchup/Http/Response.rb +1 -1
  84. data/SketchUp/Sketchup/Image.rb +1 -1
  85. data/SketchUp/Sketchup/ImageRep.rb +16 -16
  86. data/SketchUp/Sketchup/Importer.rb +1 -1
  87. data/SketchUp/Sketchup/InputPoint.rb +8 -4
  88. data/SketchUp/Sketchup/InstanceObserver.rb +1 -1
  89. data/SketchUp/Sketchup/InstancePath.rb +15 -12
  90. data/SketchUp/Sketchup/Layer.rb +27 -1
  91. data/SketchUp/Sketchup/Layers.rb +1 -1
  92. data/SketchUp/Sketchup/LayersObserver.rb +1 -1
  93. data/SketchUp/Sketchup/Licensing.rb +1 -1
  94. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  95. data/SketchUp/Sketchup/LineStyle.rb +24 -0
  96. data/SketchUp/Sketchup/LineStyles.rb +123 -0
  97. data/SketchUp/Sketchup/Loop.rb +1 -1
  98. data/SketchUp/Sketchup/Material.rb +16 -10
  99. data/SketchUp/Sketchup/Materials.rb +9 -1
  100. data/SketchUp/Sketchup/MaterialsObserver.rb +3 -3
  101. data/SketchUp/Sketchup/Menu.rb +1 -1
  102. data/SketchUp/Sketchup/Model.rb +47 -21
  103. data/SketchUp/Sketchup/ModelObserver.rb +3 -3
  104. data/SketchUp/Sketchup/OptionsManager.rb +1 -1
  105. data/SketchUp/Sketchup/OptionsProvider.rb +5 -5
  106. data/SketchUp/Sketchup/OptionsProviderObserver.rb +1 -1
  107. data/SketchUp/Sketchup/Page.rb +1 -1
  108. data/SketchUp/Sketchup/Pages.rb +13 -8
  109. data/SketchUp/Sketchup/PagesObserver.rb +1 -1
  110. data/SketchUp/Sketchup/PickHelper.rb +49 -50
  111. data/SketchUp/Sketchup/RegionalSettings.rb +1 -1
  112. data/SketchUp/Sketchup/RenderingOptions.rb +4 -4
  113. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +3 -3
  114. data/SketchUp/Sketchup/SectionPlane.rb +1 -1
  115. data/SketchUp/Sketchup/Selection.rb +3 -3
  116. data/SketchUp/Sketchup/SelectionObserver.rb +3 -3
  117. data/SketchUp/Sketchup/Set.rb +1 -1
  118. data/SketchUp/Sketchup/ShadowInfo.rb +3 -3
  119. data/SketchUp/Sketchup/ShadowInfoObserver.rb +1 -1
  120. data/SketchUp/Sketchup/Style.rb +1 -1
  121. data/SketchUp/Sketchup/Styles.rb +1 -1
  122. data/SketchUp/Sketchup/Text.rb +28 -1
  123. data/SketchUp/Sketchup/Texture.rb +1 -1
  124. data/SketchUp/Sketchup/TextureWriter.rb +13 -13
  125. data/SketchUp/Sketchup/Tool.rb +68 -64
  126. data/SketchUp/Sketchup/Tools.rb +13 -1
  127. data/SketchUp/Sketchup/ToolsObserver.rb +13 -13
  128. data/SketchUp/Sketchup/UVHelper.rb +1 -1
  129. data/SketchUp/Sketchup/Vertex.rb +1 -1
  130. data/SketchUp/Sketchup/View.rb +57 -56
  131. data/SketchUp/Sketchup/ViewObserver.rb +2 -2
  132. data/SketchUp/UI/Command.rb +4 -1
  133. data/SketchUp/UI/HtmlDialog.rb +23 -14
  134. data/SketchUp/UI/Notification.rb +10 -10
  135. data/SketchUp/UI/Toolbar.rb +1 -1
  136. data/SketchUp/UI/WebDialog.rb +38 -20
  137. data/SketchUp/_top_level.rb +32 -34
  138. data/SketchUp/array.rb +125 -112
  139. data/SketchUp/geom.rb +2 -2
  140. data/SketchUp/languagehandler.rb +1 -1
  141. data/SketchUp/length.rb +1 -1
  142. data/SketchUp/numeric.rb +3 -3
  143. data/SketchUp/sketchup.rb +11 -11
  144. data/SketchUp/sketchupextension.rb +6 -2
  145. data/SketchUp/string.rb +1 -1
  146. data/SketchUp/ui.rb +14 -14
  147. data/autoload/sketchup.rb +2 -0
  148. metadata +5 -3
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Transformations are a standard construct in the 3D world for representing
@@ -129,6 +129,13 @@ class Geom::Transformation
129
129
  # @param [Float] zscale The scale factor in the z direction for the transform.
130
130
  # @return [Geom::Transformation]
131
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
+ #
132
139
  # @overload scaling(point, xscale, yscale, zscale)
133
140
  #
134
141
  # With four arguments it does a non-uniform scale about an arbitrary point.
@@ -138,13 +145,6 @@ class Geom::Transformation
138
145
  # @param [Float] zscale The scale factor in the z direction for the transform.
139
146
  # @return [Geom::Transformation]
140
147
  #
141
- # @overload scaling(point, scale)
142
- #
143
- # With two arguments, it does a uniform scale about an arbitrary point.
144
- # @param [Geom::Point3d] point
145
- # @param [Float] scale The global scale factor for the transform.
146
- # @return [Geom::Transformation]
147
- #
148
148
  # @version SketchUp 6.0
149
149
  def self.scaling(*args)
150
150
  end
@@ -196,20 +196,20 @@ class Geom::Transformation
196
196
  # @param [Geom::Transformation] transformation
197
197
  # @return [Geom::Transformation]
198
198
  #
199
- # @overload *(plane)
199
+ # @overload *(point)
200
200
  #
201
- # @param [Array<Float, Float, Float, Float>] plane
202
- # @return [Array<Float, Float, Float, Float>] transformed plane
201
+ # @param [Array<Float, Float, Float>] point
202
+ # @return [Array<Float, Float, Float>]
203
203
  #
204
204
  # @overload *(plane)
205
205
  #
206
206
  # @param [Array<Geom::Point3d, Geom::Vector3d>] plane
207
207
  # @return [Array<Float, Float, Float, Float>] transformed plane
208
208
  #
209
- # @overload *(point)
209
+ # @overload *(plane)
210
210
  #
211
- # @param [Array<Float, Float, Float>] point
212
- # @return [Geom::Point3d]
211
+ # @param [Array<Float, Float, Float, Float>] plane
212
+ # @return [Array<Float, Float, Float, Float>] transformed plane
213
213
  #
214
214
  # @version SketchUp 6.0
215
215
  def *(arg)
@@ -232,13 +232,15 @@ class Geom::Transformation
232
232
  # {IDENTITY} transform.
233
233
  #
234
234
  # @example
235
- # tr = Geom::Transformation.new(ORIGIN)
235
+ # point = Geom::Point3d.new(10, 20, 30)
236
+ # tr = Geom::Transformation.new(point)
236
237
  # # Returns false.
237
238
  # status = tr.identity?
238
239
  #
239
240
  # @example
240
- # # Returns true.
241
- # status = IDENTITY.identity?
241
+ # tr = Geom::Transformation.new(ORIGIN)
242
+ # # Returns false.
243
+ # status = tr.identity?
242
244
  #
243
245
  # @example
244
246
  # tr = Geom::Transformation.new
@@ -246,10 +248,8 @@ class Geom::Transformation
246
248
  # status = tr.identity?
247
249
  #
248
250
  # @example
249
- # point = Geom::Point3d.new(10, 20, 30)
250
- # tr = Geom::Transformation.new(point)
251
- # # Returns false.
252
- # status = tr.identity?
251
+ # # Returns true.
252
+ # status = IDENTITY.identity?
253
253
  #
254
254
  # @note As of SketchUp 2018, this now looks at the data to determine if the
255
255
  # transformation is identity. Prior to SU2018, this only looks at the flag to
@@ -300,12 +300,12 @@ class Geom::Transformation
300
300
  # @param [Array<Float>] Creates a Transformation from a 16 element Array.
301
301
  # @return [Geom::Transformation]
302
302
  #
303
- # @overload initialize(xaxis, yaxis, zaxis, origin)
303
+ # @overload initialize(scale)
304
304
  #
305
- # @param [Geom::Vector3d] xaxis
306
- # @param [Geom::Vector3d] yaxis
307
- # @param [Geom::Vector3d] zaxis
308
- # @param [Geom::Point3d] origin
305
+ # Creates a transformation that does uniform scaling.
306
+ # @note Versions prior to SU2018 would produce transformations which
307
+ # didn't always work right in SketchUp. See {.scaling} for more info.
308
+ # @param [Float] scale
309
309
  # @return [Geom::Transformation]
310
310
  #
311
311
  # @overload initialize(origin, zaxis)
@@ -333,12 +333,12 @@ class Geom::Transformation
333
333
  # @param [Float] angle
334
334
  # @return [Geom::Transformation]
335
335
  #
336
- # @overload initialize(scale)
336
+ # @overload initialize(xaxis, yaxis, zaxis, origin)
337
337
  #
338
- # Creates a transformation that does uniform scaling.
339
- # @note Versions prior to SU2018 would produce transformations which
340
- # didn't always work right in SketchUp. See {.scaling} for more info.
341
- # @param [Float] scale
338
+ # @param [Geom::Vector3d] xaxis
339
+ # @param [Geom::Vector3d] yaxis
340
+ # @param [Geom::Vector3d] zaxis
341
+ # @param [Geom::Point3d] origin
342
342
  # @return [Geom::Transformation]
343
343
  #
344
344
  # @version SketchUp 6.0
@@ -404,9 +404,9 @@ class Geom::Transformation
404
404
  # @param [Geom::Point3d] point
405
405
  # @return [Geom::Transformation]
406
406
  #
407
- # @overload set!(scale)
407
+ # @overload set!(vector)
408
408
  #
409
- # @param [Float] scale
409
+ # @param [Geom::Vector3d] vector
410
410
  # @return [Geom::Transformation]
411
411
  #
412
412
  # @overload set!(matrix)
@@ -414,9 +414,9 @@ class Geom::Transformation
414
414
  # @param [Array<Float>] matrix Array of 16 floats.
415
415
  # @return [Geom::Transformation]
416
416
  #
417
- # @overload set!(vector)
417
+ # @overload set!(scale)
418
418
  #
419
- # @param [Geom::Vector3d] vector
419
+ # @param [Float] scale
420
420
  # @return [Geom::Transformation]
421
421
  #
422
422
  # @version SketchUp 6.0
@@ -1,12 +1,126 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  #
5
5
  # @version LayOut 2018
6
6
  class Geom::Transformation2d
7
7
 
8
+ # Class Methods
9
+
10
+ # The {.rotation} method is used to create a transformation that does rotation
11
+ # about a point.
12
+ #
13
+ # @example
14
+ # point = Geom::Point2d.new(10, 5)
15
+ # angle = 45.degrees # Return 45 degrees in radians.
16
+ # transformation = Geom::Transformation2d.rotation(point, angle)
17
+ #
18
+ # @param [Geom::Point2d] point
19
+ #
20
+ # @param [Float] angle
21
+ # The angle in radians.
22
+ #
23
+ # @return [Geom::Transformation2d]
24
+ #
25
+ # @version LayOut 2019
26
+ def self.rotation(point, angle)
27
+ end
28
+
29
+ # The {.scaling} method is used to create a transformation that does scaling.
30
+ #
31
+ # @example
32
+ # point = Geom::Point3d.new(20, 30, 0)
33
+ # scale = 10
34
+ # tr = Geom::Transformation2d.scaling(point, scale)
35
+ #
36
+ # @overload scaling(scale)
37
+ #
38
+ # With one argument, it does a uniform scale about the origin.
39
+ # @param [Float] scale The global scale factor for the transform.
40
+ # @return [Geom::Transformation2d]
41
+ #
42
+ # @overload scaling(xscale, yscale)
43
+ #
44
+ # With two arguments, it does a non-uniform scale about the origin.
45
+ # @param [Float] xscale The scale factor in the x direction for the transform.
46
+ # @param [Float] yscale The scale factor in the y direction for the transform.
47
+ # @return [Geom::Transformation2d]
48
+ #
49
+ # @overload scaling(point, scale)
50
+ #
51
+ # With two arguments, it does a uniform scale about an arbitrary point.
52
+ # @param [Geom::Point2d] point
53
+ # @param [Float] scale The global scale factor for the transform.
54
+ # @return [Geom::Transformation2d]
55
+ #
56
+ # @overload scaling(point, xscale, yscale)
57
+ #
58
+ # With three arguments it does a non-uniform scale about an arbitrary point.
59
+ # @param [Geom::Point2d] point
60
+ # @param [Float] xscale The scale factor in the x direction for the transform.
61
+ # @param [Float] yscale The scale factor in the y direction for the transform.
62
+ # @return [Geom::Transformation2d]
63
+ #
64
+ # @version LayOut 2019
65
+ def self.scaling(*args)
66
+ end
67
+
68
+ # The {.translation} method is used to create a transformation that does
69
+ # translation.
70
+ #
71
+ # @example
72
+ # vector = Geom::Vector2d.new(0, 1)
73
+ # tr = Geom::Transformation2d.translation(vector)
74
+ #
75
+ # @overload translation(vector)
76
+ #
77
+ # @param [Geom::Vector2d] vector
78
+ # @return [Geom::Transformation2d]
79
+ #
80
+ # @overload translation(point)
81
+ #
82
+ # @param [Geom::Point2d] point
83
+ # @return [Geom::Transformation2d]
84
+ #
85
+ # @version LayOut 2019
86
+ def self.translation(vector)
87
+ end
88
+
8
89
  # Instance Methods
9
90
 
91
+ # The {#*} method is used to do matrix multiplication using the transform.
92
+ #
93
+ # @example
94
+ # point1 = Geom::Point2d.new(5, 10)
95
+ # point2 = Geom::Point2d.new(2, 2)
96
+ # tr = Geom::Transformation2d.new(point1)
97
+ # # Returns Point2d(7, 12)
98
+ # point3 = tr * point2
99
+ #
100
+ # @overload *(point)
101
+ #
102
+ # @param [Geom::Point2d] point
103
+ # @return [Geom::Point2d]
104
+ #
105
+ # @overload *(vector)
106
+ #
107
+ # @param [Geom::Vector2d] vector
108
+ # @return [Geom::Vector2d]
109
+ #
110
+ # @overload *(transformation)
111
+ #
112
+ # @param [Geom::Transformation2d] transformation
113
+ # @return [Geom::Transformation2d]
114
+ #
115
+ # @overload *(point)
116
+ #
117
+ # @param [Array<Float, Float>] point
118
+ # @return [Array<Float, Float>]
119
+ #
120
+ # @version LayOut 2019
121
+ def *(arg)
122
+ end
123
+
10
124
  # The {#==} method checks to see if the two {Geom::Transformation2d}s are equal.
11
125
  # This checks whether the values of the transformations are the same.
12
126
  #
@@ -38,19 +152,19 @@ class Geom::Transformation2d
38
152
  # {IDENTITY_2D} transform.
39
153
  #
40
154
  # @example
41
- # tr = Geom::Transformation2d.new
42
- # # Returns true.
155
+ # array = {1.0, 0.0, 0.0, 1.0, 1.0, 0.0}
156
+ # tr = Geom::Transformation2d.new(array)
157
+ # # Returns false.
43
158
  # status = tr.identity?
44
159
  #
45
160
  # @example
161
+ # tr = Geom::Transformation2d.new
46
162
  # # Returns true.
47
- # status = IDENTITY.identity?
163
+ # status = tr.identity?
48
164
  #
49
165
  # @example
50
- # array = {1.0, 0.0, 0.0, 1.0, 1.0, 0.0}
51
- # tr = Geom::Transformation2d.new(array)
52
- # # Returns false.
53
- # status = tr.identity?
166
+ # # Returns true.
167
+ # status = IDENTITY_2D.identity?
54
168
  #
55
169
  # @return [Boolean] +true+ if the transform is the identity
56
170
  #
@@ -71,11 +185,6 @@ class Geom::Transformation2d
71
185
  #
72
186
  # @return [Geom::Transformation2d] identity Transformation2d.
73
187
  #
74
- # @overload initialize(array)
75
- #
76
- # @param [Array<Float>] array A 6 element Array.
77
- # @return [Geom::Transformation2d]
78
- #
79
188
  # @overload initialize(transformation)
80
189
  #
81
190
  # Creates a Transformation2d that is a copy of another Transformation2d.
@@ -83,10 +192,41 @@ class Geom::Transformation2d
83
192
  # @param [Geom::Transformation2d] transform
84
193
  # @return [Geom::Transformation2d]
85
194
  #
195
+ # @overload initialize(array)
196
+ #
197
+ # @param [Array<Float>] array A 6 element Array.
198
+ # @return [Geom::Transformation2d]
199
+ #
86
200
  # @version LayOut 2018
87
201
  def initialize(*args)
88
202
  end
89
203
 
204
+ # The {#inverse} method is used to retrieve the inverse of a transformation.
205
+ #
206
+ # @example
207
+ # point = Geom::Point2d.new(5, 10)
208
+ # tr1 = Geom::Transformation2d.new(point)
209
+ # tr2 = tr1.inverse
210
+ #
211
+ # @return [Geom::Transformation2d]
212
+ #
213
+ # @version LayOut 2019
214
+ def inverse
215
+ end
216
+
217
+ # The {#invert!} method sets the transformation to its inverse.
218
+ #
219
+ # @example
220
+ # point = Geom::Point2d.new(5, 10)
221
+ # tr = Geom::Transformation2d.new(point)
222
+ # tr.invert!
223
+ #
224
+ # @return [Geom::Transformation2d]
225
+ #
226
+ # @version LayOut 2019
227
+ def invert!
228
+ end
229
+
90
230
  # The {#set!} method sets the {Geom::Transformation2d} to match another one.
91
231
  # The argument is anything that can be converted into a {Geom::Transformation2d}.
92
232
  #
data/SketchUp/Geom/UTM.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The UTM class lets you work with UTM map coordinates.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Vector2d class represents vectors in a 2 dimensional space.
@@ -98,7 +98,7 @@ class Geom::Vector2d
98
98
  # # retrieves the y value of 2
99
99
  # yvalue = vector[1]
100
100
  #
101
- # @param [Numeric] index
101
+ # @param [Integer] index
102
102
  # The index into an array of two coordinates.
103
103
  #
104
104
  # @return [Numeric] The value for the x or y coordinate.
@@ -199,17 +199,17 @@ class Geom::Vector2d
199
199
  #
200
200
  # @return [Geom::Vector2d]
201
201
  #
202
- # @overload initialize(vector)
203
- #
204
- # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
205
- # @return [Geom::Vector2d]
206
- #
207
202
  # @overload initialize(x, y)
208
203
  #
209
204
  # @param [Numeric] x The length in the x direction
210
205
  # @param [Numeric] y The length in the y direction
211
206
  # @return [Geom::Vector2d]
212
207
  #
208
+ # @overload initialize(vector)
209
+ #
210
+ # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
211
+ # @return [Geom::Vector2d]
212
+ #
213
213
  # @version LayOut 2018
214
214
  def initialize(*args)
215
215
  end
@@ -233,14 +233,14 @@ class Geom::Vector2d
233
233
  # # returns 4
234
234
  # l = vector.length
235
235
  #
236
- # @return [Numeric] The length of the {Geom::Vector2d}
236
+ # @return [Length] The length of the {Geom::Vector2d}
237
237
  #
238
238
  # @version LayOut 2018
239
239
  def length
240
240
  end
241
241
 
242
242
  # The {#length=} method sets the length of the {Geom::Vector2d}. The new length
243
- # must be greater than 0.
243
+ # must not be 0.
244
244
  #
245
245
  # @example
246
246
  # vector = Geom::Vector2d.new(0, 4)
@@ -409,6 +409,42 @@ class Geom::Vector2d
409
409
  def to_s
410
410
  end
411
411
 
412
+ # The {#transform} method applies a transformation to a vector, returning a new
413
+ # vector. The original vector is unchanged by this method.
414
+ #
415
+ # @example
416
+ # vector = Geom::Vector2d.new(4, 5)
417
+ # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
418
+ # # vector2 will be (6, 8)
419
+ # vector2 = vector.transform(transformation)
420
+ #
421
+ # @param [Geom::Transformation2d] transform
422
+ # A transformation object to apply to the vector.
423
+ #
424
+ # @return [Geom::Vector2d] the newly transformed vector
425
+ #
426
+ # @version LayOut 2019
427
+ def transform(transform)
428
+ end
429
+
430
+ # The {#transform!} method applies a transformation to a vector. The vector
431
+ # itself is modified.
432
+ #
433
+ # @example
434
+ # vector = Geom::Vector2d.new(4, 5)
435
+ # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
436
+ # # vector will be (6, 8)
437
+ # vector.transform!(transformation)
438
+ #
439
+ # @param [Geom::Transformation2d] transform
440
+ # A Transformation object to apply to the vector.
441
+ #
442
+ # @return [Geom::Vector2d] the transformed vector
443
+ #
444
+ # @version LayOut 2019
445
+ def transform!(transform)
446
+ end
447
+
412
448
  # The {#unit_vector?} method returns whether the {Geom::Vector2d} is a unit
413
449
  # vector. This is equivalent to vector.length == 1.0
414
450
  #