Class: Geom::Point2d
- Inherits:
-
Object
- Object
- Geom::Point2d
- Defined in:
- lib/sketchup-api-stubs/stubs/Geom/Point2d.rb
Overview
Instance Method Summary collapse
- #+(vector) ⇒ Geom::Point2d
- #-(arg) ⇒ Object
-
#==(point) ⇒ Boolean
The #== method compares two points for equality.
- #[](index) ⇒ Length
- #[]=(index, value) ⇒ Numeric
- #clone ⇒ Geom::Point2d
- #distance(point) ⇒ Numeric
-
#initialize(*args) ⇒ Point2d
constructor
The new method creates a new Point2d.
- #inspect ⇒ String
- #offset(*args) ⇒ Object
- #offset!(*args) ⇒ Object
- #set!(*args) ⇒ Object
- #to_a ⇒ Array(Numeric, Numeric)
- #to_s ⇒ String
-
#transform(transform) ⇒ Geom::Point2d
The #transform method applies a transformation to a point, returning a new point.
-
#transform!(transform) ⇒ Geom::Point2d
The #transform! method applies a transformation to a point.
-
#vector_to(point) ⇒ Geom::Vector2d
The #vector_to method returns the vector between points.
- #x ⇒ Length
- #x=(x) ⇒ Numeric
- #y ⇒ Length
- #y=(y) ⇒ Numeric
Constructor Details
#initialize ⇒ Geom::Point2d #initialize(x, y) ⇒ Geom::Point2d #initialize(point) ⇒ Geom::Point2d
The new method creates a new Geom::Point2d.
183 184 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 183 def initialize(*args) end |
Instance Method Details
#+(vector) ⇒ Geom::Point2d
The #+ operator is a simple way to add to the current x and y values of the Geom::Point2d, or to set the values of the Geom::Point2d by adding a Vector2d to the Geom::Point2d.
41 42 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 41 def +(vector) end |
#-(vector) ⇒ Geom::Point2d #-(point) ⇒ Geom::Vector2d
The #- operator is a simple way to subtract from the current x and y values of the Geom::Point2d.
66 67 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 66 def -(arg) end |
#==(point) ⇒ Boolean
The #== method compares two points for equality. This uses the standard SketchUp tolerance to determine if two points are the same.
82 83 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 82 def ==(point) end |
#[](index) ⇒ Length
The #[] method returns the value of the Geom::Point2d at the specified index.
101 102 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 101 def [](index) end |
#[]=(index, value) ⇒ Numeric
The #[]= method sets the x or y value of the Geom::Point2d based on the specific index of the value.
121 122 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 121 def []=(index, value) end |
#clone ⇒ Geom::Point2d
The #clone method creates another point identical to the Geom::Point2d being cloned.
134 135 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 134 def clone end |
#distance(point) ⇒ Numeric
The #distance method computes the distance from the Geom::Point2d to another Geom::Point2d.
151 152 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 151 def distance(point) end |
#inspect ⇒ String
The #inspect method formats the Geom::Point2d as a string.
195 196 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 195 def inspect end |
#offset(vector) ⇒ Geom::Point2d #offset(vector, distance) ⇒ Geom::Point2d
The #offset method offsets the Geom::Point2d by a Vector2d and returns a new Geom::Point2d. If distance is provided, it must be non-zero.
219 220 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 219 def offset(*args) end |
#offset!(vector) ⇒ Geom::Point2d #offset!(vector, distance) ⇒ Geom::Point2d
The #offset! method offsets the Geom::Point2d by a Vector2d. The Geom::Point2d itself is modified. The length of the vector must not be zero.
244 245 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 244 def offset!(*args) end |
#set!(point) ⇒ Geom::Point2d #set!(x, y) ⇒ Geom::Point2d
The #set! method sets the values of the Geom::Point2d.
265 266 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 265 def set!(*args) end |
#to_a ⇒ Array(Numeric, Numeric)
The #to_a method converts the Geom::Point2d to an array of 2 numbers.
278 279 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 278 def to_a end |
#to_s ⇒ String
The #to_s method returns a string representation of the Geom::Point2d.
290 291 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 290 def to_s end |
#transform(transform) ⇒ Geom::Point2d
The #transform method applies a transformation to a point, returning a new point. The original point is unchanged by this method.
308 309 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 308 def transform(transform) end |
#transform!(transform) ⇒ Geom::Point2d
The #transform! method applies a transformation to a point. The point itself is modified.
326 327 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 326 def transform!(transform) end |
#vector_to(point) ⇒ Geom::Vector2d
The #vector_to method returns the vector between points.
343 344 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 343 def vector_to(point) end |
#x ⇒ Length
The #x method returns the x value of the Geom::Point2d.
355 356 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 355 def x end |
#x=(x) ⇒ Numeric
The #x= method sets the x value of the Geom::Point2d.
370 371 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 370 def x=(x) end |
#y ⇒ Length
The #y method returns the y value of the Geom::Point2d.
382 383 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 382 def y end |
#y=(y) ⇒ Numeric
The #y= method sets the y value of the Geom::Point2d.
397 398 |
# File 'lib/sketchup-api-stubs/stubs/Geom/Point2d.rb', line 397 def y=(y) end |