ActiveLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
active::geometry::PolyPoint Class Reference

#include <PolyPoint.h>

Inheritance diagram for active::geometry::PolyPoint:
Inheritance graph
[legend]
Collaboration diagram for active::geometry::PolyPoint:
Collaboration graph
[legend]

Public Types

using Unique = std::unique_ptr<PolyPoint>
 Unique pointer.
 
using Shared = std::shared_ptr<PolyPoint>
 Shared pointer.
 
using Option = std::optional<PolyPoint>
 Optional.
 
- Public Types inherited from active::geometry::Point
using Unique = std::unique_ptr<Point>
 Unique pointer.
 
using Shared = std::shared_ptr<Point>
 Shared pointer.
 
using Option = std::optional<Point>
 Optional.
 

Public Member Functions

 PolyPoint ()
 
 PolyPoint (const double &x, const double &y, const double &z=0.0, double angle=0.0, vertex_id id=0)
 
 PolyPoint (const Point &source, double angle=0.0, vertex_id id=0)
 
 PolyPoint (const PolyPoint &source)
 
virtual ~PolyPoint ()=default
 
virtual PolyPointclonePtr () const override
 
PolyPointoperator= (const PolyPoint &source)
 
PolyPointoperator= (const Point &source)
 
bool isArc (double prec=math::eps) const
 
virtual double lengthFrom2D (const Point &ref) const override
 
void setSweep (const Line &ref)
 
void setSweepParallel (const Line &ref)
 
- Public Member Functions inherited from active::geometry::Point
 Point ()
 
 Point (const double &x, const double &y, const double &z=0.0)
 
 Point (const Point &source2D, double z)
 
virtual ~Point ()=default
 
virtual bool operator== (const Point &ref) const
 
virtual bool operator!= (const Point &ref) const
 
virtual bool operator< (const Point &ref) const
 
Pointoperator= (const Point &source)
 
virtual Point operator+ (const Point &offset) const
 
virtual Pointoperator+= (const Point &offset)
 
virtual Point operator- (const Point &offset) const
 
virtual Pointoperator-= (const Point &offset)
 
virtual Point operator* (const double &mult) const
 
virtual Point operator* (const Matrix3x3 &matrix) const
 
virtual Point operator* (const Matrix4x4 &matrix) const
 
virtual Pointoperator*= (const double &mult)
 
virtual Pointoperator*= (const Matrix3x3 &matrix)
 
virtual Pointoperator*= (const Matrix4x4 &matrix)
 
virtual Point operator/ (const double &mult) const
 
virtual Pointoperator/= (const double &mult)
 
virtual bool isEqual2D (const Point &ref, double prec=math::eps) const
 
virtual bool isEqual3D (const Point &ref, double prec=math::eps) const
 
virtual double lengthFrom3D (const Point &ref) const
 
Point rounded2D (double prec=math::eps) const
 
Point rounded3D (double prec=math::eps) const
 
double azimuthAngleTo (const Point &ref) const
 
double altitudeAngleTo (const Point &ref) const
 
PointmovePolar (double len, double angle)
 
PointmovePolar (double len, double azim, double alt)
 
- Public Member Functions inherited from active::utility::Cloner
virtual ~Cloner ()=default
 

Public Attributes

double sweep = 0.0
 The sweep angle of an edge leading to this point (0.0 = atraight line)
 
vertex_id id = 0
 An optional unique ID for the vertex, e.g. for maintaining links to a specific vertex within a polygon.
 
- Public Attributes inherited from active::geometry::Point
double x
 X coordinate.
 
double y
 Y coordinate.
 
double z
 Z coordinate.
 

Detailed Description

Overrides the Point class to support curved edges, primarily for Polygon vertices

PolyPoint defines the sweep angle for an edge leading to this point (0.0 = straight edge). It also includes an ID, a number that can be used to uniquely identify a specific vertex within a polygon. This ID can ensure that operations modifying the order of vertices does not affect associations between vertices and other data.

Constructor & Destructor Documentation

◆ PolyPoint() [1/4]

active::geometry::PolyPoint::PolyPoint ( )
inline

Default constructor

Here is the caller graph for this function:

◆ PolyPoint() [2/4]

active::geometry::PolyPoint::PolyPoint ( const double & x,
const double & y,
const double & z = 0.0,
double angle = 0.0,
vertex_id id = 0 )
inline

Constructor

Parameters
xX coordinate
yY coordinate
zZ coordinate
angleThe sweep angle to this position (0 = straight line)
idThe point ID

◆ PolyPoint() [3/4]

PolyPoint::PolyPoint ( const Point & source,
double angle = 0.0,
vertex_id id = 0 )

Constructor

Parameters
sourceThe point position
angleThe sweep angle to this position (0 = straight line)
idThe point ID

◆ PolyPoint() [4/4]

PolyPoint::PolyPoint ( const PolyPoint & source)

Copy constructor

Parameters
sourceThe object to copy

◆ ~PolyPoint()

virtual active::geometry::PolyPoint::~PolyPoint ( )
virtualdefault

Destructor

Member Function Documentation

◆ clonePtr()

virtual PolyPoint * active::geometry::PolyPoint::clonePtr ( ) const
inlineoverridevirtual

Clone method

Returns
A clone of this object

Reimplemented from active::geometry::Point.

Here is the call graph for this function:

◆ isArc()

bool active::geometry::PolyPoint::isArc ( double prec = math::eps) const
inline

Determine if the vertex describes an arc

Returns
True if an arc is described
Here is the caller graph for this function:

◆ lengthFrom2D()

double PolyPoint::lengthFrom2D ( const Point & ref) const
overridevirtual

Calculates the distant from a specified point to this in 2D

Parameters
refA point to calculate the distance from
Returns
The distance from the point to this

Reimplemented from active::geometry::Point.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

PolyPoint & active::geometry::PolyPoint::operator= ( const Point & source)
inline

Assignment operator

Parameters
sourceThe point to assign
Returns
A reference to this
Here is the call graph for this function:

◆ operator=() [2/2]

PolyPoint & PolyPoint::operator= ( const PolyPoint & source)

Assignment operator

Parameters
sourceThe point to assign
Returns
A reference to this
Here is the call graph for this function:

◆ setSweep()

void PolyPoint::setSweep ( const Line & ref)

Set the sweep angle to this point from the specified line

Parameters
refThe reference line (centre to sweep start)
Here is the call graph for this function:

◆ setSweepParallel()

void PolyPoint::setSweepParallel ( const Line & ref)

Set the sweep angle for an arc starting parallel to a line

Parameters
refThe reference line
Here is the call graph for this function:

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