Class: Wx::Point2DDouble
- Inherits:
-
Object
- Object
- Wx::Point2DDouble
- Defined in:
- lib/wx/doc/gen/geometry.rb,
lib/wx/doc/geometry.rb
Overview
This class is untracked and should not be derived from nor instances extended!
Point2DDouble represents a point in a 2D (Cartesian) coordinate system, with additional vector operations available.
Instance Method Summary collapse
- #*(v) ⇒ Wx::Point2DDouble
- #+(pt) ⇒ Wx::Point2DDouble
-
#- ⇒ Wx::Point2DDouble
Returns the reflection (i.e., negation) of this point.
- #/(v) ⇒ Wx::Point2DDouble
-
#==(pt) ⇒ Boolean
Returns the reflection (i.e., negation) of this point.
- #add!(pt) ⇒ self
- #assign(pt) ⇒ self
- #div!(v) ⇒ self
-
#get_cross_product(vec) ⇒ Float
(also: #cross_product)
Returns the cross product, where the products of the Y values of this point and are subtracted from the X products.
-
#get_distance(pt) ⇒ Float
(also: #distance)
Returns the distance between this point and pt.
-
#get_distance_square(pt) ⇒ Float
(also: #distance_square)
Returns the squared distance between this point and pt.
-
#get_dot_product(vec) ⇒ Float
(also: #dot_product)
Returns the dot (i.e., scalar) product, where the products of the X and Y values of this point and are added.
-
#get_floor ⇒ Wx::Point
(also: #floor)
This is an overloaded member function, provided for convenience.
-
#get_rounded ⇒ Wx::Point
(also: #rounded)
This is an overloaded member function, provided for convenience.
-
#get_vector_angle ⇒ Float
(also: #vector_angle)
Returns the principal value of the arc tangent of the Y and X values, expressed in degrees.
-
#get_vector_length ⇒ Float
(also: #vector_length)
Returns the hypotenuse, where the X and Y coordinates of the point represent the lengths of the base and height sides of a right triangle.
- #get_x ⇒ Float (also: #x)
- #get_y ⇒ Float (also: #y)
-
#initialize(*args) ⇒ Point2DDouble
constructor
A new instance of Point2DDouble.
- #mul!(v) ⇒ self
-
#normalize ⇒ void
Sets the vector length to 1.0, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
-
#set_vector_angle(degrees) ⇒ void
(also: #vector_angle=)
Repositions the X and Y coordinates based on the provided angle’s degrees.
-
#set_vector_length(length) ⇒ void
(also: #vector_length=)
Sets the vector length to length, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
- #set_x(v) ⇒ Float (also: #x=)
- #set_y(v) ⇒ Float (also: #y=)
- #sub!(pt) ⇒ self
Constructor Details
#initialize ⇒ Wx::Point2DDouble #initialize(x, y) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble
Returns a new instance of Point2DDouble.
153 |
# File 'lib/wx/doc/gen/geometry.rb', line 153 def initialize(*args) end |
Instance Method Details
#- ⇒ Wx::Point2DDouble
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
125 |
# File 'lib/wx/doc/geometry.rb', line 125 def -(pt) end |
#==(pt) ⇒ Boolean
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
131 |
# File 'lib/wx/doc/gen/geometry.rb', line 131 def ==(pt) end |
#add!(pt) ⇒ self
105 |
# File 'lib/wx/doc/geometry.rb', line 105 def add!(pt) end |
#assign(pt) ⇒ self
101 |
# File 'lib/wx/doc/geometry.rb', line 101 def assign(pt) end |
#div!(v) ⇒ self
117 |
# File 'lib/wx/doc/geometry.rb', line 117 def div!(v) end |
#get_cross_product(vec) ⇒ Float Also known as: cross_product
Returns the cross product, where the products of the Y values of this point and are subtracted from the X products.
This represents another vector that is at right angles to both points.
214 |
# File 'lib/wx/doc/gen/geometry.rb', line 214 def get_cross_product(vec) end |
#get_distance(pt) ⇒ Float Also known as: distance
Returns the distance between this point and pt.
194 |
# File 'lib/wx/doc/gen/geometry.rb', line 194 def get_distance(pt) end |
#get_distance_square(pt) ⇒ Float Also known as: distance_square
Returns the squared distance between this point and pt.
200 |
# File 'lib/wx/doc/gen/geometry.rb', line 200 def get_distance_square(pt) end |
#get_dot_product(vec) ⇒ Float Also known as: dot_product
Returns the dot (i.e., scalar) product, where the products of the X and Y values of this point and are added.
206 |
# File 'lib/wx/doc/gen/geometry.rb', line 206 def get_dot_product(vec) end |
#get_floor ⇒ Wx::Point Also known as: floor
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
157 |
# File 'lib/wx/doc/gen/geometry.rb', line 157 def get_floor; end |
#get_rounded ⇒ Wx::Point Also known as: rounded
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
162 |
# File 'lib/wx/doc/gen/geometry.rb', line 162 def get_rounded; end |
#get_vector_angle ⇒ Float Also known as: vector_angle
Returns the principal value of the arc tangent of the Y and X values, expressed in degrees.
178 |
# File 'lib/wx/doc/gen/geometry.rb', line 178 def get_vector_angle; end |
#get_vector_length ⇒ Float Also known as: vector_length
Returns the hypotenuse, where the X and Y coordinates of the point represent the lengths of the base and height sides of a right triangle.
167 |
# File 'lib/wx/doc/gen/geometry.rb', line 167 def get_vector_length; end |
#get_x ⇒ Float Also known as: x
84 |
# File 'lib/wx/doc/geometry.rb', line 84 def get_x; end |
#get_y ⇒ Float Also known as: y
92 |
# File 'lib/wx/doc/geometry.rb', line 92 def get_y; end |
#mul!(v) ⇒ self
113 |
# File 'lib/wx/doc/geometry.rb', line 113 def mul!(v) end |
#normalize ⇒ void
This method returns an undefined value.
Sets the vector length to 1.0, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
189 |
# File 'lib/wx/doc/gen/geometry.rb', line 189 def normalize; end |
#set_vector_angle(degrees) ⇒ void Also known as: vector_angle=
This method returns an undefined value.
Repositions the X and Y coordinates based on the provided angle’s degrees.
184 |
# File 'lib/wx/doc/gen/geometry.rb', line 184 def set_vector_angle(degrees) end |
#set_vector_length(length) ⇒ void Also known as: vector_length=
This method returns an undefined value.
Sets the vector length to length, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
173 |
# File 'lib/wx/doc/gen/geometry.rb', line 173 def set_vector_length(length) end |
#set_x(v) ⇒ Float Also known as: x=
88 |
# File 'lib/wx/doc/geometry.rb', line 88 def set_x(v) end |
#set_y(v) ⇒ Float Also known as: y=
96 |
# File 'lib/wx/doc/geometry.rb', line 96 def set_y(v) end |
#sub!(pt) ⇒ self
109 |
# File 'lib/wx/doc/geometry.rb', line 109 def sub!(pt) end |