CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CartoType::TPoint3< T > Class Template Reference

#include <cartotype_base.h>

Public Member Functions

 TPoint3 () noexcept
 
 TPoint3 (T aX, T aY, T aZ) noexcept
 
 TPoint3 (TPoint2< T > aPoint) noexcept
 
bool operator== (const TPoint3< T > &aPoint) const noexcept
 
bool operator!= (const TPoint3< T > &aPoint) const noexcept
 
void operator+= (const TPoint3< T > &aPoint) noexcept
 
void operator-= (const TPoint3< T > &aPoint) noexcept
 
void operator*= (T aFactor) noexcept
 
bool operator< (const TPoint3< T > &aPoint) const noexcept
 
bool operator> (const TPoint2< T > &aPoint) const noexcept
 
VectorLength () const noexcept
 
DistanceFrom (const TPoint3< T > &aOther) const noexcept
 
TPoint3 UnitVector () const noexcept
 

Static Public Member Functions

static TPoint3< T > Normal (const TPoint3< T > &aA, const TPoint3< T > &aB, const TPoint3< T > &aC) noexcept
 

Public Attributes

iX { 0 }
 
iY { 0 }
 
iZ { 0 }
 

Detailed Description

template<class T>
class CartoType::TPoint3< T >

A templated 3D point class.

Constructor & Destructor Documentation

◆ TPoint3() [1/3]

template<class T >
CartoType::TPoint3< T >::TPoint3 ( )
inlinenoexcept

Create a point with coordinates (0,0,0).

◆ TPoint3() [2/3]

template<class T >
CartoType::TPoint3< T >::TPoint3 ( aX,
aY,
aZ 
)
inlinenoexcept

Create a point, specifying coordinates.

◆ TPoint3() [3/3]

template<class T >
CartoType::TPoint3< T >::TPoint3 ( TPoint2< T >  aPoint)
inlinenoexcept

Create a 3D point from a 2D point.

Member Function Documentation

◆ DistanceFrom()

template<class T >
T CartoType::TPoint3< T >::DistanceFrom ( const TPoint3< T > &  aOther) const
inlinenoexcept

Returns the distance of this point from another point.

◆ Normal()

template<class T >
static TPoint3< T > CartoType::TPoint3< T >::Normal ( const TPoint3< T > &  aA,
const TPoint3< T > &  aB,
const TPoint3< T > &  aC 
)
inlinestaticnoexcept

Returns the surface normal as a unit vector.

◆ operator!=()

template<class T >
bool CartoType::TPoint3< T >::operator!= ( const TPoint3< T > &  aPoint) const
inlinenoexcept

The inequality operator.

◆ operator*=()

template<class T >
void CartoType::TPoint3< T >::operator*= ( aFactor)
inlinenoexcept

Scale a point by a factor.

◆ operator+=()

template<class T >
void CartoType::TPoint3< T >::operator+= ( const TPoint3< T > &  aPoint)
inlinenoexcept

Offset a point by another point, treated as a positive vector.

◆ operator-=()

template<class T >
void CartoType::TPoint3< T >::operator-= ( const TPoint3< T > &  aPoint)
inlinenoexcept

Offset a point by another point, treated as a negative vector.

◆ operator<()

template<class T >
bool CartoType::TPoint3< T >::operator< ( const TPoint3< T > &  aPoint) const
inlinenoexcept

The less-than operator, ordering points by x coordinate, then y coordinate, then z coordinate.

◆ operator==()

template<class T >
bool CartoType::TPoint3< T >::operator== ( const TPoint3< T > &  aPoint) const
inlinenoexcept

The equality operator.

◆ operator>()

template<class T >
bool CartoType::TPoint3< T >::operator> ( const TPoint2< T > &  aPoint) const
inlinenoexcept

The greater-than operator, ordering points by x coordinate, then y coordinate.

◆ UnitVector()

template<class T >
TPoint3 CartoType::TPoint3< T >::UnitVector ( ) const
inlinenoexcept

Returns a unit vector pointing in the same direction as this point treated as a vector.

◆ VectorLength()

template<class T >
T CartoType::TPoint3< T >::VectorLength ( ) const
inlinenoexcept

Returns the length of the vector represented by this point: its distance from the origin (0,0).

Member Data Documentation

◆ iX

template<class T >
T CartoType::TPoint3< T >::iX { 0 }

The x coordinate.

◆ iY

template<class T >
T CartoType::TPoint3< T >::iY { 0 }

The y coordinate.

◆ iZ

template<class T >
T CartoType::TPoint3< T >::iZ { 0 }

The z coordinate.


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