X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgeometry.cpp;h=e0ad270c019d3e297c61786efe00974218384caf;hb=84fc4387b9a6051819da5c9ed688de1ec372c7f7;hp=1ec93db7e1430b2752cc4e77a2b2d9d30ce61aeb;hpb=7f3a6b11585376eecd80979ec3da2346c5314d88;p=architektonas diff --git a/src/geometry.cpp b/src/geometry.cpp index 1ec93db..e0ad270 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -83,10 +83,14 @@ Point Geometry::MirrorPointAroundLine(Point point, Point tail, Point head) } +// +// point: The point we're rotating +// rotationPoint: The point we're rotating around +// Point Geometry::RotatePointAroundPoint(Point point, Point rotationPoint, double angle) { - Vector v = Vector(point, rotationPoint); -// Vector v = Vector(rotationPoint, point); +// Vector v = Vector(point, rotationPoint); + Vector v = Vector(rotationPoint, point); double px = (v.x * cos(angle)) - (v.y * sin(angle)); double py = (v.x * sin(angle)) + (v.y * cos(angle)); @@ -126,6 +130,7 @@ bool Geometry::Intersects(Object * obj1, Object * obj2, double * t, double * s) } #endif +#if 0 // Finds the intersection between two lines (if any) int Geometry::Intersects(Line * l1, Line * l2, double * tp/*= 0*/, double * up/*= 0*/) { @@ -384,7 +389,7 @@ int Geometry::Intersects(Circle * c1, Circle * c2, double * tp/*= 0*/, double * return 2; } - +#endif // should we just do common trig solves, like AAS, ASA, SAS, SSA? // Law of Cosines: