Maths portion of LCv3
Posted by gaganjyot on Apr 22, 2016; 4:53pm
URL: https://forum.librecad.org/Maths-portion-of-LCv3-tp5713530.html
Hi Dli,
Dli, I and ries were discussing about LibreCAD 3 maths part and I guess you might be busy, we had a few questions, so you could reply those here,
1) Dli, I realised we were using 2x2 matrices only at the max. Eigen provides matrices as MatrixXd means dynamic doubles matrix and as Matrix2d which means 2x2 matrix so should we use Matrix2d? will that be fine?
2) Ries was looking over the code, and found that the constructors always gave newer objects and not the references to the older objects,
From IRC discussion,
18:12 UTC ries I think the copy constructor has side effects the way it's created, eg, it doesn't make a real copy
18:15 UTC ries For Quadratic rotate(const double& a); do you perhaps mean Quadratic& rotate(const double& a);
18:15 UTC ries So you can do quadratic.rotate(a).move(b); ??
need your thoughts on this one also.
Ries prefers the maths related classes to be immutable, I remember we opted for the mutable due to performance reasons, but I and ries had a deal long time ago to compare mutable and immutable classes and check the difference we get. So I guess I might be doing that too, just for testing purposes. This was just for keeping you informed. :)
Ries could add more,