| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 TransformationMatrix& skewY(double angle) { return skew(0, angle); } | 330 TransformationMatrix& skewY(double angle) { return skew(0, angle); } |
| 331 | 331 |
| 332 TransformationMatrix& applyPerspective(double p); | 332 TransformationMatrix& applyPerspective(double p); |
| 333 | 333 |
| 334 // Changes the transform to apply as if the origin were at (x, y, z). | 334 // Changes the transform to apply as if the origin were at (x, y, z). |
| 335 TransformationMatrix& applyTransformOrigin(double x, double y, double z); | 335 TransformationMatrix& applyTransformOrigin(double x, double y, double z); |
| 336 TransformationMatrix& applyTransformOrigin(const FloatPoint3D& origin) { | 336 TransformationMatrix& applyTransformOrigin(const FloatPoint3D& origin) { |
| 337 return applyTransformOrigin(origin.x(), origin.y(), origin.z()); | 337 return applyTransformOrigin(origin.x(), origin.y(), origin.z()); |
| 338 } | 338 } |
| 339 | 339 |
| 340 TransformationMatrix& zoom(double zoomFactor); |
| 341 |
| 340 bool isInvertible() const; | 342 bool isInvertible() const; |
| 341 | 343 |
| 342 // This method returns the identity matrix if it is not invertible. | 344 // This method returns the identity matrix if it is not invertible. |
| 343 // Use isInvertible() before calling this if you need to know. | 345 // Use isInvertible() before calling this if you need to know. |
| 344 TransformationMatrix inverse() const; | 346 TransformationMatrix inverse() const; |
| 345 | 347 |
| 346 // decompose the matrix into its component parts | 348 // decompose the matrix into its component parts |
| 347 typedef struct { | 349 typedef struct { |
| 348 double scaleX, scaleY, scaleZ; | 350 double scaleX, scaleY, scaleZ; |
| 349 double skewXY, skewXZ, skewYZ; | 351 double skewXY, skewXZ, skewYZ; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 Matrix4 m_matrix; | 481 Matrix4 m_matrix; |
| 480 }; | 482 }; |
| 481 | 483 |
| 482 // Redeclared here to avoid ODR issues. | 484 // Redeclared here to avoid ODR issues. |
| 483 // See platform/testing/TransformPrinters.h. | 485 // See platform/testing/TransformPrinters.h. |
| 484 void PrintTo(const TransformationMatrix&, std::ostream*); | 486 void PrintTo(const TransformationMatrix&, std::ostream*); |
| 485 | 487 |
| 486 } // namespace blink | 488 } // namespace blink |
| 487 | 489 |
| 488 #endif // TransformationMatrix_h | 490 #endif // TransformationMatrix_h |
| OLD | NEW |