C# Class VoidLib.Common.Point

Inheritance: IComparable
Mostra file Open project: andrewmunro/Void

Private Properties

Property Type Description

Public Methods

Method Description
CompareTo ( object obj ) : int

Compares the current instance with another object of the same type.

Distance ( Point pt ) : double

Gets the distance to the specified Point.

Distance ( Point ptA, Point ptB ) : double

Returns the distance between two points.

Distance ( float toX, float toY, float toZ ) : double

Gets the distance to the specified location.

Distance ( float fromX, float fromY, float fromZ, float toX, float toY, float toZ ) : double

Returns the distance between two points.

Equals ( Point pt ) : bool

Determines whether the specified Point is equal to the current Point.

Equals ( object obj ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

FlatDistance ( float toX, float toY ) : double

Gets the flat distance. (Ignores Z value)

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetXml ( ) : System.Xml.Linq.XElement

Gets the XML format for the Point.

HeightDiff ( float toZ ) : float

Gets the height difference.

HeightDiffAbs ( float toZ ) : float

Gets the height difference.

Point ( ) : System

Initializes a new instance of the Point class.

Point ( Point pt ) : System

Initializes a new instance of the Point class.

Point ( System.Xml.Linq.XElement xml ) : System

Initializes a new instance of the Point class using Xml as a source.

Point ( float x, float y ) : System

Initializes a new instance of the Point class.

Point ( float x, float y, float z ) : System

Initializes a new instance of the Point class.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

operator ( ) : Point

Implements the operator *.

operator ( ) : bool

Implements the operator !=.

operator ( ) : double

Implements the operator *.

Method Details

CompareTo() public method

Compares the current instance with another object of the same type.
/// is not the same type as this instance.
public CompareTo ( object obj ) : int
obj object An object to compare with this instance.
return int

Distance() public method

Gets the distance to the specified Point.
public Distance ( Point pt ) : double
pt Point The point.
return double

Distance() public static method

Returns the distance between two points.
public static Distance ( Point ptA, Point ptB ) : double
ptA Point The pt A.
ptB Point The pt B.
return double

Distance() public method

Gets the distance to the specified location.
public Distance ( float toX, float toY, float toZ ) : double
toX float To X.
toY float To Y.
toZ float To Z.
return double

Distance() public static method

Returns the distance between two points.
public static Distance ( float fromX, float fromY, float fromZ, float toX, float toY, float toZ ) : double
fromX float From X.
fromY float From Y.
fromZ float From Z.
toX float To X.
toY float To Y.
toZ float To Z.
return double

Equals() public method

Determines whether the specified Point is equal to the current Point.
public Equals ( Point pt ) : bool
pt Point The to compare with the current .
return bool

Equals() public method

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( object obj ) : bool
obj object The to compare with the current .
return bool

FlatDistance() public method

Gets the flat distance. (Ignores Z value)
public FlatDistance ( float toX, float toY ) : double
toX float To X.
toY float To Y.
return double

GetHashCode() public method

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
return int

GetXml() public method

Gets the XML format for the Point.
public GetXml ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement

HeightDiff() public method

Gets the height difference.
public HeightDiff ( float toZ ) : float
toZ float To Z.
return float

HeightDiffAbs() public method

Gets the height difference.
public HeightDiffAbs ( float toZ ) : float
toZ float To Z.
return float

Point() public method

Initializes a new instance of the Point class.
public Point ( ) : System
return System

Point() public method

Initializes a new instance of the Point class.
public Point ( Point pt ) : System
pt Point The pt.
return System

Point() public method

Initializes a new instance of the Point class using Xml as a source.
public Point ( System.Xml.Linq.XElement xml ) : System
xml System.Xml.Linq.XElement
return System

Point() public method

Initializes a new instance of the Point class.
public Point ( float x, float y ) : System
x float The x.
y float The y.
return System

Point() public method

Initializes a new instance of the Point class.
public Point ( float x, float y, float z ) : System
x float The x.
y float The y.
z float The z.
return System

ToString() public method

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
return string

operator() public static method

Implements the operator *.
public static operator ( ) : Point
return Point

operator() public static method

Implements the operator !=.
public static operator ( ) : bool
return bool

operator() public static method

Implements the operator *.
public static operator ( ) : double
return double