m5stack-avatar
Loading...
Searching...
No Matches
FaceTemplates.hpp
1#ifndef M5AVATAR_FACES_HPP_
2#define M5AVATAR_FACES_HPP_
3
4#include "Eyebrows.hpp"
5#include "Eyes.hpp"
6#include "Face.h"
7#include "Mouths.hpp"
8
9namespace m5avatar {
14class SimpleFace : public Face {
15 public:
17 : Face(new RectMouth(50, 90, 4, 60), new BoundingRect(148, 163),
18 // right eye, second eye arg is center position of eye in (y,x)
19 new EllipseEye(16, 16, false), new BoundingRect(93, 90),
20 // left eye
21 new EllipseEye(16, 16, true), new BoundingRect(96, 230),
22 // hide eye brows with setting these height zero
23 new EllipseEyebrow(0, 0, false), new BoundingRect(67, 96),
24 new EllipseEyebrow(0, 0, true), new BoundingRect(72, 230)) {}
25};
30class OmegaFace : public Face {
31 public:
32 OmegaFace()
33 : Face(new OmegaMouth(), new BoundingRect(225, 160),
34 // right eye, second eye arg is center position of eye in (y,x)
35 new EllipseEye(false), new BoundingRect(165, 84),
36 // left eye
37 new EllipseEye(true), new BoundingRect(165, 84 + 154),
38 // hide eye brows with setting these height zero
39 new EllipseEyebrow(0, 0, false), new BoundingRect(67, 96),
40 new EllipseEyebrow(0, 0, true), new BoundingRect(72, 230)) {}
41};
42
43class GirlyFace : public Face {
44 public:
45 GirlyFace()
46 : Face(new ToonMouth1(24, 44, 8, 16), new BoundingRect(222, 160),
47 // right eye, second eye arg is center position of eye
48 new ToonEye1(60, 84, false), new BoundingRect(163, 64),
49 // left eye
50 new ToonEye1(60, 84, true), new BoundingRect(163, 256),
51
52 // right eyebrow
53 new EllipseEyebrow(36, 20, false),
54 new BoundingRect(97 + 10, 84 + 18), // (y,x)
55 // left eyebrow
56 new EllipseEyebrow(36, 20, true),
57 new BoundingRect(107, 200 + 18)) {}
58};
59
60class GirlyFace2 : public Face {
61 public:
63 : Face(new ToonMouth1(44, 44, 0, 16), new BoundingRect(222, 160),
64 // right eye, second eye arg is center position of eye
65 new ToonEye1(84, 84, false), new BoundingRect(163, 64),
66 // left eye
67 new ToonEye1(84, 84, true), new BoundingRect(163, 256),
68
69 // right eyebrow
70 new BowEyebrow(160, 160, false),
71 new BoundingRect(163, 64), // (y,x)
72 // left eyebrow
73 new BowEyebrow(160, 160, true), new BoundingRect(163, 256)) {}
74};
75
76// Face like sigure-nui
77class ToonFace1 : public Face {
78 public:
79 ToonFace1()
80 : Face(new ToonMouth1(24, 44, 8, 16), new BoundingRect(222, 160),
81 // right eye, second eye arg is center position of eye
82 new ToonEye2(60, 84, false), new BoundingRect(163, 64),
83 // left eye
84 new ToonEye2(60, 84, true), new BoundingRect(163, 256),
85 // right eyebrow
86 new BowEyebrow(64, 10, false),
87 new BoundingRect(50, 64), // (y,x)
88 // left eyebrow
89 new BowEyebrow(64, 10, true), new BoundingRect(50, 256)) {}
90};
91
92class PinkDemonFace : public Face {
93 public:
95 : Face(new ToonMouth1(64, 64, 4, 16), new BoundingRect(214, 160),
96 // right eye, second eye arg is center position of eye
97 new PinkDemonEye(52, 134, false), new BoundingRect(134, 106),
98 // left eye
99 new PinkDemonEye(52, 134, true), new BoundingRect(134, 218),
100
101 // hide eye brows with setting these height zero
102 new EllipseEyebrow(15, 0, false), new BoundingRect(67, 96),
103 new EllipseEyebrow(15, 0, true), new BoundingRect(72, 230)) {}
104};
105
106class DoggyFace : public Face {
107 public:
108 DoggyFace()
109 : Face(new DoggyMouth(50, 90, 4, 60), new BoundingRect(168, 163),
110 // right eye, second eye arg is center position of eye
111 new DoggyEye(false), new BoundingRect(103, 80),
112 // left eye
113 new DoggyEye(true), new BoundingRect(106, 240),
114 // hide eye brows with setting these height zero
115 new RectEyebrow(15, 2, false), new BoundingRect(67, 96),
116 new RectEyebrow(15, 2, true), new BoundingRect(72, 230)) {}
117};
118
119} // namespace m5avatar
120
121#endif // M5AVATAR_FACES_HPP_
Eyebrow components.
Eye components.
Mouth components.
Definition: BoundingRect.h:10
Definition: Eyebrows.hpp:49
Definition: Eyes.hpp:112
Definition: FaceTemplates.hpp:106
Definition: Mouths.hpp:66
Definition: Eyes.hpp:50
Definition: Eyebrows.hpp:43
Definition: Face.h:18
Definition: FaceTemplates.hpp:60
Definition: FaceTemplates.hpp:43
face template for "OωO" face
Definition: FaceTemplates.hpp:30
Definition: Mouths.hpp:54
Definition: Eyes.hpp:104
Definition: FaceTemplates.hpp:92
Definition: Eyebrows.hpp:55
Definition: Mouths.hpp:48
face template for "o_o"
Definition: FaceTemplates.hpp:14
Definition: Eyes.hpp:56
Definition: Eyes.hpp:80
Definition: FaceTemplates.hpp:77
Definition: Mouths.hpp:60