Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
10namespace impeller {
11
12struct 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_
bool operator==(const Shear &o) const
Definition shear.h:26
double yz
Definition shear.h:17
double xy
Definition shear.h:15
bool operator!=(const Shear &o) const
Definition shear.h:30
double xz
Definition shear.h:16
Shear(double xy, double xz, double yz)
Definition shear.h:24
double e[3]
Definition shear.h:19