| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2015 Google Inc. | 2  * Copyright 2015 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #ifndef SkPoint3_DEFINED | 8 #ifndef SkPoint3_DEFINED | 
| 9 #define SkPoint3_DEFINED | 9 #define SkPoint3_DEFINED | 
| 10 | 10 | 
| 11 #include "SkScalar.h" | 11 #include "SkScalar.h" | 
| 12 | 12 | 
| 13 struct SK_API SkPoint3 { | 13 struct SK_API SkPoint3 { | 
| 14     SkScalar fX, fY, fZ; | 14     SkScalar fX, fY, fZ; | 
| 15 | 15 | 
| 16 #ifdef SK_LEGACY_SKPOINT3_CTORS |  | 
| 17     // TODO: remove these - they are needed for Chromium staging |  | 
| 18     SkPoint3() {} |  | 
| 19     SkPoint3(SkScalar x, SkScalar y, SkScalar z) : fX(x), fY(y), fZ(z) {} |  | 
| 20 #endif |  | 
| 21 |  | 
| 22     static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z) { | 16     static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z) { | 
| 23         SkPoint3 pt; | 17         SkPoint3 pt; | 
| 24         pt.set(x, y, z); | 18         pt.set(x, y, z); | 
| 25         return pt; | 19         return pt; | 
| 26     } | 20     } | 
| 27 | 21 | 
| 28     SkScalar x() const { return fX; } | 22     SkScalar x() const { return fX; } | 
| 29     SkScalar y() const { return fY; } | 23     SkScalar y() const { return fY; } | 
| 30     SkScalar z() const { return fZ; } | 24     SkScalar z() const { return fZ; } | 
| 31 | 25 | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 105 | 99 | 
| 106     SkScalar dot(const SkPoint3& vec) const { | 100     SkScalar dot(const SkPoint3& vec) const { | 
| 107         return DotProduct(*this, vec); | 101         return DotProduct(*this, vec); | 
| 108     } | 102     } | 
| 109 }; | 103 }; | 
| 110 | 104 | 
| 111 typedef SkPoint3 SkVector3; | 105 typedef SkPoint3 SkVector3; | 
| 112 typedef SkPoint3 SkColor3f; | 106 typedef SkPoint3 SkColor3f; | 
| 113 | 107 | 
| 114 #endif | 108 #endif | 
| OLD | NEW | 
|---|