X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fsurfacepoint.h;h=3b38e1d2d03f6fdf5e2ee5c99ff6fbfaca633813;hb=99ad80a76d53d090ddf602c085d80b675609b8ba;hp=3513ac8e41bf82e1a02e3250ccdfaebb57932576;hpb=9260eee3126731c1e6b54ce3407be757d0d71716;p=libs%2Fmath.git diff --git a/source/geometry/surfacepoint.h b/source/geometry/surfacepoint.h index 3513ac8..3b38e1d 100644 --- a/source/geometry/surfacepoint.h +++ b/source/geometry/surfacepoint.h @@ -1,18 +1,38 @@ #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; + bool entry; }; +template +void sort_points(SurfacePoint *points, unsigned size) +{ + for(unsigned i=0; i