A generic segment type. More...
Public Types | |
using | value_type = T |
Public Member Functions | |
segment< T > CUSPATIAL_HOST_DEVICE | translate (Vertex const &v) const |
Return a copy of segment, translated by v . | |
Vertex CUSPATIAL_HOST_DEVICE | center () const |
Return the geometric center of segment. | |
T CUSPATIAL_HOST_DEVICE | length2 () const |
Return the length squared of segment. | |
T CUSPATIAL_HOST_DEVICE | slope () |
Return slope of segment. | |
Vertex CUSPATIAL_HOST_DEVICE | lower_left () |
Return the lower left vertex of segment. | |
bool CUSPATIAL_HOST_DEVICE | collinear (segment< T > const &other) |
Public Attributes | |
Vertex | v1 |
Vertex | v2 |
Friends | |
std::ostream & | operator<< (std::ostream &os, segment< T > const &seg) |
A generic segment type.
T | the base type for the coordinates |
Vertex | the vector type to use for vertices, vec_2d<T> by default |
Definition at line 40 of file segment.cuh.