/*! Projects a point in a space defined by its x, y, and z coordinates into a point onto a plane, given two rotation angles around the x resp. y axis. */ const QPointF LineDiagram::LineDiagramType::project( QPointF point, QPointF maxLimits, double z, const QModelIndex& index ) const { Q_UNUSED( maxLimits ); ThreeDLineAttributes td = diagram()->threeDLineAttributes( index ); //Pending Michel FIXME - the rotation does not work as expected atm double xrad = DEGTORAD( td.lineXRotation() ); double yrad = DEGTORAD( td.lineYRotation() ); QPointF ret = QPointF(point.x()*cos( yrad ) + z * sin( yrad ) , point.y()*cos( xrad ) - z * sin( xrad ) ); return ret; }
bool ThreeDLineAttributes::operator==( const ThreeDLineAttributes& r ) const { return ( lineXRotation() == r.lineXRotation() && lineYRotation() == r.lineYRotation() && AbstractThreeDAttributes::operator==(r)); }