sketchup-api-stubs 0.7.2 → 0.7.7
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.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +3 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +15 -11
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +5 -6
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +18 -18
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +27 -10
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +61 -5
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +189 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +9 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +6 -2
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +148 -5
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +6 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +32 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +110 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +24 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +24 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +58 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +135 -39
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +3 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +10 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +8 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +55 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +20 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +9 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +232 -65
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +98 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +48 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +60 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +47 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +11 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +33 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +5 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +115 -68
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +225 -29
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +118 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +2 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +8 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +9 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +126 -73
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +143 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +22 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +37 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +10 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +20 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +9 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +14 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +31 -25
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +32 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +73 -67
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +13 -6
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +132 -10
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +94 -54
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +3 -1
- data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/geom.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +66 -23
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/ui.rb +17 -12
- metadata +5 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::Animation} interface is implemented to create animations
|
@@ -32,6 +32,10 @@
|
|
32
32
|
#
|
33
33
|
# Sketchup.active_model.active_view.animation = nil
|
34
34
|
#
|
35
|
+
# @abstract Implement the methods described in this class to create a an
|
36
|
+
# animation. You can not sub-class this class because it is not defined by
|
37
|
+
# the API.
|
38
|
+
#
|
35
39
|
# @version SketchUp 6.0
|
36
40
|
class Sketchup::Animation
|
37
41
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This observer interface is implemented to react to application events.
|
@@ -12,9 +12,9 @@
|
|
12
12
|
# callbacks unless you've attached a {Sketchup::SelectionObserver} to the new
|
13
13
|
# model as well. By watching for {#onNewModel}, you can be sure to do so.
|
14
14
|
#
|
15
|
-
# To implement this observer, create a Ruby class of this type, override the
|
16
|
-
#
|
17
|
-
#
|
15
|
+
# @abstract To implement this observer, create a Ruby class of this type, override the
|
16
|
+
# desired methods, and add an instance of the observer to the
|
17
|
+
# application class.
|
18
18
|
#
|
19
19
|
# @example
|
20
20
|
# # This is an example of an observer that watches the application for
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AttributeDictionaries class is a collection of all of the
|
@@ -103,9 +103,9 @@ class Sketchup::AttributeDictionaries < Sketchup::Entity
|
|
103
103
|
#
|
104
104
|
# @example
|
105
105
|
# model = Sketchup.active_model
|
106
|
-
#
|
106
|
+
# dictionaries = model.attribute_dictionaries
|
107
107
|
# # Iterates through all dictionaries and prints to screen.
|
108
|
-
#
|
108
|
+
# dictionaries.each { |dictionary| puts dictionary.name }
|
109
109
|
#
|
110
110
|
# @return nil
|
111
111
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AttributeDictionary class allows you to attach arbitrary collections of
|
@@ -120,6 +120,11 @@ class Sketchup::AttributeDictionary < Sketchup::Entity
|
|
120
120
|
# puts "#{key} = #{value}"
|
121
121
|
# }
|
122
122
|
#
|
123
|
+
# @note Don't remove content from this collection while iterating over it with
|
124
|
+
# {#each}. This would change the size of the collection and cause elements to
|
125
|
+
# be skipped as the indices change. Instead copy the current collection to an
|
126
|
+
# array using +to_a+ and then use +each+ on the array, when removing content.
|
127
|
+
#
|
123
128
|
# @see #each_pair
|
124
129
|
#
|
125
130
|
# @version SketchUp 6.0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Behavior class is used to control the "behavior" of components, which
|
@@ -88,13 +88,9 @@ class Sketchup::Behavior < Sketchup::Entity
|
|
88
88
|
# @example
|
89
89
|
# model = Sketchup.active_model
|
90
90
|
# behavior = model.definitions[0].behavior
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
# UI.messagebox status
|
95
|
-
# else
|
96
|
-
# # code to respond cuts_opening being false
|
97
|
-
# end
|
91
|
+
# behavior.cuts_opening = false
|
92
|
+
#
|
93
|
+
# @note To enable cut opening, also set {#is2d=} to true.
|
98
94
|
#
|
99
95
|
# @param setting
|
100
96
|
# Sets the cuts_opening behavior to true or false.
|
@@ -113,57 +109,39 @@ class Sketchup::Behavior < Sketchup::Entity
|
|
113
109
|
# model = Sketchup.active_model
|
114
110
|
# behavior = model.definitions[0].behavior
|
115
111
|
# status = behavior.cuts_opening?
|
116
|
-
# if (status)
|
117
|
-
# # if status is true, do something
|
118
|
-
# else
|
119
|
-
# # if status is false, do something else
|
120
|
-
# end
|
121
112
|
#
|
122
|
-
# @return [Boolean]
|
123
|
-
# (either true or false)
|
113
|
+
# @return [Boolean]
|
124
114
|
#
|
125
115
|
# @version SketchUp 6.0
|
126
116
|
def cuts_opening?
|
127
117
|
end
|
128
118
|
|
129
|
-
# The is2d= method is used to set the
|
130
|
-
#
|
119
|
+
# The {#is2d=} method is used to set whether the component can glue to other
|
120
|
+
# entities or not.
|
131
121
|
#
|
132
122
|
# @example
|
133
123
|
# model = Sketchup.active_model
|
134
124
|
# behavior = model.definitions[0].behavior
|
135
|
-
#
|
136
|
-
# if (status)
|
137
|
-
# # if status is true, print the status
|
138
|
-
# UI.messagebox status
|
139
|
-
# else
|
140
|
-
# # code to respond is2d behavior being false
|
141
|
-
# end
|
125
|
+
# behavior.is2d = false
|
142
126
|
#
|
143
|
-
# @param
|
144
|
-
# Sets the 2D behavior to true or false.
|
145
|
-
#
|
146
|
-
# @return status - the new setting
|
127
|
+
# @param [Boolean] is2d
|
147
128
|
#
|
148
129
|
# @version SketchUp 6.0
|
149
|
-
def is2d=(
|
130
|
+
def is2d=(is2d)
|
150
131
|
end
|
151
132
|
|
152
|
-
# The is2d? method is used to get the
|
153
|
-
#
|
133
|
+
# The {#is2d?} method is used to get whether the component can glue to other
|
134
|
+
# entities or not.
|
154
135
|
#
|
155
136
|
# @example
|
156
137
|
# model = Sketchup.active_model
|
157
138
|
# behavior = model.definitions[0].behavior
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
# else
|
162
|
-
# # if status is false, do something else
|
139
|
+
# if behavior.is2d?
|
140
|
+
# # We can also set what planes component can glue to.
|
141
|
+
# behavior.snapto = SnapTo_Arbitrary
|
163
142
|
# end
|
164
143
|
#
|
165
|
-
# @return [Boolean]
|
166
|
-
# false)
|
144
|
+
# @return [Boolean]
|
167
145
|
#
|
168
146
|
# @version SketchUp 6.0
|
169
147
|
def is2d?
|
@@ -271,14 +249,14 @@ class Sketchup::Behavior < Sketchup::Entity
|
|
271
249
|
def shadows_face_sun?
|
272
250
|
end
|
273
251
|
|
274
|
-
# The snapto method is used to
|
275
|
-
#
|
252
|
+
# The {#snapto} method is used to see how a component can glue to other
|
253
|
+
# entities.
|
276
254
|
#
|
277
|
-
# Returns a
|
278
|
-
#
|
279
|
-
#
|
255
|
+
# Returns a value indicating the snapping behavior of the component. Snapping
|
256
|
+
# behavior is how the x-y plane of a component instance will be snapped against
|
257
|
+
# a face. Possible values are:
|
280
258
|
#
|
281
|
-
# - +SnapTo_Arbitrary+ => Snap to any
|
259
|
+
# - +SnapTo_Arbitrary+ => Snap to any arbitrary face,
|
282
260
|
# - +SnapTo_Horizontal+ => Snap to horizontal face like floors,
|
283
261
|
# - +SnapTo_Vertical+ => Snap to vertical face like walls,
|
284
262
|
# - +SnapTo_Sloped+ => Snap to sloped face like sloping roofs.
|
@@ -286,26 +264,21 @@ class Sketchup::Behavior < Sketchup::Entity
|
|
286
264
|
# @example
|
287
265
|
# model = Sketchup.active_model
|
288
266
|
# behavior = model.definitions[0].behavior
|
289
|
-
#
|
290
|
-
# if (status)
|
291
|
-
# # if status is true, do something
|
292
|
-
# else
|
293
|
-
# # if status is false, do something else
|
294
|
-
# end
|
267
|
+
# snapto = behavior.snapto
|
295
268
|
#
|
296
|
-
# @return
|
297
|
-
# or false)
|
269
|
+
# @return [Integer]
|
298
270
|
#
|
299
271
|
# @version SketchUp 6.0
|
300
272
|
def snapto
|
301
273
|
end
|
302
274
|
|
303
|
-
# The snapto= method
|
275
|
+
# The {#snapto=} method is used to set how a component can glue to other
|
276
|
+
# entities.
|
304
277
|
#
|
305
278
|
# Snapping behavior is how the x-y plane of a component instance will be
|
306
279
|
# snapped against a face. Possible constant values are:
|
307
280
|
#
|
308
|
-
# - +SnapTo_Arbitrary+ => Snap to any
|
281
|
+
# - +SnapTo_Arbitrary+ => Snap to any arbitrary face,
|
309
282
|
# - +SnapTo_Horizontal+ => Snap to horizontal face like floors,
|
310
283
|
# - +SnapTo_Vertical+ => Snap to vertical face like walls,
|
311
284
|
# - +SnapTo_Sloped+ => Snap to sloped face like sloping roofs.
|
@@ -313,13 +286,14 @@ class Sketchup::Behavior < Sketchup::Entity
|
|
313
286
|
# @example
|
314
287
|
# model = Sketchup.active_model
|
315
288
|
# behavior = model.definitions[0].behavior
|
289
|
+
# behavior.is2d = true
|
316
290
|
# behavior.snapto = SnapTo_Horizontal
|
317
291
|
#
|
318
|
-
# @
|
319
|
-
# A numeric constant identifying one of the snapto
|
320
|
-
# types.
|
292
|
+
# @note To enable gluing, also set {#is2d=} to true.
|
321
293
|
#
|
322
|
-
# @
|
294
|
+
# @note To disable gluing, set {#is2d=} to false.
|
295
|
+
#
|
296
|
+
# @param [Integer] snapto
|
323
297
|
#
|
324
298
|
# @version SketchUp 6.0
|
325
299
|
def snapto=(snapto)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Camera class contains methods for creating and manipulating a camera.
|
@@ -23,86 +23,68 @@ class Sketchup::Camera
|
|
23
23
|
|
24
24
|
# Instance Methods
|
25
25
|
|
26
|
-
# The aspect_ratio method is used to retrieve the aspect ratio of the Camera.
|
26
|
+
# The {#aspect_ratio} method is used to retrieve the aspect ratio of the Camera.
|
27
|
+
#
|
28
|
+
# `0.0` is the default value and denotes an aspect ratio matching that of the
|
29
|
+
# View.
|
27
30
|
#
|
28
31
|
# @example
|
29
|
-
# camera = Sketchup
|
30
|
-
#
|
31
|
-
# if (ar)
|
32
|
-
# UI.messagebox ar.to_s
|
33
|
-
# else
|
34
|
-
# UI.messagebox "Failure"
|
35
|
-
# end
|
32
|
+
# camera = Sketchup.active_model.active_view.camera
|
33
|
+
# aspect_ratio = camera.aspect_ratio
|
36
34
|
#
|
37
|
-
# @return
|
38
|
-
# successful
|
35
|
+
# @return [Float]
|
39
36
|
#
|
40
37
|
# @version SketchUp 6.0
|
41
38
|
def aspect_ratio
|
42
39
|
end
|
43
40
|
|
44
|
-
# The aspect_ratio= method is used to set the aspect ratio for a Camera.
|
41
|
+
# The {#aspect_ratio=} method is used to set the aspect ratio for a Camera.
|
45
42
|
# Changing this value will cause SketchUp to show gray bars over the screen
|
46
43
|
# to show the resulting view.
|
47
44
|
#
|
48
|
-
# If you set the value to 0.0
|
45
|
+
# If you set the value to `0.0`, then the aspect ratio of the Camera will match
|
49
46
|
# the aspect ratio of its View.
|
50
47
|
#
|
51
48
|
# @example
|
52
49
|
# camera = Sketchup::Camera.new
|
53
|
-
#
|
54
|
-
# if (ar)
|
55
|
-
# UI.messagebox ar.to_s
|
56
|
-
# else
|
57
|
-
# UI.messagebox "Failure"
|
58
|
-
# end
|
50
|
+
# camera.aspect_ratio = 1.85
|
59
51
|
#
|
60
52
|
# @param [Float] ratio
|
61
53
|
#
|
62
|
-
# @return aspectratio - an aspect ratio, such as 1.85, if
|
63
|
-
# successful
|
64
|
-
#
|
65
54
|
# @version SketchUp 6.0
|
66
55
|
def aspect_ratio=(ratio)
|
67
56
|
end
|
68
57
|
|
69
|
-
# The center_2d method returns a point with the x and y offset of the camera
|
70
|
-
# when it's in
|
71
|
-
# user pans around, the x and y values will
|
72
|
-
# normalized device coordinates, so for instance,
|
73
|
-
# the full width or height of the screen.
|
58
|
+
# The {#center_2d} method returns a point with the x and y offset of the camera
|
59
|
+
# when it's in two-point perspective or math photo mode. When the camera is
|
60
|
+
# in two-point perspective and the user pans around, the x and y values will
|
61
|
+
# change. These values are in normalized device coordinates, so for instance,
|
62
|
+
# the range [-1.0, 1.0] spans the full width or height of the screen.
|
74
63
|
#
|
75
64
|
# The z value is unused and it is always zero.
|
76
65
|
#
|
77
66
|
# @example
|
78
67
|
# Sketchup.active_model.active_view.camera.center_2d
|
79
68
|
#
|
80
|
-
# @return Point3d
|
69
|
+
# @return [Geom::Point3d] ]
|
81
70
|
#
|
82
71
|
# @version SketchUp 2015
|
83
72
|
def center_2d
|
84
73
|
end
|
85
74
|
|
86
|
-
# The description method is used to retrieve the description for a Camera
|
87
|
-
# object.
|
75
|
+
# The {#description} method is used to retrieve the description for a Camera.
|
88
76
|
#
|
89
77
|
# @example
|
90
78
|
# camera = Sketchup::Camera.new
|
91
79
|
# description = camera.description
|
92
|
-
# if (description)
|
93
|
-
# UI.messagebox description
|
94
|
-
# else
|
95
|
-
# UI.messagebox "Failure"
|
96
|
-
# end
|
97
80
|
#
|
98
|
-
# @return
|
99
|
-
# successful
|
81
|
+
# @return [String]
|
100
82
|
#
|
101
83
|
# @version SketchUp 6.0
|
102
84
|
def description
|
103
85
|
end
|
104
86
|
|
105
|
-
# The description= method is used to set the description for the Camera.
|
87
|
+
# The {#description=} method is used to set the description for the Camera.
|
106
88
|
#
|
107
89
|
# @example
|
108
90
|
# camera = Sketchup::Camera.new
|
@@ -110,46 +92,30 @@ class Sketchup::Camera
|
|
110
92
|
#
|
111
93
|
# @param [String] description
|
112
94
|
#
|
113
|
-
# @return description - a string description for the camera if
|
114
|
-
# successful
|
115
|
-
#
|
116
95
|
# @version SketchUp 6.0
|
117
96
|
def description=(description)
|
118
97
|
end
|
119
98
|
|
120
|
-
# The direction method is used to retrieve a Vector3d object in the
|
121
|
-
# that the Camera is pointing.
|
99
|
+
# The {#direction} method is used to retrieve a Vector3d object in the
|
100
|
+
# direction that the Camera is pointing.
|
122
101
|
#
|
123
102
|
# @example
|
124
103
|
# camera = Sketchup::Camera.new
|
125
|
-
# # Returns 0,0,-1 which indicates it is pointed down the Z axis
|
126
104
|
# direction = camera.direction
|
127
|
-
# if (direction)
|
128
|
-
# UI.messagebox direction.to_s
|
129
|
-
# else
|
130
|
-
# UI.messagebox "Failure"
|
131
|
-
# end
|
132
105
|
#
|
133
|
-
# @return
|
134
|
-
# that the Camera is pointing if successful
|
106
|
+
# @return [Geom::Vector3d]
|
135
107
|
#
|
136
108
|
# @version SketchUp 6.0
|
137
109
|
def direction
|
138
110
|
end
|
139
111
|
|
140
|
-
# The eye method is used to retrieve the eye Point3d object for the Camera.
|
112
|
+
# The {#eye} method is used to retrieve the eye Point3d object for the Camera.
|
141
113
|
#
|
142
114
|
# @example
|
143
115
|
# camera = Sketchup::Camera.new
|
144
|
-
# # Returns 0,0,1 which indicates it is right in line with the Z axis.
|
145
116
|
# eye = camera.eye
|
146
|
-
# if (eye)
|
147
|
-
# UI.messagebox eye
|
148
|
-
# else
|
149
|
-
# UI.messagebox "Failure"
|
150
|
-
# end
|
151
117
|
#
|
152
|
-
# @return
|
118
|
+
# @return [Geom::Point3d]
|
153
119
|
#
|
154
120
|
# @version SketchUp 6.0
|
155
121
|
def eye
|
@@ -158,93 +124,82 @@ class Sketchup::Camera
|
|
158
124
|
# The focal_length method is used to get the focal length in millimeters of
|
159
125
|
# perspective Camera.
|
160
126
|
#
|
161
|
-
# This value is computed
|
162
|
-
# the
|
127
|
+
# This value is computed on the fly based on the camera {#fov} value and
|
128
|
+
# the camera {#image_width} value.
|
163
129
|
#
|
164
130
|
# @example
|
131
|
+
# # Calculate focal length based on camera's current #image_width.
|
165
132
|
# camera = Sketchup::Camera.new
|
166
|
-
#
|
167
|
-
# if (l)
|
168
|
-
# UI.messagebox l.to_s
|
169
|
-
# else
|
170
|
-
# UI.messagebox "Failure"
|
171
|
-
# end
|
133
|
+
# focal_length = camera.focal_length
|
172
134
|
#
|
173
|
-
#
|
174
|
-
#
|
135
|
+
# # If you want the 35 mm focal length equivalent, a common measurement of
|
136
|
+
# # camera field of view, you can instead calculate it from the #fov angle.
|
137
|
+
# camera = Sketchup.active_model.active_view.camera
|
138
|
+
# focal_length_35_eqv = 36.0 / (2 * Math.tan(camera.fov.degrees / 2))
|
175
139
|
#
|
176
|
-
# @return
|
140
|
+
# @return [Float]
|
177
141
|
#
|
178
142
|
# @version SketchUp 6.0
|
179
143
|
def focal_length(length)
|
180
144
|
end
|
181
145
|
|
182
|
-
# The focal_length= method allows you to
|
183
|
-
#
|
184
|
-
# inclusive.
|
146
|
+
# The {#focal_length=} method allows you to set the field of view by specifying
|
147
|
+
# a focal length in millimeters. Focal length must be between 1 and 3000,
|
148
|
+
# inclusive.
|
149
|
+
#
|
150
|
+
# The camera {#fov} value is set based on the provided +focal_length+ and
|
151
|
+
# the current {#image_width} for the camera.
|
185
152
|
#
|
186
153
|
# @example
|
187
|
-
# camera
|
188
|
-
#
|
189
|
-
#
|
190
|
-
# UI.messagebox l
|
191
|
-
# else
|
192
|
-
# UI.messagebox "Failure"
|
193
|
-
# end
|
154
|
+
# # Set field of view from focal length using camera's current #image_width.
|
155
|
+
# camera = Sketchup.active_model.active_view.camera
|
156
|
+
# camera.focal_length = 120
|
194
157
|
#
|
195
|
-
#
|
158
|
+
# # If you instead want to set the 35 mm focal length equivalent, a common
|
159
|
+
# # measurement of camera field of view, you can first convert it to an angle
|
160
|
+
# # and use #fov=.
|
161
|
+
# camera = Sketchup.active_model.active_view.camera
|
162
|
+
# focal_length_35_eqv = 120
|
163
|
+
# camera.fov = 2 * Math.atan(36.0 / (2 * focal_length_35_eqv)).radians
|
196
164
|
#
|
197
|
-
# @
|
198
|
-
# successful
|
165
|
+
# @param [Float] focal_length
|
199
166
|
#
|
200
167
|
# @version SketchUp 6.0
|
201
|
-
def focal_length=(
|
168
|
+
def focal_length=(focal_length)
|
202
169
|
end
|
203
170
|
|
204
|
-
# The fov method retrieves the field of view of the
|
171
|
+
# The {#fov} method retrieves the field of view of the Camera.
|
205
172
|
#
|
206
173
|
# This is only applicable to perspective cameras.
|
207
174
|
#
|
208
175
|
# @example
|
209
176
|
# camera = Sketchup::Camera.new
|
210
177
|
# fov = camera.fov
|
211
|
-
# if (fov)
|
212
|
-
# UI.messagebox fov.to_s
|
213
|
-
# else
|
214
|
-
# UI.messagebox "Failure"
|
215
|
-
# end
|
216
178
|
#
|
217
|
-
# @return
|
179
|
+
# @return [Float] Field of view in degrees
|
218
180
|
#
|
219
181
|
# @version SketchUp 6.0
|
220
182
|
def fov
|
221
183
|
end
|
222
184
|
|
223
|
-
# The fov= method sets the field of view
|
224
|
-
# must be between 1 and 120, inclusive.
|
185
|
+
# The {#fov=} method sets the field of view for a Camera. Field of view
|
186
|
+
# must be between 1 and 120 degrees, inclusive.
|
225
187
|
#
|
226
188
|
# This is only valid on a perspective camera.
|
227
189
|
#
|
228
190
|
# @example
|
229
191
|
# camera = Sketchup::Camera.new
|
230
192
|
# fov = camera.fov = 56.78
|
231
|
-
# if (fov)
|
232
|
-
# UI.messagebox fov.to_s
|
233
|
-
# else
|
234
|
-
# UI.messagebox "Failure"
|
235
|
-
# end
|
236
193
|
#
|
237
|
-
# @param fov
|
238
|
-
#
|
239
|
-
#
|
240
|
-
# @return fov - the new field of view if successful
|
194
|
+
# @param [Numeric] fov
|
195
|
+
# Field of view in degrees
|
241
196
|
#
|
242
197
|
# @version SketchUp 6.0
|
243
198
|
def fov=(fov)
|
244
199
|
end
|
245
200
|
|
246
|
-
# The fov_is_height? method indicates whether the field of view is
|
247
|
-
#
|
201
|
+
# The {#fov_is_height?} method indicates whether the field of view is
|
202
|
+
# measured vertically, as opposed horizontally.
|
248
203
|
#
|
249
204
|
# @example
|
250
205
|
# camera = Sketchup.active_model.active_view.camera
|
@@ -256,98 +211,76 @@ class Sketchup::Camera
|
|
256
211
|
# # Compute the vertical FOV.
|
257
212
|
# end
|
258
213
|
#
|
259
|
-
# @return [Boolean]
|
214
|
+
# @return [Boolean]
|
260
215
|
#
|
261
216
|
# @version SketchUp 2015
|
262
217
|
def fov_is_height?
|
263
218
|
end
|
264
219
|
|
265
|
-
# The height method retrieves the height of a Camera
|
220
|
+
# The {#height} method retrieves the height of a Camera.
|
266
221
|
#
|
267
222
|
# This is only valid if it is not a perspective camera.
|
268
223
|
#
|
269
224
|
# @example
|
270
225
|
# camera = Sketchup::Camera.new
|
271
226
|
# camera.perspective = false
|
272
|
-
#
|
273
|
-
# if (h)
|
274
|
-
# UI.messagebox h.to_s
|
275
|
-
# else
|
276
|
-
# UI.messagebox "Failure"
|
277
|
-
# end
|
227
|
+
# height = camera.height
|
278
228
|
#
|
279
|
-
# @return
|
229
|
+
# @return [Float] height in inches.
|
280
230
|
#
|
281
231
|
# @version SketchUp 6.0
|
282
232
|
def height
|
283
233
|
end
|
284
234
|
|
285
|
-
# The height= method is used to set the height for the Camera in inches.
|
235
|
+
# The {#height=} method is used to set the height for the Camera in inches.
|
286
236
|
#
|
287
237
|
# This is only valid if it is not a perspective camera.
|
288
238
|
#
|
289
239
|
# @example
|
290
240
|
# camera = Sketchup::Camera.new
|
291
241
|
# camera.perspective = false
|
292
|
-
#
|
293
|
-
# if (h)
|
294
|
-
# UI.messagebox h.to_s
|
295
|
-
# else
|
296
|
-
# UI.messagebox "Failure"
|
297
|
-
# end
|
242
|
+
# camera.height = 20
|
298
243
|
#
|
299
244
|
# @param [Float] value
|
300
245
|
#
|
301
|
-
# @return height - height in current units if successful
|
302
|
-
#
|
303
246
|
# @version SketchUp 6.0
|
304
247
|
def height=(value)
|
305
248
|
end
|
306
249
|
|
307
|
-
# The image_width method
|
308
|
-
# the
|
250
|
+
# The {#image_width} method returns the width of the image, as used to
|
251
|
+
# calculate the {#focal_length}. This value has no effect on how the view
|
252
|
+
# is displayed in SketchUp.
|
309
253
|
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
# values in SketchUp, the image_width and focal_length values are specified in
|
313
|
-
# millimeters rather than in inches.
|
254
|
+
# The default value, 0, is interpreted by SketchUp as 36 mm (the width of
|
255
|
+
# traditional 35 mm film).
|
314
256
|
#
|
315
257
|
# @example
|
316
258
|
# camera = Sketchup::Camera.new
|
317
|
-
#
|
318
|
-
# if (w)
|
319
|
-
# UI.messagebox w.to_s
|
320
|
-
# else
|
321
|
-
# UI.messagebox "Failure"
|
322
|
-
# end
|
259
|
+
# width = camera.image_width
|
323
260
|
#
|
324
|
-
# @return
|
261
|
+
# @return [Float] Width in mm.
|
325
262
|
#
|
326
263
|
# @version SketchUp 6.0
|
327
264
|
def image_width
|
328
265
|
end
|
329
266
|
|
330
|
-
# The image_width= method is used to set the
|
331
|
-
#
|
267
|
+
# The {#image_width=} method is used to set the width of the image, as used to
|
268
|
+
# calculate the {#focal_length}. This value has no effect on how the view
|
269
|
+
# is displayed in SketchUp.
|
332
270
|
#
|
333
|
-
# The value is
|
334
|
-
#
|
271
|
+
# The default value, 0, is interpreted by SketchUp as 36 mm (the width of
|
272
|
+
# traditional 35 mm film).
|
335
273
|
#
|
336
274
|
# @example
|
337
275
|
# camera = Sketchup::Camera.new
|
338
|
-
#
|
339
|
-
#
|
340
|
-
# UI.messagebox w.to_s
|
341
|
-
# else
|
342
|
-
# UI.messagebox "Failure"
|
343
|
-
# end
|
276
|
+
# camera.image_width = 1.0
|
277
|
+
# focal_length = camera.focal_length
|
344
278
|
#
|
345
|
-
# @param [Float]
|
346
|
-
#
|
347
|
-
# @return width - the width of the camera if successful
|
279
|
+
# @param [Float] image_width
|
280
|
+
# Width in mm.
|
348
281
|
#
|
349
282
|
# @version SketchUp 6.0
|
350
|
-
def image_width=(
|
283
|
+
def image_width=(image_width)
|
351
284
|
end
|
352
285
|
|
353
286
|
# Returns a new camera with eye (where the camera is) and targets (where the
|
@@ -359,7 +292,7 @@ class Sketchup::Camera
|
|
359
292
|
# up = Z_AXIS
|
360
293
|
# camera = Sketchup::Camera.new(eye, target, up)
|
361
294
|
#
|
362
|
-
# @example
|
295
|
+
# @example Arbitrary camera
|
363
296
|
# camera = Sketchup::Camera.new
|
364
297
|
#
|
365
298
|
# @overload initialize
|
@@ -379,59 +312,52 @@ class Sketchup::Camera
|
|
379
312
|
def initialize(*args)
|
380
313
|
end
|
381
314
|
|
382
|
-
# The is_2d? method indicates if the camera
|
383
|
-
#
|
315
|
+
# The {#is_2d?} method indicates if the camera two-point perspective or match photo
|
316
|
+
# mode.
|
384
317
|
#
|
385
318
|
# @example
|
386
319
|
# Sketchup.active_model.active_view.camera.is_2d?
|
387
320
|
#
|
388
|
-
# @return [Boolean]
|
321
|
+
# @return [Boolean]
|
389
322
|
#
|
390
323
|
# @version SketchUp 2015
|
391
324
|
def is_2d?
|
392
325
|
end
|
393
326
|
|
394
|
-
# The perspective= method is used to set whether or not this is a
|
395
|
-
# camera or an orthographic camera.
|
327
|
+
# The {#perspective=} method is used to set whether or not this is a
|
328
|
+
# perspective camera or an orthographic camera.
|
396
329
|
#
|
397
330
|
# @example
|
398
331
|
# camera = Sketchup::Camera.new
|
399
|
-
#
|
400
|
-
# if (status)
|
401
|
-
# UI.messagebox "Perspective"
|
402
|
-
# else
|
403
|
-
# UI.messagebox "Orthographic"
|
404
|
-
# end
|
332
|
+
# camera.perspective = false
|
405
333
|
#
|
406
|
-
# @param perspective
|
407
|
-
# true for perspective, false for orthographic
|
334
|
+
# @param [Boolean] perspective
|
408
335
|
#
|
409
|
-
# @return status - true if perspective, false if orthographic
|
410
336
|
#
|
411
337
|
# @version SketchUp 6.0
|
412
338
|
def perspective=(perspective)
|
413
339
|
end
|
414
340
|
|
415
|
-
# The perspective? method is used to determine whether a camera is a
|
341
|
+
# The {#perspective?} method is used to determine whether a camera is a
|
416
342
|
# perspective or orthographic camera.
|
417
343
|
#
|
418
344
|
# @example
|
419
345
|
# camera = Sketchup::Camera.new
|
420
346
|
# status = camera.perspective?
|
421
347
|
# if (status)
|
422
|
-
#
|
348
|
+
# puts "Perspective"
|
423
349
|
# else
|
424
|
-
#
|
350
|
+
# puts "Orthographic"
|
425
351
|
# end
|
426
352
|
#
|
427
|
-
# @return [Boolean]
|
353
|
+
# @return [Boolean]
|
428
354
|
#
|
429
355
|
# @version SketchUp 6.0
|
430
356
|
def perspective?
|
431
357
|
end
|
432
358
|
|
433
|
-
# The scale_2d method returns a float indicating the scaling factor of
|
434
|
-
# cameras.
|
359
|
+
# The {#scale_2d} method returns a float indicating the scaling factor of 2
|
360
|
+
# point perspective cameras.
|
435
361
|
#
|
436
362
|
# When the camera is in two-point perspective and the user uses the zoom tools,
|
437
363
|
# this value will change. Zooming out will produce a value greater than 1.0.
|
@@ -471,67 +397,48 @@ class Sketchup::Camera
|
|
471
397
|
def set(eye, target, up)
|
472
398
|
end
|
473
399
|
|
474
|
-
# The target method retrieves Point3d that the camera is pointing at.
|
400
|
+
# The {#target} method retrieves Point3d that the camera is pointing at.
|
475
401
|
#
|
476
402
|
# @example
|
477
403
|
# camera = Sketchup::Camera.new
|
478
|
-
#
|
479
|
-
# t = camera.target
|
480
|
-
# if (t)
|
481
|
-
# UI.messagebox t.to_s
|
482
|
-
# else
|
483
|
-
# UI.messagebox "Failure".
|
484
|
-
# end
|
404
|
+
# target = camera.target
|
485
405
|
#
|
486
|
-
# @return
|
406
|
+
# @return [Geom::Point3d]
|
487
407
|
#
|
488
408
|
# @version SketchUp 6.0
|
489
409
|
def target
|
490
410
|
end
|
491
411
|
|
492
|
-
# The up method is used to retrieve the up vector for the camera. This is
|
493
|
-
# direction that the top of the camera is facing.
|
412
|
+
# The {#up} method is used to retrieve the up vector for the camera. This is
|
413
|
+
# the direction that the top of the camera is facing.
|
494
414
|
#
|
495
415
|
# @example
|
496
416
|
# camera = Sketchup::Camera.new
|
497
|
-
# # 0.0, 1.0, 0.0
|
498
417
|
# up = camera.up
|
499
|
-
# if (up)
|
500
|
-
# UI.messagebox up.to_s
|
501
|
-
# else
|
502
|
-
# UI.messagebox "Failure"
|
503
|
-
# end
|
504
418
|
#
|
505
|
-
# @return
|
419
|
+
# @return [Geom::Vector3d]
|
506
420
|
#
|
507
421
|
# @version SketchUp 6.0
|
508
422
|
def up
|
509
423
|
end
|
510
424
|
|
511
|
-
# The xaxis method is used to retrieve the x axis of the camera coordinate
|
512
|
-
# system
|
425
|
+
# The {#xaxis} method is used to retrieve the x axis of the camera coordinate
|
426
|
+
# system.
|
513
427
|
#
|
514
428
|
# This value is computed from the cross product between the camera direction
|
515
429
|
# and the up vector.
|
516
430
|
#
|
517
431
|
# @example
|
518
432
|
# camera = Sketchup::Camera.new
|
519
|
-
#
|
520
|
-
# v = camera.xaxis
|
521
|
-
# if (v)
|
522
|
-
# UI.messagebox v.to_s
|
523
|
-
# else
|
524
|
-
# UI.messagebox "Failure"
|
525
|
-
# end
|
433
|
+
# xaxis = camera.xaxis
|
526
434
|
#
|
527
|
-
# @return
|
435
|
+
# @return [Geom::Vector3d] ]
|
528
436
|
#
|
529
437
|
# @version SketchUp 6.0
|
530
438
|
def xaxis
|
531
439
|
end
|
532
440
|
|
533
|
-
# The yaxis method retrieves the y axis of the camera coordinate system
|
534
|
-
# defined by the camera's direction and up vector.
|
441
|
+
# The {#yaxis} method retrieves the y axis of the camera coordinate system.
|
535
442
|
#
|
536
443
|
# This value is computed to be perpendicular the camera x and z axes. It is
|
537
444
|
# equivalent to the up direction, but is computed to make sure that it is
|
@@ -540,21 +447,15 @@ class Sketchup::Camera
|
|
540
447
|
# @example
|
541
448
|
# camera = Sketchup::Camera.new
|
542
449
|
# # 0.0, 1.0, 0.0
|
543
|
-
#
|
544
|
-
# if (v)
|
545
|
-
# UI.messagebox v.to_s
|
546
|
-
# else
|
547
|
-
# UI.messagebox "Failure"
|
548
|
-
# end
|
450
|
+
# yaxis = camera.yaxis
|
549
451
|
#
|
550
|
-
# @return
|
452
|
+
# @return [Geom::Vector3d] ]
|
551
453
|
#
|
552
454
|
# @version SketchUp 6.0
|
553
455
|
def yaxis
|
554
456
|
end
|
555
457
|
|
556
|
-
# The zaxis method retrieves the z axis of the camera coordinate system
|
557
|
-
# defined by the camera's direction and up vector.
|
458
|
+
# The {#zaxis} method retrieves the z axis of the camera coordinate system.
|
558
459
|
#
|
559
460
|
# This value is computed. It is the same as Camera.direction
|
560
461
|
#
|