CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::TLineFP Class Reference

#include <cartotype_arithmetic.h>

Public Member Functions

 TLineFP (const TPointFP &aStart, const TPointFP &aEnd)
double Length () const
const TPointFPStart () const
const TPointFPEnd () const
bool DistanceExceeds (double aX1, double aY1, double aX2, double aY2, int32_t aPoints, double aMaxDistance) const
void GetTangent (double aDistance, TPointFP &aPoint) const
TLineFP Reverse () const

Detailed Description

A straight line or line segment defined using floating-point numbers.

Constructor & Destructor Documentation

◆ TLineFP()

CartoType::TLineFP::TLineFP ( const TPointFP aStart,
const TPointFP aEnd 

Creates a line from aStart to aEnd.

Member Function Documentation

◆ DistanceExceeds()

bool CartoType::TLineFP::DistanceExceeds ( double  aX1,
double  aY1,
double  aX2,
double  aY2,
int32_t  aPoints,
double  aMaxDistance 
) const

Returns true if the distance from the line segment of either of the one or two supplied points exceeds aMaxDistance. This function is used when flattening curved paths, for finding whether the path is flat enough, which is when all the control points are near enough to the line segments.

◆ End()

const TPointFP & CartoType::TLineFP::End ( ) const

Returns the end of the line segment.

◆ GetTangent()

void CartoType::TLineFP::GetTangent ( double  aDistance,
TPointFP aPoint 
) const

Returns a point at a certain distance along a line in aPoint. aDistance can be negative, or beyond the end of the line. In these cases the line is extended in the same direction.

◆ Length()

double CartoType::TLineFP::Length ( ) const

Returns the length of the line segment.

◆ Reverse()

TLineFP CartoType::TLineFP::Reverse ( ) const

Returns a reversed copy of this line.

◆ Start()

const TPointFP & CartoType::TLineFP::Start ( ) const

Returns the start of the line segment.

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