CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CartoTypeCore::Point3< T > Class Template Reference

#include <cartotype_base.h>

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

X { 0 }
 
Y { 0 }
 
Z { 0 }
 

Detailed Description

template<class T>
class CartoTypeCore::Point3< T >

A templated 3D point class.

Constructor & Destructor Documentation

◆ Point3() [1/3]

template<class T >
CartoTypeCore::Point3< T >::Point3 ( )
inlinenoexcept

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

◆ Point3() [2/3]

template<class T >
CartoTypeCore::Point3< T >::Point3 ( aX,
aY,
aZ 
)
inlinenoexcept

Create a point, specifying coordinates.

◆ Point3() [3/3]

template<class T >
CartoTypeCore::Point3< T >::Point3 ( Point2< T >  aPoint)
inlinenoexcept

Create a 3D point from a 2D point.

Member Function Documentation

◆ DistanceFrom()

template<class T >
T CartoTypeCore::Point3< T >::DistanceFrom ( const Point3< T > &  aOther) const
inlinenoexcept

Returns the distance of this point from another point.

◆ Normal()

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

Returns the surface normal as a unit vector.

◆ operator!=()

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

The inequality operator.

◆ operator*=()

template<class T >
void CartoTypeCore::Point3< T >::operator*= ( aFactor)
inlinenoexcept

Scale a point by a factor.

◆ operator+=()

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

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

◆ operator-=()

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

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

◆ operator<()

template<class T >
bool CartoTypeCore::Point3< T >::operator< ( const Point3< T > &  aPoint) const
inlinenoexcept

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

◆ operator==()

template<class T >
bool CartoTypeCore::Point3< T >::operator== ( const Point3< T > &  aPoint) const
inlinenoexcept

The equality operator.

◆ operator>()

template<class T >
bool CartoTypeCore::Point3< T >::operator> ( const Point2< T > &  aPoint) const
inlinenoexcept

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

◆ UnitVector()

template<class T >
Point3 CartoTypeCore::Point3< 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 CartoTypeCore::Point3< T >::VectorLength ( ) const
inlinenoexcept

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

Member Data Documentation

◆ X

template<class T >
T CartoTypeCore::Point3< T >::X { 0 }

The x coordinate.

◆ Y

template<class T >
T CartoTypeCore::Point3< T >::Y { 0 }

The y coordinate.

◆ Z

template<class T >
T CartoTypeCore::Point3< T >::Z { 0 }

The z coordinate.


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