49 {
51 SkScalar radius = viewportWidth / 2.f;
52
53 SkM44 proj{1.f, 0.f, 0.f, 0.f,
54 0.f, 1.f, 0.f, 0.f,
55 0.f, 0.f, 1.f, 0.f,
56 0.f, 0.f, -1.f / radius, 1.f};
60
61
62 SkV4 axisAngles[6] = {
63 {0.f, 1.f, 0.f, -90.f},
64 {1.f, 0.f, 0.f, 0.f},
65 {0.f, 1.f, 0.f, 90.f},
66 {0.f, 1.f, 0.f, 180.f},
67 {1.f, 0.f, 0.f, -90.f},
68 {1.f, 0.f, 0.f, 90.f},
69 };
77 };
78
79 for (
int i = 0;
i < 6; ++
i) {
83 zoom * rotateHorizontal * model * postZoom *
85
88
92
93
95
96
102
104 }
105 }
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorGREEN
#define SkDegreesToRadians(degrees)
#define SkScalarMod(x, y)
void drawRect(const SkRect &rect, const SkPaint &paint)
@ kFast_SrcRectConstraint
sample outside bounds; faster
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void concat(const SkMatrix &matrix)
static SkM44 Rotate(SkV3 axis, SkScalar radians)
static SkM44 Translate(SkScalar x, SkScalar y, SkScalar z=0)
void setColor(SkColor color)
void setAntiAlias(bool aa)
static constexpr SkRect MakeWH(float w, float h)