point.hpp File Reference
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>

Functions

template<class Point>
double angle (const Point &a, const Point &b, const Point &c)
 
double clamp (double x, double a, double b)
 
template<class Point>
bool collinear (const Point &p1, const Point &p2, const Point &p3)
 
template<class Point>
bool coplanar (const Point &p1, const Point &p2, const Point &p3, const Point &p4)
 
template<class Point>
Point cross (const Point &x, const Point &y)
 
template<class Point>
double distance (const Point &a, const Point &b)
 
template<class Point>
double distanceToLine (const Point &x, const Point &y, const Point &p)
 
template<class Point>
double distanceToTriangle (const Point &x, const Point &y, const Point &z, const Point &p)
 
template<class Point>
double dot (const Point &x, const Point &y)
 
template<class Point>
bool inFront (const Point &p1, const Point &p2, const Point &p3, const Point &p4)
 
template<class Point>
double norm (const Point &a)
 
template<class Point>
Point sub (const Point &x, const Point &y)
 

Function Documentation

◆ angle()

template<class Point>
double angle ( const Point & a,
const Point & b,
const Point & c )

◆ clamp()

double clamp ( double x,
double a,
double b )
inline

◆ collinear()

template<class Point>
bool collinear ( const Point & p1,
const Point & p2,
const Point & p3 )

◆ coplanar()

template<class Point>
bool coplanar ( const Point & p1,
const Point & p2,
const Point & p3,
const Point & p4 )

◆ cross()

template<class Point>
Point cross ( const Point & x,
const Point & y )

◆ distance()

template<class Point>
double distance ( const Point & a,
const Point & b )

◆ distanceToLine()

template<class Point>
double distanceToLine ( const Point & x,
const Point & y,
const Point & p )

◆ distanceToTriangle()

template<class Point>
double distanceToTriangle ( const Point & x,
const Point & y,
const Point & z,
const Point & p )

◆ dot()

template<class Point>
double dot ( const Point & x,
const Point & y )

◆ inFront()

template<class Point>
bool inFront ( const Point & p1,
const Point & p2,
const Point & p3,
const Point & p4 )

◆ norm()

template<class Point>
double norm ( const Point & a)

◆ sub()

template<class Point>
Point sub ( const Point & x,
const Point & y )