4 * Copyright (C) 2017 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #include "loadbalance.h"
30 #include "pluginvclient.h"
40 class Fuse360Slider : public BC_FSlider
43 Fuse360Slider(Fuse360Main *client,
59 class Fuse360Text : public BC_TextBox
62 Fuse360Text(Fuse360Main *client,
64 Fuse360Slider *slider,
72 Fuse360Slider *slider;
77 class Fuse360Toggle : public BC_CheckBox
80 Fuse360Toggle(Fuse360Main *client,
92 class Fuse360Mode : public BC_PopupMenu
95 Fuse360Mode(Fuse360Main *plugin,
100 void create_objects();
101 static int calculate_w(Fuse360GUI *gui);
102 static int from_text(char *text);
103 static const char* to_text(int mode);
104 void update(int mode);
110 class Fuse360GUI : public PluginClientWindow
113 Fuse360GUI(Fuse360Main *client);
116 void create_objects();
119 // Fuse360Slider *fov_slider;
120 // Fuse360Text *fov_text;
121 Fuse360Slider *radiusx_slider;
122 Fuse360Text *radiusx_text;
123 Fuse360Slider *radiusy_slider;
124 Fuse360Text *radiusy_text;
125 // Fuse360Slider *centerx_slider;
126 // Fuse360Text *centerx_text;
127 // Fuse360Slider *centery_slider;
128 // Fuse360Text *centery_text;
129 Fuse360Slider *distancex_slider;
130 Fuse360Text *distancex_text;
131 Fuse360Slider *distancey_slider;
132 Fuse360Text *distancey_text;
133 Fuse360Slider *translatex_slider;
134 Fuse360Text *translatex_text;
135 Fuse360Slider *feather_slider;
136 Fuse360Text *feather_text;
137 Fuse360Slider *rotation_slider;
138 Fuse360Text *rotation_text;
141 Fuse360Toggle *draw_guides;
148 int equivalent(Fuse360Config &that);
149 void copy_from(Fuse360Config &that);
150 void interpolate(Fuse360Config &prev,
154 int64_t current_frame);
160 // radius of each eye
163 // amount to feather eye edges
168 // X distance between 2 eyes
170 // Y offset between 2 eyes
172 // translate output position
183 // the standard blend
185 // don't stretch eyes
194 class Fuse360Package : public LoadPackage
202 class Fuse360Unit : public LoadClient
205 Fuse360Unit(Fuse360Engine *engine, Fuse360Main *plugin);
209 void process_package(LoadPackage *package);
210 void process_stretch(Fuse360Package *pkg);
211 void process_blend(Fuse360Package *pkg);
212 void process_standard(Fuse360Package *pkg);
213 double calculate_max_z(double a, double r);
216 Fuse360Engine *engine;
220 class Fuse360Engine : public LoadServer
223 Fuse360Engine(Fuse360Main *plugin);
226 void init_packages();
227 LoadClient* new_client();
228 LoadPackage* new_package();
233 class Fuse360Main : public PluginVClient
236 Fuse360Main(PluginServer *server);
239 PLUGIN_CLASS_MEMBERS2(Fuse360Config)
240 int process_buffer(VFrame *frame,
241 int64_t start_position,
245 void save_data(KeyFrame *keyframe);
246 void read_data(KeyFrame *keyframe);
247 void calculate_extents();
248 double calculate_max_z(double a, int r);
266 Fuse360Engine *engine;
267 AffineEngine *affine;