Class DPoint (version 0.18)

Description: A point class with double (floating-point) coordinates

Class overview

Index

Method Overview

[static] DPoint from_ipoint( Point p )Create a floating-point coordinate point from an integer coordinate point
[static] DPoint newDefault constructor: creates a point at 0,0
[static] DPoint new( double x, double y )Constructor for a point from two coordinate values
[const] DPoint +( DPoint p )Add one point to another
[const] DPoint -( DPoint p )Subtract one point from another
[const] bool <( DPoint p )"less" comparison operator
[const] bool ==( DPoint p )Equality test operator
[const] bool !=( DPoint p )Inequality test operator
[const] double xAccessor to the x coordinate
[const] double yAccessor to the y coordinate
x=( double )Write accessor to the x coordinate
y=( double )Write accessor to the y coordinate
[const] DPoint *( double f )Scaling by some factor
[const] double distance( DPoint d )The euclidian distance to another point
[const] double sq_distance( DPoint d )The square euclidian distance to another point
[const] string to_sString conversion
assign( DPoint other )Assign the contents of another object to self
[const] DPoint dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( DPoint p )

Description: Inequality test operator

[const] DPoint *( double f )

Description: Scaling by some factor

Scaling may involve rounding for integer coordinate points.

[const] DPoint +( DPoint p )

Description: Add one point to another

Add point p to self by adding the coordinates

[const] DPoint -( DPoint p )

Description: Subtract one point from another

Subtract point p from self by subtracting the coordinates

[const] bool <( DPoint p )

Description: "less" comparison operator

This operator is provided to establish a sorting order

[const] bool ==( DPoint p )

Description: Equality test operator

assign( DPoint other )

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed

Description: Tell, if the object was destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] double distance( DPoint d )

Description: The euclidian distance to another point

d:The other point to compute the distance to.

[const] DPoint dup

Description: Creates a copy of self.

[static] DPoint from_ipoint( Point p )

Description: Create a floating-point coordinate point from an integer coordinate point

[static] DPoint new( double x, double y )
synonym: [static] DPoint new_xy( double x, double y )

Description: Constructor for a point from two coordinate values

[static] DPoint new

Description: Default constructor: creates a point at 0,0

[const] double sq_distance( DPoint d )

Description: The square euclidian distance to another point

d:The other point to compute the distance to.

[const] string to_s

Description: String conversion

[const] double x

Description: Accessor to the x coordinate

x=( double )

Description: Write accessor to the x coordinate

[const] double y

Description: Accessor to the y coordinate

y=( double )

Description: Write accessor to the y coordinate