OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::Point3D< T > Class Template Reference

Three dimensional point. More...

#include "Point3D.h"

Public Member Functions

 Point3D (T _x, T _y, T _z)
 Constructor.
 
 Point3D (const Point3D< T > &_other)
 Copy constructor.
 
Point3D< T > & operator= (const Point3D< T > &_other)
 
Point3D< T > operator+ (const Point3D< T > &_other) const
 
Point3D< T > operator- (const Point3D< T > &_other) const
 
Point3D< T > operator* (const Point3D< T > &_other) const
 
Point3D< T > operator/ (const Point3D< T > &_other) const
 
Point3D< T > & operator+= (const Point3D< T > &_other)
 
Point3D< T > & operator-= (const Point3D< T > &_other)
 
Point3D< T > & operator*= (const Point3D< T > &_other)
 
Point3D< T > & operator/= (const Point3D< T > &_other)
 
bool operator== (const Point3D< T > &_other)
 
bool operator!= (const Point3D< T > &_other)
 
x (void) const
 Returns the current X value.
 
y (void) const
 Returns the current Y value.
 
z (void) const
 Returns the current Z value.
 
void setX (T _x)
 Will set the X value.
 
void setY (T _y)
 Will set the Y value.
 
void setZ (T _z)
 Will set the Z value.
 
addX (T _v)
 Will add the provided value to the X value and return the new X value.
 
addY (T _v)
 Will add the provided value to the Y value and return the new Y value.
 
addZ (T _z)
 Will add the provided value to the Z value and return the new Z value.
 
subX (T _v)
 Will subtract the provided value from the X value and return the new X value.
 
subY (T _v)
 Will subtract the provided value from the Y value and return the new Y value.
 
subZ (T _v)
 Will subtract the provided value from the Z value and return the new Z value.
 

Detailed Description

template<class T>
class ot::Point3D< T >

Three dimensional point.

Constructor & Destructor Documentation

◆ Point3D() [1/2]

template<class T >
Point3D::Point3D ( T _x,
T _y,
T _z )

Constructor.

Parameters
_xThe initial X value
_yThe initial Y value
_zThe initial Z value

◆ Point3D() [2/2]

template<class T >
Point3D::Point3D ( const Point3D< T > & _other)

Copy constructor.

Parameters
_otherThe other 3D point

Member Function Documentation

◆ addX()

template<class T >
T Point3D::addX ( T _v)

Will add the provided value to the X value and return the new X value.

Parameters
_vThe value to add

◆ addY()

template<class T >
T Point3D::addY ( T _v)

Will add the provided value to the Y value and return the new Y value.

Parameters
_vThe value to add

◆ addZ()

template<class T >
T Point3D::addZ ( T _z)

Will add the provided value to the Z value and return the new Z value.

Parameters
_vThe value to add

◆ operator!=()

template<class T >
bool Point3D::operator!= ( const Point3D< T > & _other)

◆ operator*()

template<class T >
Point3D< T > Point3D::operator* ( const Point3D< T > & _other) const

◆ operator*=()

template<class T >
Point3D< T > & Point3D::operator*= ( const Point3D< T > & _other)

◆ operator+()

template<class T >
Point3D< T > Point3D::operator+ ( const Point3D< T > & _other) const

◆ operator+=()

template<class T >
Point3D< T > & Point3D::operator+= ( const Point3D< T > & _other)

◆ operator-()

template<class T >
Point3D< T > Point3D::operator- ( const Point3D< T > & _other) const

◆ operator-=()

template<class T >
Point3D< T > & Point3D::operator-= ( const Point3D< T > & _other)

◆ operator/()

template<class T >
Point3D< T > Point3D::operator/ ( const Point3D< T > & _other) const

◆ operator/=()

template<class T >
Point3D< T > & Point3D::operator/= ( const Point3D< T > & _other)

◆ operator=()

template<class T >
Point3D< T > & Point3D::operator= ( const Point3D< T > & _other)

◆ operator==()

template<class T >
bool Point3D::operator== ( const Point3D< T > & _other)

◆ setX()

template<class T >
void ot::Point3D< T >::setX ( T _x)
inline

Will set the X value.

Parameters
_xThe X value to set

◆ setY()

template<class T >
void ot::Point3D< T >::setY ( T _y)
inline

Will set the Y value.

Parameters
_yThe Y value to set

◆ setZ()

template<class T >
void ot::Point3D< T >::setZ ( T _z)
inline

Will set the Z value.

Parameters
_zThe Z value to set

◆ subX()

template<class T >
T Point3D::subX ( T _v)

Will subtract the provided value from the X value and return the new X value.

Parameters
_vThe value to subtract

◆ subY()

template<class T >
T Point3D::subY ( T _v)

Will subtract the provided value from the Y value and return the new Y value.

Parameters
_vThe value to subtract

◆ subZ()

template<class T >
T Point3D::subZ ( T _v)

Will subtract the provided value from the Z value and return the new Z value.

Parameters
_vThe value to subtract

◆ x()

template<class T >
T ot::Point3D< T >::x ( void ) const
inline

Returns the current X value.

◆ y()

template<class T >
T ot::Point3D< T >::y ( void ) const
inline

Returns the current Y value.

◆ z()

template<class T >
T ot::Point3D< T >::z ( void ) const
inline

Returns the current Z value.


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