1 #ifndef MSP_GEOMETRY_SURFACEPOINT_H_
2 #define MSP_GEOMETRY_SURFACEPOINT_H_
5 #include <msp/linal/vector.h>
11 A point on the surface of a shape.
13 template<typename T, unsigned N>
16 LinAl::Vector<T, N> position;
17 LinAl::Vector<T, N> normal;
22 template<typename T, unsigned N>
23 void sort_points(SurfacePoint<T, N> *points, unsigned size)
25 for(unsigned i=0; i<size; ++i)
28 for(unsigned j=i+1; j<size; ++j)
29 if(points[j].distance<points[n].distance)
32 std::swap(points[i], points[n]);
36 } // namespace Geometry