Transform this patch as defined by the transformation matrix
| 210 | |
| 211 | // Transform this patch as defined by the transformation matrix <matrix> |
| 212 | void Patch::transform(const Matrix4& matrix) |
| 213 | { |
| 214 | // Cycle through all the patch control vertices and transform the points |
| 215 | for (PatchControlIter i = _ctrlTransformed.begin(); |
| 216 | i != _ctrlTransformed.end(); |
| 217 | ++i) |
| 218 | { |
| 219 | i->vertex = matrix.transformPoint(i->vertex); |
| 220 | } |
| 221 | |
| 222 | // Check the handedness of the matrix and invert it if needed |
| 223 | if(matrix.getHandedness() == Matrix4::LEFTHANDED) |
| 224 | { |
| 225 | PatchControlArray_invert(_ctrlTransformed, _width, _height); |
| 226 | } |
| 227 | |
| 228 | // Mark this patch as changed |
| 229 | transformChanged(); |
| 230 | } |
| 231 | |
| 232 | // Called if the patch has changed, so that the dirty flags are set |
| 233 | void Patch::transformChanged() |
no test coverage detected