Blender  V2.93
MOD_meshcache_util.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 /* MOD_meshcache_mdd.c */
24 bool MOD_meshcache_read_mdd_index(FILE *fp,
25  float (*vertexCos)[3],
26  const int vertex_tot,
27  const int index,
28  const float factor,
29  const char **err_str);
30 bool MOD_meshcache_read_mdd_frame(FILE *fp,
31  float (*vertexCos)[3],
32  const int verts_tot,
33  const char interp,
34  const float frame,
35  const char **err_str);
36 bool MOD_meshcache_read_mdd_times(const char *filepath,
37  float (*vertexCos)[3],
38  const int verts_tot,
39  const char interp,
40  const float time,
41  const float fps,
42  const char time_mode,
43  const char **err_str);
44 
45 /* MOD_meshcache_pc2.c */
46 bool MOD_meshcache_read_pc2_index(FILE *fp,
47  float (*vertexCos)[3],
48  const int verts_tot,
49  const int index,
50  const float factor,
51  const char **err_str);
52 bool MOD_meshcache_read_pc2_frame(FILE *fp,
53  float (*vertexCos)[3],
54  const int verts_tot,
55  const char interp,
56  const float frame,
57  const char **err_str);
58 bool MOD_meshcache_read_pc2_times(const char *filepath,
59  float (*vertexCos)[3],
60  const int verts_tot,
61  const char interp,
62  const float time,
63  const float fps,
64  const char time_mode,
65  const char **err_str);
66 
67 /* MOD_meshcache_util.c */
68 void MOD_meshcache_calc_range(const float frame,
69  const char interp,
70  const int frame_tot,
71  int r_index_range[2],
72  float *r_factor);
73 
74 #define FRAME_SNAP_EPS 0.0001f
bool MOD_meshcache_read_pc2_times(const char *filepath, float(*vertexCos)[3], const int verts_tot, const char interp, const float time, const float fps, const char time_mode, const char **err_str)
bool MOD_meshcache_read_mdd_times(const char *filepath, float(*vertexCos)[3], const int verts_tot, const char interp, const float time, const float fps, const char time_mode, const char **err_str)
bool MOD_meshcache_read_mdd_frame(FILE *fp, float(*vertexCos)[3], const int verts_tot, const char interp, const float frame, const char **err_str)
void MOD_meshcache_calc_range(const float frame, const char interp, const int frame_tot, int r_index_range[2], float *r_factor)
bool MOD_meshcache_read_pc2_frame(FILE *fp, float(*vertexCos)[3], const int verts_tot, const char interp, const float frame, const char **err_str)
bool MOD_meshcache_read_mdd_index(FILE *fp, float(*vertexCos)[3], const int vertex_tot, const int index, const float factor, const char **err_str)
bool MOD_meshcache_read_pc2_index(FILE *fp, float(*vertexCos)[3], const int verts_tot, const int index, const float factor, const char **err_str)
double time
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)