libosmscout 1.1.1
Loading...
Searching...
No Matches
p2t::Point Struct Reference

#include <libosmscout-map-opengl/include/poly2tri/common/shapes.h>

Collaboration diagram for p2t::Point:

Public Member Functions

 Point ()
 Default constructor does nothing (for performance).
 Point (double x, double y)
 Construct using coordinates.
void set_zero ()
 Set this point to all zeros.
void set (double x_, double y_)
 Set this point to some specified coordinates.
Point operator- () const
 Negate this point.
void operator+= (const Point &v)
 Add a point to this point.
void operator-= (const Point &v)
 Subtract a point from this point.
void operator*= (double a)
 Multiply this point by a scalar.
double Length () const
 Get the length of this point (the norm).
double Normalize ()
 Convert this point into a unit point. Returns the Length.

Public Attributes

double x
double y
std::vector< Edge * > edge_list
 The edges this point constitutes an upper ending point.

Constructor & Destructor Documentation

◆ Point() [1/2]

p2t::Point::Point ( )
inline

Default constructor does nothing (for performance).

◆ Point() [2/2]

p2t::Point::Point ( double x,
double y )
inline

Construct using coordinates.

Member Function Documentation

◆ Length()

double p2t::Point::Length ( ) const
inline

Get the length of this point (the norm).

◆ Normalize()

double p2t::Point::Normalize ( )
inline

Convert this point into a unit point. Returns the Length.

◆ operator*=()

void p2t::Point::operator*= ( double a)
inline

Multiply this point by a scalar.

◆ operator+=()

void p2t::Point::operator+= ( const Point & v)
inline

Add a point to this point.

◆ operator-()

Point p2t::Point::operator- ( ) const
inline

Negate this point.

◆ operator-=()

void p2t::Point::operator-= ( const Point & v)
inline

Subtract a point from this point.

◆ set()

void p2t::Point::set ( double x_,
double y_ )
inline

Set this point to some specified coordinates.

◆ set_zero()

void p2t::Point::set_zero ( )
inline

Set this point to all zeros.

Member Data Documentation

◆ edge_list

std::vector<Edge*> p2t::Point::edge_list

The edges this point constitutes an upper ending point.

◆ x

double p2t::Point::x

◆ y

double p2t::Point::y

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