OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CCMathUtil_h | 5 #ifndef CCMathUtil_h |
6 #define CCMathUtil_h | 6 #define CCMathUtil_h |
7 | 7 |
8 #include "FloatPoint.h" | 8 #include "FloatPoint.h" |
9 #include "FloatPoint3D.h" | 9 #include "FloatPoint3D.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // NOTE: These functions do not do correct clipping against w = 0 plane, but
they | 87 // NOTE: These functions do not do correct clipping against w = 0 plane, but
they |
88 // correctly detect the clipped condition via the boolean clipped. | 88 // correctly detect the clipped condition via the boolean clipped. |
89 static FloatQuad mapQuad(const WebKit::WebTransformationMatrix&, const Float
Quad&, bool& clipped); | 89 static FloatQuad mapQuad(const WebKit::WebTransformationMatrix&, const Float
Quad&, bool& clipped); |
90 static FloatPoint mapPoint(const WebKit::WebTransformationMatrix&, const Flo
atPoint&, bool& clipped); | 90 static FloatPoint mapPoint(const WebKit::WebTransformationMatrix&, const Flo
atPoint&, bool& clipped); |
91 static FloatPoint3D mapPoint(const WebKit::WebTransformationMatrix&, const F
loatPoint3D&, bool& clipped); | 91 static FloatPoint3D mapPoint(const WebKit::WebTransformationMatrix&, const F
loatPoint3D&, bool& clipped); |
92 static FloatQuad projectQuad(const WebKit::WebTransformationMatrix&, const F
loatQuad&, bool& clipped); | 92 static FloatQuad projectQuad(const WebKit::WebTransformationMatrix&, const F
loatQuad&, bool& clipped); |
93 static FloatPoint projectPoint(const WebKit::WebTransformationMatrix&, const
FloatPoint&, bool& clipped); | 93 static FloatPoint projectPoint(const WebKit::WebTransformationMatrix&, const
FloatPoint&, bool& clipped); |
94 | 94 |
95 static void flattenTransformTo2d(WebKit::WebTransformationMatrix&); | 95 static void flattenTransformTo2d(WebKit::WebTransformationMatrix&); |
96 | 96 |
| 97 static FloatPoint computeTransform2dScaleComponents(const WebKit::WebTransfo
rmationMatrix&); |
| 98 |
97 // Returns the smallest angle between the given two vectors in degrees. Neit
her vector is | 99 // Returns the smallest angle between the given two vectors in degrees. Neit
her vector is |
98 // assumed to be normalized. | 100 // assumed to be normalized. |
99 static float smallestAngleBetweenVectors(const FloatSize&, const FloatSize&)
; | 101 static float smallestAngleBetweenVectors(const FloatSize&, const FloatSize&)
; |
100 | 102 |
101 // Projects the |source| vector onto |destination|. Neither vector is assume
d to be normalized. | 103 // Projects the |source| vector onto |destination|. Neither vector is assume
d to be normalized. |
102 static FloatSize projectVector(const FloatSize& source, const FloatSize& des
tination); | 104 static FloatSize projectVector(const FloatSize& source, const FloatSize& des
tination); |
103 }; | 105 }; |
104 | 106 |
105 } // namespace cc | 107 } // namespace cc |
106 | 108 |
107 #endif // #define CCMathUtil_h | 109 #endif // #define CCMathUtil_h |
OLD | NEW |