point.hpp File Reference
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
+ Include dependency graph for point.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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 )

Definition at line 109 of file point.hpp.

+ Here is the call graph for this function:

◆ clamp()

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

Definition at line 136 of file point.hpp.

+ Here is the caller graph for this function:

◆ collinear()

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

Definition at line 64 of file point.hpp.

◆ coplanar()

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

Definition at line 72 of file point.hpp.

+ Here is the call graph for this function:

◆ cross()

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

Definition at line 35 of file point.hpp.

+ Here is the caller graph for this function:

◆ distance()

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

Definition at line 95 of file point.hpp.

◆ distanceToLine()

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

Definition at line 125 of file point.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ distanceToTriangle()

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

Definition at line 146 of file point.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot()

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

Definition at line 57 of file point.hpp.

+ Here is the caller graph for this function:

◆ inFront()

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

Definition at line 84 of file point.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ norm()

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

Definition at line 102 of file point.hpp.

◆ sub()

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

Definition at line 46 of file point.hpp.

+ Here is the caller graph for this function: