469 const Vertex rotpoint = rotPoint (sel); |
469 const Vertex rotpoint = rotPoint (sel); |
470 const double angle = (pi * *currentGrid().confs[Grid::Angle]) / 180, |
470 const double angle = (pi * *currentGrid().confs[Grid::Angle]) / 180, |
471 cosangle = cos (angle), |
471 cosangle = cos (angle), |
472 sinangle = sin (angle); |
472 sinangle = sin (angle); |
473 |
473 |
|
474 log ("rotpoint: %1", rotpoint); |
|
475 |
474 // ref: http://en.wikipedia.org/wiki/Transformation_matrix#Rotation_2 |
476 // ref: http://en.wikipedia.org/wiki/Transformation_matrix#Rotation_2 |
475 Matrix transform ( |
477 Matrix transform ( |
476 { |
478 { |
477 (l* l * (1 - cosangle)) + cosangle, |
479 (l* l * (1 - cosangle)) + cosangle, |
478 (m* l * (1 - cosangle)) - (n* sinangle), |
480 (m* l * (1 - cosangle)) - (n* sinangle), |