X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fsurfacepoint.h;h=57a66d1e95f3898bf1f050ed65afa77bf8d89cae;hb=827b227ae53884109b6885ccd1424dda8c0b3725;hp=3513ac8e41bf82e1a02e3250ccdfaebb57932576;hpb=9260eee3126731c1e6b54ce3407be757d0d71716;p=libs%2Fmath.git diff --git a/source/geometry/surfacepoint.h b/source/geometry/surfacepoint.h index 3513ac8..57a66d1 100644 --- a/source/geometry/surfacepoint.h +++ b/source/geometry/surfacepoint.h @@ -1,18 +1,37 @@ #ifndef MSP_GEOMETRY_SURFACEPOINT_H_ #define MSP_GEOMETRY_SURFACEPOINT_H_ +#include #include namespace Msp { namespace Geometry { +/** +A point on the surface of a shape. +*/ template struct SurfacePoint { LinAl::Vector position; LinAl::Vector normal; + T distance; }; +template +void sort_points(SurfacePoint *points, unsigned size) +{ + for(unsigned i=0; i