Castor3D 0.16.0
Multiplatform 3D engine
Classes | Namespaces | Functions
Point.hpp File Reference

Classes

class  castor::Point< T, TCount >
 Templated static dimensions point representation. More...
 

Namespaces

namespace  castor
 
namespace  castor::point
 Point helper functions.
 

Functions

template<typename CoordT , uint32_t CountT>
Point< CoordT, CountT > const & castor::point::getPoint (Point< CoordT, CountT > const &lhs)
 
template<typename CoordT , uint32_t CountT>
Point< CoordT, CountT > const & castor::point::getPoint (LengthT< Point< CoordT, CountT > > const &lhs)
 
template<typename CoordT , typename CoordU , uint32_t CountT>
void castor::point::setPoint (Point< CoordT, CountT > &lhs, Point< CoordU, CountT > const &rhs)
 
template<typename CoordT , typename CoordU , uint32_t CountT>
void castor::point::setPoint (LengthT< Point< CoordT, CountT > > &lhs, Point< CoordU, CountT > const &rhs)
 
template<typename CoordT , uint32_t CountT>
void castor::point::setCoord (Point< CoordT, CountT > &pt, uint32_t i, CoordT const &c)
 
template<typename CoordT , uint32_t CountT>
void castor::point::setCoord (Coords< CoordT, CountT > &pt, uint32_t i, CoordT const &c)
 
template<typename CoordT , uint32_t CountT>
void castor::point::setCoord (LengthT< Point< CoordT, CountT > > &pt, uint32_t i, CoordT const &c)
 
template<typename CoordT , uint32_t CountT>
CoordT const & castor::point::getCoord (Point< CoordT, CountT > const &pt, uint32_t i)
 
template<typename CoordT , uint32_t CountT>
CoordT const & castor::point::getCoord (Coords< CoordT, CountT > const &pt, uint32_t i)
 
template<typename CoordT , uint32_t CountT>
CoordT const & castor::point::getCoord (LengthT< Point< CoordT, CountT > > const &pt, uint32_t i)
 
template<typename T , uint32_t TCount>
static void castor::point::floor (Point< T, TCount > &point)
 Floors every value of a point's data.
 
template<typename T , uint32_t TCount>
static Point< T, TCount > castor::point::getFloored (Point< T, TCount > const &point)
 Floors every value of a point's data.
 
template<typename T , uint32_t TCount>
static void castor::point::ceil (Point< T, TCount > &point)
 Ceils every value of a point's data.
 
template<typename T , uint32_t TCount>
static Point< T, TCount > castor::point::getCeiled (Point< T, TCount > const &point)
 Ceils every value of a point's data.
 
template<typename T , uint32_t TCount>
static void castor::point::round (Point< T, TCount > &point)
 Rounds every value of a point's data.
 
template<typename T , uint32_t TCount>
static Point< T, TCount > castor::point::getRounded (Point< T, TCount > const &point)
 Rounds every value of a point's data.
 
template<typename T , uint32_t TCount>
static void castor::point::negate (Point< T, TCount > &point)
 Negates every value of a point's data.
 
template<typename T , uint32_t TCount>
static void castor::point::normalise (Point< T, TCount > &point)
 Normalises the point.
 
template<typename T , uint32_t TCount>
static Point< T, TCount > castor::point::getNormalised (Point< T, TCount > const &point)
 Returns the normalised form of a point.
 
template<typename T , typename U , uint32_t TCount>
static T castor::point::dot (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the dot product of 2 points.
 
template<Vector3T LhsT, Vector3T RhsT>
static LhsT castor::point::cross (LhsT const &lhs, RhsT const &rhs)
 Computes the cross product of 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::cosTheta (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the trigonometric cosine of the angle between 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::lengthSquared (Point< T, TCount > const &point)
 Computes the squared Euclidian length of the vector.
 
template<typename T , uint32_t TCount>
static double castor::point::length (Point< T, TCount > const &point)
 Computes the Euclidian length of the vector.
 
template<typename T , uint32_t TCount>
static double castor::point::lengthManhattan (Point< T, TCount > const &point)
 Computes the Manhattan length of the vector.
 
template<typename T , uint32_t TCount>
static double castor::point::lengthMinkowski (Point< T, TCount > const &point, double order)
 Computes the Minkowski length of the vector.
 
template<typename T , uint32_t TCount>
static double castor::point::lengthChebychev (Point< T, TCount > const &point)
 Computes the Chebychev length of the vector.
 
template<typename T , uint32_t TCount>
static double castor::point::distanceSquared (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the squared Euclidian distance between two points.
 
template<typename T , uint32_t TCount>
static double castor::point::distance (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the Euclidian distance between two points.
 
template<typename T , uint32_t TCount>
static double castor::point::distanceManhattan (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the Manhattan distance between two points.
 
template<typename T , uint32_t TCount>
static double castor::point::distanceMinkowski (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs, double order)
 Computes the Minkowski distance between two points.
 
template<typename T , uint32_t TCount>
static double castor::point::distanceChebychev (Point< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the Chebychev distance between two points.
 
template<typename T , typename U , uint32_t TCount>
static T castor::point::dot (Coords< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the dot product of 2 points.
 
template<typename T , typename U >
static Point3< T > castor::point::cross (Coords3< T > const &lhs, Point3< T > const &rhs)
 Computes the cross product of 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::cosTheta (Coords< T, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the trigonometric cosine of the angle between 2 points.
 
template<typename T , typename U , uint32_t TCount>
static T castor::point::dot (Point< T, TCount > const &lhs, Coords< T, TCount > const &rhs)
 Computes the scalar product of 2 points.
 
template<typename T , typename U >
static Point3< T > castor::point::cross (Point3< T > const &lhs, Coords3< T > const &rhs)
 Computes the cross product of 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::cosTheta (Point< T, TCount > const &lhs, Coords< T, TCount > const &rhs)
 Computes the trigonometric cosine of the angle between 2 points.
 
template<typename T , typename U , uint32_t TCount>
static T castor::point::dot (Coords< T const, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the scalar product of 2 points.
 
template<typename T , typename U >
static Point3< T > castor::point::cross (Coords< T const, 3 > const &lhs, Point3< T > const &rhs)
 Computes the cross product of 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::cosTheta (Coords< T const, TCount > const &lhs, Point< T, TCount > const &rhs)
 Computes the trigonometric cosine of the angle between 2 points.
 
template<typename T , typename U , uint32_t TCount>
static T castor::point::dot (Point< T, TCount > const &lhs, Coords< T const, TCount > const &rhs)
 Computes the scalar product of 2 points.
 
template<typename T , typename U >
static Point3< T > castor::point::cross (Point3< T > const &lhs, Coords< T const, 3 > const &rhs)
 Computes the cross product of 2 points.
 
template<typename T , uint32_t TCount>
static double castor::point::cosTheta (Point< T, TCount > const &lhs, Coords< T const, TCount > const &rhs)
 Computes the trigonometric cosine of the angle between 2 points.
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator== (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator!= (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator== (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator!= (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator== (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
bool castor::operator!= (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount>
Point< std::remove_cv_t< T >, TCount > castor::operator- (Point< T, TCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator+ (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator- (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator* (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator/ (Point< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator+ (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator- (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator* (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator/ (Point< T, TCount > const &lhs, Coords< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator+ (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator- (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator* (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U , uint32_t UCount>
Point< std::remove_cv_t< T >, TCount > castor::operator/ (Coords< T, TCount > const &lhs, Point< U, UCount > const &rhs)
 
template<typename T , uint32_t TCount, typename U >
Point< std::remove_cv_t< T >, TCount > castor::operator+ (Point< T, TCount > const &lhs, U const *rhs)
 
template<typename T , uint32_t TCount, typename U >
Point< std::remove_cv_t< T >, TCount > castor::operator- (Point< T, TCount > const &lhs, U const *rhs)
 
template<typename T , uint32_t TCount, typename U >
Point< std::remove_cv_t< T >, TCount > castor::operator* (Point< T, TCount > const &lhs, U const *rhs)
 
template<typename T , uint32_t TCount, typename U >
Point< std::remove_cv_t< T >, TCount > castor::operator/ (Point< T, TCount > const &lhs, U const *rhs)
 
template<typename T , uint32_t TCount>
Point< std::remove_cv_t< T >, TCount > castor::operator+ (Point< T, TCount > const &lhs, T const &rhs)
 
template<typename T , uint32_t TCount>
Point< std::remove_cv_t< T >, TCount > castor::operator- (Point< T, TCount > const &lhs, T const &rhs)
 
template<typename T , uint32_t TCount>
Point< std::remove_cv_t< T >, TCount > castor::operator* (Point< T, TCount > const &lhs, T const &rhs)
 
template<typename T , uint32_t TCount>
Point< std::remove_cv_t< T >, TCount > castor::operator/ (Point< T, TCount > const &lhs, T const &rhs)
 
template<typename DstCompT , typename SrcT >
PointTypeT< SrcT, DstCompT > castor::pointCast (SrcT const &src)
 
template<typename T , uint32_t TCount>
Stringcastor::operator<< (String &out, Point< T, TCount > const &in)
 
template<typename T , uint32_t TCount>
Stringcastor::operator>> (String &in, Point< T, TCount > &out)
 
template<typename T , uint32_t TCount, typename CharType >
std::basic_ostream< CharType > & castor::operator<< (std::basic_ostream< CharType > &out, Point< T, TCount > const &in)
 
template<typename T , uint32_t TCount, typename CharType >
std::basic_istream< CharType > & castor::operator>> (std::basic_istream< CharType > &in, Point< T, TCount > &out)