Loading common/geometry/shape_line_chain.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const { int min_d = INT_MAX; int nearest; int nearest = 0; for ( int i = 0; i < SegmentCount() ; i++ ) { int d = CSegment(i).Distance(aP); Loading include/geometry/seg.h +1 −12 Original line number Diff line number Diff line Loading @@ -307,18 +307,7 @@ inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { // fixme: numerical errors for large integers assert(false); /*const VECTOR2I d = aB - aA; ecoord det = d.Dot(d); ecoord dxdy = (ecoord) d.x * d.y; ecoord qx = ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * (aA.y - y) ) / det; extended_type qy = ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * (aA.x - x) ) / det; return VECTOR2<T> ( (T) qx, (T) qy );*/ return VECTOR2I(0, 0); } Loading include/geometry/shape.h +4 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,10 @@ class SHAPE { * Returns a dynamically allocated copy of the shape * @retval copy of the shape */ virtual SHAPE* Clone() const { assert(false); }; virtual SHAPE* Clone() const { assert(false); return NULL; }; /** * Function Collide() Loading Loading
common/geometry/shape_line_chain.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const { int min_d = INT_MAX; int nearest; int nearest = 0; for ( int i = 0; i < SegmentCount() ; i++ ) { int d = CSegment(i).Distance(aP); Loading
include/geometry/seg.h +1 −12 Original line number Diff line number Diff line Loading @@ -307,18 +307,7 @@ inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { // fixme: numerical errors for large integers assert(false); /*const VECTOR2I d = aB - aA; ecoord det = d.Dot(d); ecoord dxdy = (ecoord) d.x * d.y; ecoord qx = ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * (aA.y - y) ) / det; extended_type qy = ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * (aA.x - x) ) / det; return VECTOR2<T> ( (T) qx, (T) qy );*/ return VECTOR2I(0, 0); } Loading
include/geometry/shape.h +4 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,10 @@ class SHAPE { * Returns a dynamically allocated copy of the shape * @retval copy of the shape */ virtual SHAPE* Clone() const { assert(false); }; virtual SHAPE* Clone() const { assert(false); return NULL; }; /** * Function Collide() Loading