Samchon Framework for CPP
1.0.0
|
A geometry coordinates (point) More...
#include <GeometryPoint.hpp>
Public Member Functions | |
GeometryPoint () | |
Default Constructor. More... | |
GeometryPoint (int uid) | |
Construct from uid. More... | |
GeometryPoint (int uid, double longitude, double latitude) | |
Construct from uid and geometry coordinates. More... | |
virtual auto | key () const -> int override |
Get a key that can identify the Entity uniquely. More... | |
auto | calcDistance (const GeometryPoint &point) const -> double |
Calculate distance between target Branch. More... | |
auto | toString () const -> string |
Convert the Branch to String. More... | |
Protected Attributes | |
int | uid |
An unique id for uniqueness. More... | |
double | longitude |
The longitude; coordinates X. More... | |
double | latitude |
The latitude, coordinates Y. More... | |
|
inline |
Default Constructor.
Definition at line 59 of file GeometryPoint.hpp.
|
inline |
Construct from uid.
Geometry coordinates, longitude and latitude will have a random value between
Definition at line 71 of file GeometryPoint.hpp.
References samchon::library::Math::random().
|
inline |
Construct from uid and geometry coordinates.
longitude | Longitude, a coordinate of the geometry point |
latitude | Latitude, a coordinate of the geometry point |
Definition at line 86 of file GeometryPoint.hpp.
|
inlineoverridevirtual |
Get a key that can identify the Entity uniquely.
If identifier of the Entity is not atomic value, returns a string represents the composite identifier. If identifier of the Entity is not string, converts the identifier to string and returns the string.
Reimplemented from samchon::protocol::Entity< int >.
Definition at line 106 of file GeometryPoint.hpp.
|
inline |
Calculate distance between target Branch.
Referenced from http://thesunrises.tistory.com/958 (Geometry points to killometers)
branch | The target Branch to calculate |
Definition at line 117 of file GeometryPoint.hpp.
References samchon::library::Math::degree_to_radian(), and samchon::library::Math::radian_to_degree().
|
inline |
Convert the Branch to String.
Have of form of tab and enter delimeters for Excel.
{$uid} {$longitude} {$latitude}
Definition at line 164 of file GeometryPoint.hpp.
References samchon::library::StringUtil::substitute().
|
protected |
An unique id for uniqueness.
Definition at line 40 of file GeometryPoint.hpp.
|
protected |
The longitude; coordinates X.
Definition at line 45 of file GeometryPoint.hpp.
|
protected |
The latitude, coordinates Y.
Definition at line 50 of file GeometryPoint.hpp.