Class: Wx::Point2DDouble

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/geometry.rb,
lib/wx/doc/geometry.rb

Overview

Note:

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.

Requires:

  • USE_GEOMETRY

Instance Method Summary collapse

Constructor Details

#initializeWx::Point2DDouble #initialize(x, y) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble #initialize(pt) ⇒ Wx::Point2DDouble

Returns a new instance of Point2DDouble.

Overloads:



153
# File 'lib/wx/doc/gen/geometry.rb', line 153

def initialize(*args) end

Instance Method Details

#*(v) ⇒ Wx::Point2DDouble

Parameters:

Returns:



129
# File 'lib/wx/doc/geometry.rb', line 129

def *(v) end

#+(pt) ⇒ Wx::Point2DDouble

Parameters:

Returns:



121
# File 'lib/wx/doc/geometry.rb', line 121

def +(pt) end

#-Wx::Point2DDouble

Returns the reflection (i.e., negation) of this point.

For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).

Returns:



125
# File 'lib/wx/doc/geometry.rb', line 125

def -(pt) end

#/(v) ⇒ Wx::Point2DDouble

Parameters:

Returns:



133
# File 'lib/wx/doc/geometry.rb', line 133

def /(v) 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).

Parameters:

Returns:

  • (Boolean)


131
# File 'lib/wx/doc/gen/geometry.rb', line 131

def ==(pt) end

#add!(pt) ⇒ self

Parameters:

Returns:

  • (self)


105
# File 'lib/wx/doc/geometry.rb', line 105

def add!(pt) end

#assign(pt) ⇒ self

Parameters:

Returns:

  • (self)


101
# File 'lib/wx/doc/geometry.rb', line 101

def assign(pt) end

#div!(v) ⇒ self

Parameters:

Returns:

  • (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.

Parameters:

Returns:

  • (Float)


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.

Parameters:

Returns:

  • (Float)


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.

Parameters:

Returns:

  • (Float)


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.

Parameters:

Returns:

  • (Float)


206
# File 'lib/wx/doc/gen/geometry.rb', line 206

def get_dot_product(vec) end

#get_floorWx::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.

Returns:



157
# File 'lib/wx/doc/gen/geometry.rb', line 157

def get_floor; end

#get_roundedWx::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.

Returns:



162
# File 'lib/wx/doc/gen/geometry.rb', line 162

def get_rounded; end

#get_vector_angleFloat Also known as: vector_angle

Returns the principal value of the arc tangent of the Y and X values, expressed in degrees.

Returns:

  • (Float)


178
# File 'lib/wx/doc/gen/geometry.rb', line 178

def get_vector_angle; end

#get_vector_lengthFloat 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.

Returns:

  • (Float)


167
# File 'lib/wx/doc/gen/geometry.rb', line 167

def get_vector_length; end

#get_xFloat Also known as: x

Returns:

  • (Float)


84
# File 'lib/wx/doc/geometry.rb', line 84

def get_x; end

#get_yFloat Also known as: y

Returns:

  • (Float)


92
# File 'lib/wx/doc/geometry.rb', line 92

def get_y; end

#mul!(v) ⇒ self

Parameters:

Returns:

  • (self)


113
# File 'lib/wx/doc/geometry.rb', line 113

def mul!(v) end

#normalizevoid

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.

Parameters:

  • degrees (Float)


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).

Parameters:

  • length (Float)


173
# File 'lib/wx/doc/gen/geometry.rb', line 173

def set_vector_length(length) end

#set_x(v) ⇒ Float Also known as: x=

Parameters:

  • v (Float)

Returns:

  • (Float)


88
# File 'lib/wx/doc/geometry.rb', line 88

def set_x(v) end

#set_y(v) ⇒ Float Also known as: y=

Parameters:

  • v (Float)

Returns:

  • (Float)


96
# File 'lib/wx/doc/geometry.rb', line 96

def set_y(v) end

#sub!(pt) ⇒ self

Parameters:

Returns:

  • (self)


109
# File 'lib/wx/doc/geometry.rb', line 109

def sub!(pt) end