C# Class AbstractedSheep.ShuttleTrackerWorld.Point3D

Represents an immutable point in 3D Cartesian space.
Mostra file Open project: AbstractedSheep/Shuttle-Tracker Class Usage Examples

Public Methods

Method Description
CrossProduct ( Point3D p ) : Point3D

Calculates the cross product of two points as vectors positioned on the origin.

DistanceTo ( Point3D p ) : double

Calculates the Euclidian distance between this point and another point.

Equals ( object obj ) : bool
GetHashCode ( ) : int
Magnitude ( ) : double

Calculate the magnitude of the vector formed between the origin and this point.

MoveTowards ( Point3D p, double distance ) : Point3D

Calculate the result of moving this point a given distance towards another point.

Point3D ( double x = 0.0, double y = 0.0, double z = 0.0 ) : System
ToString ( ) : string
operator ( ) : Point3D
operator ( ) : bool

Method Details

CrossProduct() public method

Calculates the cross product of two points as vectors positioned on the origin.
public CrossProduct ( Point3D p ) : Point3D
p Point3D The point to cross with.
return Point3D

DistanceTo() public method

Calculates the Euclidian distance between this point and another point.
public DistanceTo ( Point3D p ) : double
p Point3D The point to measure the distance to.
return double

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Magnitude() public method

Calculate the magnitude of the vector formed between the origin and this point.
public Magnitude ( ) : double
return double

MoveTowards() public method

Calculate the result of moving this point a given distance towards another point.
public MoveTowards ( Point3D p, double distance ) : Point3D
p Point3D The point to move towards.
distance double The distance to move. It is possible to move past either endpoint.
return Point3D

Point3D() public method

public Point3D ( double x = 0.0, double y = 0.0, double z = 0.0 ) : System
x double
y double
z double
return System

ToString() public method

public ToString ( ) : string
return string

operator() public static method

public static operator ( ) : Point3D
return Point3D

operator() public static method

public static operator ( ) : bool
return bool