| 446 | } |
| 447 | |
| 448 | void PatchNode::transformComponents(const Matrix4& matrix) { |
| 449 | // Are there any selected vertices? |
| 450 | if (selectedVertices()) |
| 451 | { |
| 452 | // Set the iterator to the start of the (transformed) control points array |
| 453 | PatchControlIter ctrl = m_patch.getControlPointsTransformed().begin(); |
| 454 | |
| 455 | // Cycle through the patch control instances and transform the selected ones |
| 456 | // greebo: Have to investigate this further, why there are actually two iterators needed |
| 457 | for (PatchNode::PatchControlInstances::iterator i = m_ctrl_instances.begin(); |
| 458 | i != m_ctrl_instances.end(); ++i, ++ctrl) |
| 459 | { |
| 460 | if (i->isSelected()) |
| 461 | { |
| 462 | ctrl->vertex = matrix.transformPoint(ctrl->vertex); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | // mark this patch transform as dirty |
| 467 | m_patch.transformChanged(); |
| 468 | } |
| 469 | |
| 470 | // Also, check if there are any drag planes selected |
| 471 | // this should only be true when the transform is a pure translation. |
| 472 | if (m_dragPlanes.isSelected()) |
| 473 | { |
| 474 | m_patch.transform(m_dragPlanes.evaluateTransform(matrix.translation())); |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | void PatchNode::_onTransformationChanged() |
| 479 | { |
nothing calls this directly
no test coverage detected