stackchan-display
Loading...
Searching...
No Matches
PrimaryFacialDrawable.h
1#pragma once
2
3#include "Drawable.h"
4#include <functional>
5#include <memory>
6
7namespace stackchan::display
8{
9 // For shishikawa classc face, the primary facial components include left eye, right eye and mouth.
11 {
12 std::unique_ptr<Drawable> left_eye;
13 std::unique_ptr<Drawable> right_eye;
14 std::unique_ptr<Drawable> mouth;
15
16 // TODO: add eyebrows, speech bubble etc.
17
18 virtual void forEachComponent(const std::function<void(Drawable &component)> &func)
19 {
20 if (left_eye)
21 func(*left_eye);
22 if (right_eye)
23 func(*right_eye);
24 if (mouth)
25 func(*mouth);
26 }
27 };
28
29}
Definition Drawable.h:45
Definition PrimaryFacialDrawable.h:11