| 428 | } |
| 429 | |
| 430 | void PatchNode::evaluateTransform() |
| 431 | { |
| 432 | Matrix4 matrix = calculateTransform(); |
| 433 | |
| 434 | // Avoid transform calls when an identity matrix is passed, |
| 435 | // this equality check is cheaper than all the stuff going on in transform(). |
| 436 | if (matrix == Matrix4::getIdentity()) return; |
| 437 | |
| 438 | if (getType() == TRANSFORM_PRIMITIVE) |
| 439 | { |
| 440 | m_patch.transform(matrix); |
| 441 | } |
| 442 | else |
| 443 | { |
| 444 | transformComponents(matrix); |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | void PatchNode::transformComponents(const Matrix4& matrix) { |
| 449 | // Are there any selected vertices? |
no test coverage detected