OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 5 |
6 #ifndef WebFloatPoint3D_h | 6 #ifndef WebFloatPoint3D_h |
7 #define WebFloatPoint3D_h | 7 #define WebFloatPoint3D_h |
8 | 8 |
9 #include "WebCommon.h" | 9 #include "WebCommon.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 WebFloatPoint3D(float x, float y, float z) | 31 WebFloatPoint3D(float x, float y, float z) |
32 : x(x) | 32 : x(x) |
33 , y(y) | 33 , y(y) |
34 , z(z) | 34 , z(z) |
35 { | 35 { |
36 } | 36 } |
37 | 37 |
38 #if INSIDE_BLINK | 38 #if INSIDE_BLINK |
39 WebFloatPoint3D(const WebCore::FloatPoint3D& p) | 39 WebFloatPoint3D(const blink::FloatPoint3D& p) |
40 : x(p.x()) | 40 : x(p.x()) |
41 , y(p.y()) | 41 , y(p.y()) |
42 , z(p.z()) | 42 , z(p.z()) |
43 { | 43 { |
44 } | 44 } |
45 | 45 |
46 WebFloatPoint3D& operator=(const WebCore::FloatPoint3D& p) | 46 WebFloatPoint3D& operator=(const blink::FloatPoint3D& p) |
47 { | 47 { |
48 x = p.x(); | 48 x = p.x(); |
49 y = p.y(); | 49 y = p.y(); |
50 z = p.z(); | 50 z = p.z(); |
51 return *this; | 51 return *this; |
52 } | 52 } |
53 | 53 |
54 operator WebCore::FloatPoint3D() const | 54 operator blink::FloatPoint3D() const |
55 { | 55 { |
56 return WebCore::FloatPoint3D(x, y, z); | 56 return blink::FloatPoint3D(x, y, z); |
57 } | 57 } |
58 #else | 58 #else |
59 WebFloatPoint3D(const gfx::Point3F& p) | 59 WebFloatPoint3D(const gfx::Point3F& p) |
60 : x(p.x()) | 60 : x(p.x()) |
61 , y(p.y()) | 61 , y(p.y()) |
62 , z(p.z()) | 62 , z(p.z()) |
63 { | 63 { |
64 } | 64 } |
65 | 65 |
66 WebFloatPoint3D& operator=(const gfx::Point3F& p) | 66 WebFloatPoint3D& operator=(const gfx::Point3F& p) |
(...skipping 17 matching lines...) Expand all Loading... |
84 } | 84 } |
85 | 85 |
86 inline bool operator!=(const WebFloatPoint3D& a, const WebFloatPoint3D& b) | 86 inline bool operator!=(const WebFloatPoint3D& a, const WebFloatPoint3D& b) |
87 { | 87 { |
88 return !(a == b); | 88 return !(a == b); |
89 } | 89 } |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
92 | 92 |
93 #endif | 93 #endif |
OLD | NEW |