[:en]Collision Detection Between a Circle and a Line Segment[:]

[:en]Collision between Segment AB and circle C (radius r).  Let’s remember a little of vector algebra and pythagorean theorem. The height of the right-angle triangle ACD is what we need to compare with radius. [latex] \vec{AD} \text{ is the projection Continua a leggere [:en]Collision Detection Between a Circle and a Line Segment[:]

Code: Send out the brain pods

proviamo un po’ il plugin per la syntax highlight [sourcecode language=”cpp”] #include <QtCore> class Rectangle : public Shape { public: Rectangle(); Rectangle(int width, int height); Rectangle (&Rectangle one); ~Rectangle(); virtual int Area(); // of course!! virtual int Perimeter(); private: int Continua a leggere Code: Send out the brain pods