X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fsurfacepoint.h;h=57a66d1e95f3898bf1f050ed65afa77bf8d89cae;hb=827b227ae53884109b6885ccd1424dda8c0b3725;hp=251964cef854d91469f6ed9c10280534d3519535;hpb=adb812a194961d542dcb0abd61258cbc8723ecd9;p=libs%2Fmath.git diff --git a/source/geometry/surfacepoint.h b/source/geometry/surfacepoint.h index 251964c..57a66d1 100644 --- a/source/geometry/surfacepoint.h +++ b/source/geometry/surfacepoint.h @@ -1,6 +1,7 @@ #ifndef MSP_GEOMETRY_SURFACEPOINT_H_ #define MSP_GEOMETRY_SURFACEPOINT_H_ +#include #include namespace Msp { @@ -14,8 +15,23 @@ struct SurfacePoint { LinAl::Vector position; LinAl::Vector normal; + T distance; }; +template +void sort_points(SurfacePoint *points, unsigned size) +{ + for(unsigned i=0; i