libcuspatial  24.02.00
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
cuspatial::segment< T, Vertex > Class Template Reference

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)
 

Detailed Description

template<typename T, typename Vertex = cuspatial::vec_2d<T>>
class cuspatial::segment< T, Vertex >

A generic segment type.

Template Parameters
Tthe base type for the coordinates
Vertexthe vector type to use for vertices, vec_2d<T> by default

Definition at line 40 of file segment.cuh.


The documentation for this class was generated from the following file: