| Flutter Impeller |

shear.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_GEOMETRY_SHEAR_H_
6 #define FLUTTER_IMPELLER_GEOMETRY_SHEAR_H_
7
8 #include <string>
9
10 namespace impeller {
11
12 struct Shear {
13 union {
14 struct {
15 double xy = 0.0;
16 double xz = 0.0;
17 double yz = 0.0;
18 };
19 double e[3];
20 };
21
22 Shear() {}
23
24 Shear(double xy, double xz, double yz) : xy(xy), xz(xz), yz(yz) {}
25
26 bool operator==(const Shear& o) const {
27 return xy == o.xy && xz == o.xz && yz == o.yz;
28 }
29
30 bool operator!=(const Shear& o) const { return !(*this == o); }
31 };
32
33 } // namespace impeller
34
35 #endif // FLUTTER_IMPELLER_GEOMETRY_SHEAR_H_
impeller::Shear::Shear
Shear(double xy, double xz, double yz)
Definition: shear.h:24
impeller::Shear::yz
double yz
Definition: shear.h:17
impeller::Shear::Shear
Shear()
Definition: shear.h:22
impeller::Shear::e
double e[3]
Definition: shear.h:19
impeller::Shear::xz
double xz
Definition: shear.h:16
impeller::Shear::xy
double xy
Definition: shear.h:15
impeller::Shear::operator!=
bool operator!=(const Shear &o) const
Definition: shear.h:30
impeller::Shear
Definition: shear.h:12
impeller
Definition: allocation.cc:12
impeller::Shear::operator==
bool operator==(const Shear &o) const
Definition: shear.h:26