| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 // Inspired by Rob Johnson's most excellent QuickDraw GX sample code | 8 // Inspired by Rob Johnson's most excellent QuickDraw GX sample code |
| 9 | 9 |
| 10 #ifndef SkCamera_DEFINED | 10 #ifndef SkCamera_DEFINED |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void reset(); | 77 void reset(); |
| 78 void transform(const SkMatrix3D&, SkPatch3D* dst = NULL) const; | 78 void transform(const SkMatrix3D&, SkPatch3D* dst = NULL) const; |
| 79 | 79 |
| 80 // dot a unit vector with the patch's normal | 80 // dot a unit vector with the patch's normal |
| 81 SkScalar dotWith(SkScalar dx, SkScalar dy, SkScalar dz) const; | 81 SkScalar dotWith(SkScalar dx, SkScalar dy, SkScalar dz) const; |
| 82 SkScalar dotWith(const SkVector3D& v) const { | 82 SkScalar dotWith(const SkVector3D& v) const { |
| 83 return this->dotWith(v.fX, v.fY, v.fZ); | 83 return this->dotWith(v.fX, v.fY, v.fZ); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // deprecated, but still here for animator (for now) | 86 // deprecated, but still here for animator (for now) |
| 87 void rotate(SkScalar x, SkScalar y, SkScalar z) {} | 87 void rotate(SkScalar /*x*/, SkScalar /*y*/, SkScalar /*z*/) {} |
| 88 void rotateDegrees(SkScalar x, SkScalar y, SkScalar z) {} | 88 void rotateDegrees(SkScalar /*x*/, SkScalar /*y*/, SkScalar /*z*/) {} |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 public: // make public for SkDraw3D for now | 91 public: // make public for SkDraw3D for now |
| 92 SkVector3D fU, fV; | 92 SkVector3D fU, fV; |
| 93 SkPoint3D fOrigin; | 93 SkPoint3D fOrigin; |
| 94 | 94 |
| 95 friend class SkCamera3D; | 95 friend class SkCamera3D; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 class SkCamera3D { | 98 class SkCamera3D { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 struct Rec { | 144 struct Rec { |
| 145 Rec* fNext; | 145 Rec* fNext; |
| 146 SkMatrix3D fMatrix; | 146 SkMatrix3D fMatrix; |
| 147 }; | 147 }; |
| 148 Rec* fRec; | 148 Rec* fRec; |
| 149 Rec fInitialRec; | 149 Rec fInitialRec; |
| 150 SkCamera3D fCamera; | 150 SkCamera3D fCamera; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 #endif | 153 #endif |
| OLD | NEW |