X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fsurfacepoint.h;h=3b38e1d2d03f6fdf5e2ee5c99ff6fbfaca633813;hb=7919982691f0b8c69d8bef1bf6471b1e7a312163;hp=251964cef854d91469f6ed9c10280534d3519535;hpb=adb812a194961d542dcb0abd61258cbc8723ecd9;p=libs%2Fmath.git diff --git a/source/geometry/surfacepoint.h b/source/geometry/surfacepoint.h index 251964c..3b38e1d 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,24 @@ struct SurfacePoint { LinAl::Vector position; LinAl::Vector normal; + T distance; + bool entry; }; +template +void sort_points(SurfacePoint *points, unsigned size) +{ + for(unsigned i=0; i