/[Sims3RigEditor]/trunk/granny_sdk/include/granny.h
ViewVC logotype

Contents of /trunk/granny_sdk/include/granny.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations) (download)
Thu Aug 12 08:37:47 2010 UTC (9 years, 6 months ago) by william
File MIME type: text/plain
File size: 323662 byte(s)
Fix all, current, c++ compiler warnings and linker errors

1 #if !defined(GRANNY_H)
2 /* ========================================================================
3 (C) Copyright 1999-2007 by RAD Game Tools, All Rights Reserved.
4 ======================================================================== */
5 #define GRANNY_32BIT_PTR 0
6 #define GRANNY_64BIT_PTR 0
7
8 #if _XENON
9 // Note - the order of these if/elifs is important, since Xenon ALSO defines _XBOX
10 #define GRANNY_DYNIMP(ret) ret __stdcall
11 #define GRANNY_DYNEXP(ret) ret __stdcall
12 #define GRANNY_CALLBACK(ret) ret __cdecl
13 #define GRANNY_DYNIMPDATA(type) type
14 #define GRANNY_DYNEXPDATA(type) type
15
16 #undef GRANNY_32BIT_PTR
17 #define GRANNY_32BIT_PTR 1
18 #define GRANNY_64BIT_TYPE __int64
19 #elif _XBOX
20 #if _XENON
21 #error Should never have got here (dll_header.h)
22 #endif
23 #define GRANNY_DYNIMP(ret) ret __stdcall
24 #define GRANNY_DYNEXP(ret) ret __stdcall
25 #define GRANNY_CALLBACK(ret) ret __cdecl
26 #define GRANNY_DYNIMPDATA(type) type
27 #define GRANNY_DYNEXPDATA(type) type
28 #undef GRANNY_32BIT_PTR
29 #define GRANNY_32BIT_PTR 1
30 #define GRANNY_64BIT_TYPE __int64
31 #elif _GAMECUBE
32 #define GRANNY_DYNIMP(ret) ret
33 #define GRANNY_DYNEXP(ret) ret
34 #define GRANNY_CALLBACK(ret) ret
35 #define GRANNY_DYNIMPDATA(type) type
36 #define GRANNY_DYNEXPDATA(type) type
37 #undef GRANNY_32BIT_PTR
38 #define GRANNY_32BIT_PTR 1
39 #define GRANNY_64BIT_TYPE long long
40 #elif __CELLOS_LV2__
41 // PS3 target (CellOs, not more than one Cello...)
42 #define GRANNY_DYNIMP(ret) ret
43 #define GRANNY_DYNEXP(ret) ret
44 #define GRANNY_CALLBACK(ret) ret
45 #define GRANNY_DYNIMPDATA(type) type
46 #define GRANNY_DYNEXPDATA(type) type
47 #undef GRANNY_32BIT_PTR
48 #define GRANNY_32BIT_PTR 1
49 #define GRANNY_64BIT_TYPE long long
50 #elif _PSX2 || __psp__
51 #define GRANNY_DYNIMP(ret) ret
52 #define GRANNY_DYNEXP(ret) ret
53 #define GRANNY_CALLBACK(ret) ret
54 #define GRANNY_DYNIMPDATA(type) type
55 #define GRANNY_DYNEXPDATA(type) type
56 #undef GRANNY_32BIT_PTR
57 #define GRANNY_32BIT_PTR 1
58 #define GRANNY_64BIT_TYPE long
59 #elif _WIN32
60 #if _WIN64
61 // Yes, X64 defines both _WIN#2 and _WIN64
62 #define GRANNY_DYNIMP(ret) __declspec(dllimport) ret __stdcall
63 #define GRANNY_DYNEXP(ret) __declspec(dllexport) ret __stdcall
64 #define GRANNY_CALLBACK(ret) ret __cdecl
65 #define GRANNY_DYNIMPDATA(type) __declspec(dllimport) type
66 #define GRANNY_DYNEXPDATA(type) __declspec(dllexport) type
67 #undef GRANNY_64BIT_PTR
68 #define GRANNY_64BIT_PTR 1
69 #else
70 #define GRANNY_DYNIMP(ret) __declspec(dllimport) ret __stdcall
71 #define GRANNY_DYNEXP(ret) __declspec(dllexport) ret __stdcall
72 #define GRANNY_CALLBACK(ret) ret __cdecl
73 #define GRANNY_DYNIMPDATA(type) __declspec(dllimport) type
74 #define GRANNY_DYNEXPDATA(type) __declspec(dllexport) type
75 #undef GRANNY_32BIT_PTR
76 #define GRANNY_32BIT_PTR 1
77 #endif
78 #define GRANNY_64BIT_TYPE __int64
79 #elif _MACOSX || defined(__MWERKS__)
80 #define GRANNY_DYNIMP(ret) ret
81 #define GRANNY_DYNEXP(ret) ret
82 #define GRANNY_CALLBACK(ret) ret
83 #define GRANNY_DYNIMPDATA(type) type
84 #define GRANNY_DYNEXPDATA(type) type
85 #undef GRANNY_32BIT_PTR
86 #define GRANNY_32BIT_PTR 1
87 #define GRANNY_64BIT_TYPE long long
88
89 #if defined(__MWERKS__)
90 #pragma export on
91 #endif
92 #elif defined(linux) || defined(__linux__)
93 #define GRANNY_DYNIMP(ret) ret
94 #define GRANNY_DYNEXP(ret) ret
95 #define GRANNY_CALLBACK(ret) ret
96 #define GRANNY_DYNIMPDATA(type) type
97 #define GRANNY_DYNEXPDATA(type) type
98 #undef GRANNY_32BIT_PTR
99 #define GRANNY_32BIT_PTR 1
100 #define GRANNY_64BIT_TYPE long long
101 #endif
102
103 /* Switch the import/export state of the functions depending on who's
104 compiling, and what compiler we're using */
105 #if (BUILDING_GRANNY || BUILDING_GRANNY_STATIC)
106 #if BUILDING_GRANNY_STATIC
107 #define GRANNY_DYNLINK(ret) ret
108 #define GRANNY_DYNLINKDATA(type) type
109 #else
110 #define GRANNY_DYNLINK(ret) GRANNY_DYNEXP(ret)
111 #define GRANNY_DYNLINKDATA(type) GRANNY_DYNEXPDATA(type)
112 #endif
113 #else
114 #define GRANNY_DYNLINK(ret) GRANNY_DYNIMP(ret)
115 #define GRANNY_DYNLINKDATA(type) GRANNY_DYNIMPDATA(type)
116 #endif
117
118 /* Setup our packing directives. Note that Granny assumes packing of
119 its structures. We ensure that we don't have any alignment less
120 than 4-bytes in general */
121 #ifdef _MSC_VER
122
123 // Byte pack, and disable the warning...
124 #pragma pack(push)
125 #pragma pack(4)
126
127 #pragma warning(push)
128 #pragma warning(disable : 4121) // alignment of a member was sensitive to packing
129 #pragma warning(disable : 4103) // used #pragma pack to change alignment
130 #define GrannyAlignAttribute
131
132 #else
133
134 // Assume gcc style __attribute__ packing directives
135 #define GrannyAlignAttribute __attribute__ ((__packed__))
136
137 #endif
138
139 /* Get the 64 bit types out of the way, and clear our platform macro,
140 Note that we have to treat the psp differently, without the DI
141 attribute, long is a 32-bit type. */
142 #if !__psp__
143 typedef unsigned GRANNY_64BIT_TYPE granny_uint64x;
144 typedef GRANNY_64BIT_TYPE granny_int64x;
145 #else
146 typedef unsigned long granny_uint64x __attribute__((mode(DI)));
147 typedef long granny_int64x __attribute__((mode(DI)));
148 #endif
149
150 #undef GRANNY_64BIT_TYPE // done with this macro
151
152
153 typedef unsigned int granny_uint32;
154 typedef unsigned short granny_uint16;
155 typedef unsigned char granny_uint8;
156
157 typedef int granny_int32;
158 typedef short granny_int16;
159 typedef char granny_int8;
160 typedef int granny_bool32;
161
162 typedef float granny_real32;
163 typedef granny_uint16 granny_real16;
164 // no persistable 64-bit float
165
166 typedef granny_uint32 granny_uint32x;
167 typedef granny_uint32 granny_uint16x;
168 typedef granny_uint32 granny_uint8x;
169
170 typedef granny_int32 granny_int32x;
171 typedef granny_int32 granny_int16x;
172 typedef granny_int32 granny_int8x;
173 typedef granny_int32x granny_bool32x;
174
175 typedef double granny_real64x;
176 typedef granny_real32 granny_real32x;
177
178 typedef granny_real32 granny_triple[3];
179 typedef granny_real32 granny_quad[4];
180 typedef granny_real32 granny_matrix_3x3[3][3];
181 typedef granny_real32 granny_matrix_4x4[4][4];
182 typedef granny_real32 granny_matrix_3x4[3][4];
183
184
185 // An integer big enough to store a pointer or a memory offset You
186 // can't store these in files either, hence the "x" on the end. Note
187 // that we do a dance here to get the maximum warning level in VC.NET.
188 // __w64 will spew tons of useful warnings when /Wp64 is turned on.
189 #if (_MSC_VER >= 1300 && _Wp64)
190
191 // Compiles to the correct size on both platforms
192 #if GRANNY_32BIT_PTR
193 typedef __w64 long granny_intaddrx;
194 typedef __w64 unsigned long granny_uintaddrx;
195 #elif GRANNY_64BIT_PTR
196 typedef __w64 __int64 granny_intaddrx;
197 typedef __w64 unsigned __int64 granny_uintaddrx;
198 #endif
199
200 #else // non-vc.net compiler or /Wp64 turned off
201
202 #if GRANNY_32BIT_PTR
203 typedef granny_int32 granny_intaddrx;
204 typedef granny_uint32 granny_uintaddrx;
205 #elif GRANNY_64BIT_PTR
206 typedef granny_int64x granny_intaddrx;
207 typedef granny_uint64x granny_uintaddrx;
208 #endif
209
210 #endif // compiler
211
212
213 // This will fire with a negative subscript error if the type sizes
214 // are set incorrectly by the compiler, and compile out if not.
215 #define GrannyTypeSizeCheck(expr) \
216 typedef int GrannyTypeSizeCheck__[(expr) ? 1 : -1]
217
218 // Exactly sized types
219 GrannyTypeSizeCheck(sizeof(granny_uint32) == 4);
220 GrannyTypeSizeCheck(sizeof(granny_uint16) == 2);
221 GrannyTypeSizeCheck(sizeof(granny_uint8) == 1);
222 GrannyTypeSizeCheck(sizeof(granny_int32) == 4);
223 GrannyTypeSizeCheck(sizeof(granny_int16) == 2);
224 GrannyTypeSizeCheck(sizeof(granny_int8) == 1);
225 GrannyTypeSizeCheck(sizeof(granny_real32) == 4);
226 GrannyTypeSizeCheck(sizeof(granny_bool32) == 4);
227
228 // "At least" types
229 GrannyTypeSizeCheck(sizeof(granny_uint64x) >= 8);
230 GrannyTypeSizeCheck(sizeof(granny_uint32x) >= 4);
231 GrannyTypeSizeCheck(sizeof(granny_uint16x) >= 2);
232 GrannyTypeSizeCheck(sizeof(granny_uint8x) >= 1);
233 GrannyTypeSizeCheck(sizeof(granny_int64x) >= 8);
234 GrannyTypeSizeCheck(sizeof(granny_int32x) >= 4);
235 GrannyTypeSizeCheck(sizeof(granny_int16x) >= 2);
236 GrannyTypeSizeCheck(sizeof(granny_int8x) >= 1);
237 GrannyTypeSizeCheck(sizeof(granny_real32x) >= 4);
238 GrannyTypeSizeCheck(sizeof(granny_real64x) >= 8);
239 GrannyTypeSizeCheck(sizeof(granny_bool32x) >= 4);
240
241 // Can hold a pointer
242 GrannyTypeSizeCheck(sizeof(granny_intaddrx) == sizeof(void*));
243 GrannyTypeSizeCheck(sizeof(granny_uintaddrx) == sizeof(void*));
244
245 #if !GRANNY_32BIT_PTR && !GRANNY_64BIT_PTR
246 #error "Must indicate pointer size"
247 #endif
248
249 #if (GRANNY_32BIT_PTR + GRANNY_64BIT_PTR) > 1
250 #error "Multiple pointer sizes declared"
251 #endif
252
253 #ifdef __cplusplus
254
255 // Check that the size of the bool type is what we expected when we
256 // compiled the library. If these become decoupled, problems can
257 // result when the generated code looks at either too much or too
258 // little for return values. (Not to mention potential errors in
259 // array offsets, etc.) If you're compiling the library yourself on
260 // an untested compiler, this compile assert may fire. You simply
261 // need to ensure that this check matches the one in
262 // granny_test_types.cpp.
263 #if (defined(_GAMECUBE) || defined(_PSX2) || (defined(_MACOSX) && defined(__ppc__)))
264 GrannyTypeSizeCheck(sizeof(bool) == 4);
265 #else
266 GrannyTypeSizeCheck(sizeof(bool) == 1);
267 #endif
268
269 extern "C" {
270 #else
271 // For C compatibility, we need to define the bool type. When
272 // compiled on non-SN compilers, we expect the type to be 1 byte.
273 // For some SN compilers, it's fixed at 4 bytes. See the note
274 // above about compiling the libraries yourself if this causes
275 // unexpected problems. This is tied to the compile-time assert
276 // in granny_test_types.cpp if you're compiling the code yourself,
277 // and making alterations.
278 #if (defined(_GAMECUBE) || defined(_PSX2) || (defined(_MACOSX) && defined(__ppc__)))
279 typedef int bool;
280 #else
281 typedef unsigned char bool;
282 #endif
283 #endif
284 typedef enum granny_transform_flags
285 {
286 GrannyHasPosition = 0x1,
287 GrannyHasOrientation = 0x2,
288 GrannyHasScaleShear = 0x4
289 } granny_transform_flags;
290
291 typedef struct granny_transform granny_transform;
292
293 typedef struct granny_model_mesh_binding granny_model_mesh_binding;
294
295 typedef struct granny_model granny_model;
296
297 typedef struct granny_model_control_binding granny_model_control_binding;
298
299 typedef struct granny_controlled_animation granny_controlled_animation;
300
301 typedef struct granny_controlled_pose granny_controlled_pose;
302
303 typedef struct granny_model_instance granny_model_instance;
304 typedef enum granny_marshalling_type
305 {
306 GrannyAnyMarshalling = 0x0,
307 GrannyInt8Marshalling = 0x1,
308 GrannyInt16Marshalling = 0x2,
309 GrannyInt32Marshalling = 0x4,
310 GrannyMarshallingMask = 0x7
311 } granny_marshalling_type;
312 typedef enum granny_member_type
313 {
314 GrannyEndMember,
315 GrannyInlineMember,
316 GrannyReferenceMember,
317 GrannyReferenceToArrayMember,
318 GrannyArrayOfReferencesMember,
319 GrannyVariantReferenceMember,
320 GrannyUnsupportedMemberType_Remove,
321 GrannyReferenceToVariantArrayMember,
322 GrannyStringMember,
323 GrannyTransformMember,
324 GrannyReal32Member,
325 GrannyInt8Member,
326 GrannyUInt8Member,
327 GrannyBinormalInt8Member,
328 GrannyNormalUInt8Member,
329 GrannyInt16Member,
330 GrannyUInt16Member,
331 GrannyBinormalInt16Member,
332 GrannyNormalUInt16Member,
333 GrannyInt32Member,
334 GrannyUInt32Member,
335 GrannyReal16Member,
336 GrannyEmptyReferenceMember,
337 GrannyOnePastLastMemberType,
338 GrannyBool32Member = GrannyInt32Member
339 } granny_member_type;
340
341 typedef struct granny_data_type_definition granny_data_type_definition;
342
343 typedef struct granny_variant granny_variant;
344
345 typedef struct granny_old_curve granny_old_curve;
346
347 typedef struct granny_curve2 granny_curve2;
348
349 typedef struct granny_curve_data_header granny_curve_data_header;
350
351 typedef struct granny_curve_data_da_keyframes32f granny_curve_data_da_keyframes32f;
352
353 typedef struct granny_curve_data_da_k32f_c32f granny_curve_data_da_k32f_c32f;
354
355 typedef struct granny_curve_data_da_k16u_c16u granny_curve_data_da_k16u_c16u;
356
357 typedef struct granny_curve_data_da_k8u_c8u granny_curve_data_da_k8u_c8u;
358
359 typedef struct granny_curve_data_d3_k16u_c16u granny_curve_data_d3_k16u_c16u;
360
361 typedef struct granny_curve_data_d3_k8u_c8u granny_curve_data_d3_k8u_c8u;
362
363 typedef struct granny_curve_data_d4n_k16u_c15u granny_curve_data_d4n_k16u_c15u;
364
365 typedef struct granny_curve_data_d4n_k8u_c7u granny_curve_data_d4n_k8u_c7u;
366
367 typedef struct granny_curve_data_da_identity granny_curve_data_da_identity;
368
369 typedef struct granny_curve_data_da_constant32f granny_curve_data_da_constant32f;
370
371 typedef struct granny_curve_data_d3_constant32f granny_curve_data_d3_constant32f;
372
373 typedef struct granny_curve_data_d4_constant32f granny_curve_data_d4_constant32f;
374
375 typedef struct granny_curve_data_d9i1_k16u_c16u granny_curve_data_d9i1_k16u_c16u;
376
377 typedef struct granny_curve_data_d9i3_k16u_c16u granny_curve_data_d9i3_k16u_c16u;
378
379 typedef struct granny_curve_data_d9i1_k8u_c8u granny_curve_data_d9i1_k8u_c8u;
380
381 typedef struct granny_curve_data_d9i3_k8u_c8u granny_curve_data_d9i3_k8u_c8u;
382
383 typedef struct granny_curve_data_d3i1_k32f_c32f granny_curve_data_d3i1_k32f_c32f;
384
385 typedef struct granny_curve_data_d3i1_k16u_c16u granny_curve_data_d3i1_k16u_c16u;
386
387 typedef struct granny_curve_data_d3i1_k8u_c8u granny_curve_data_d3i1_k8u_c8u;
388
389 typedef struct granny_curve_builder granny_curve_builder;
390 typedef enum granny_material_texture_type
391 {
392 GrannyUnknownTextureType,
393 GrannyAmbientColorTexture,
394 GrannyDiffuseColorTexture,
395 GrannySpecularColorTexture,
396 GrannySelfIlluminationTexture,
397 GrannyOpacityTexture,
398 GrannyBumpHeightTexture,
399 GrannyReflectionTexture,
400 GrannyRefractionTexture,
401 GrannyDisplacementTexture,
402 GrannyOnePastLastMaterialTextureType
403 } granny_material_texture_type;
404
405 typedef struct granny_material_map granny_material_map;
406
407 typedef struct granny_material granny_material;
408
409 typedef struct granny_pixel_layout granny_pixel_layout;
410
411 typedef struct granny_animation granny_animation;
412 typedef enum granny_bound_transform_track_flags
413 {
414 GrannyBoundPositionCurveIsIdentity = (0x0 << 0),
415 GrannyBoundPositionCurveIsConstant = (0x1 << 0),
416 GrannyBoundPositionCurveIsKeyframed = (0x2 << 0),
417 GrannyBoundPositionCurveIsGeneral = (0x3 << 0),
418 GrannyBoundPositionCurveFlagMask = (0x3 << 0),
419 GrannyBoundOrientationCurveIsIdentity = (0x0 << 2),
420 GrannyBoundOrientationCurveIsConstant = (0x1 << 2),
421 GrannyBoundOrientationCurveIsKeyframed = (0x2 << 2),
422 GrannyBoundOrientationCurveIsGeneral = (0x3 << 2),
423 GrannyBoundOrientationCurveFlagMask = (0x3 << 2),
424 GrannyBoundScaleShearCurveIsIdentity = (0x0 << 4),
425 GrannyBoundScaleShearCurveIsConstant = (0x1 << 4),
426 GrannyBoundScaleShearCurveIsKeyframed = (0x2 << 4),
427 GrannyBoundScaleShearCurveIsGeneral = (0x3 << 4),
428 GrannyBoundScaleShearCurveFlagMask = (0x3 << 4)
429 } granny_bound_transform_track_flags;
430
431 typedef struct granny_bound_transform_track granny_bound_transform_track;
432
433 typedef struct granny_animation_binding_identifier granny_animation_binding_identifier;
434
435 typedef struct granny_animation_binding granny_animation_binding;
436
437 typedef struct granny_animation_lod_builder granny_animation_lod_builder;
438
439 typedef struct granny_art_tool_info granny_art_tool_info;
440 typedef enum granny_transform_file_flags
441 {
442 GrannyRenormalizeNormals = 0x1,
443 GrannyReorderTriangleIndices = 0x2
444 } granny_transform_file_flags;
445 typedef enum granny_bink_texture_flags
446 {
447 GrannyBinkEncodeAlpha = 0x1,
448 GrannyBinkUseScaledRGBInsteadOfYUV = 0x2,
449 GrannyBinkUseBink1 = 0x4
450 } granny_bink_texture_flags;
451 typedef enum granny_bspline_solver_flags
452 {
453 GrannyBSplineSolverEvaluateAsQuaternions = 0x1,
454 GrannyBSplineSolverAllowC0Splitting = 0x2,
455 GrannyBSplineSolverAllowC1Splitting = 0x4,
456 GrannyBSplineSolverExtraDOFKnotZero = 0x10,
457 GrannyBSplineSolverForceEndpointAlignment = 0x20,
458 GrannyBSplineSolverAllowReduceKeys = 0x40
459 } granny_bspline_solver_flags;
460
461 typedef struct granny_bspline_solver granny_bspline_solver;
462
463 typedef struct granny_bspline_error granny_bspline_error;
464 #define GrannyInfiniteFarClipPlane 0.0f
465 #define GrannyLCD17PhysicalAspectRatio 1.25f
466 #define GrannyNTSCTelevisionPhysicalAspectRatio 1.33f
467 #define GrannyPALTelevisionPhysicalAspectRatio 1.33f
468 #define GrannyWidescreenMonitorPhysicalAspectRatio 1.56f
469 #define GrannyEuropeanFilmAspectRatio 1.66f
470 #define GrannyUSDigitalTelevisionAspectRatio 1.78f
471 #define GrannyUSAcademyFlatPhysicalAspectRatio 1.85f
472 #define GrannyUSPanavisionAspectRatio 2.20f
473 #define GrannyUSAnamorphicScopePhysicalAspectRatio 2.35f
474 typedef enum granny_camera_output_z_range
475 {
476 GrannyCameraOutputZZeroToOne,
477 GrannyCameraOutputZNegativeOneToOne,
478 GrannyCameraOutputZNegativeOneToZero
479 } granny_camera_output_z_range;
480
481 typedef struct granny_camera granny_camera;
482
483 typedef struct granny_compress_curve_parameters granny_compress_curve_parameters;
484
485 typedef struct granny_control granny_control;
486 typedef enum granny_accumulation_mode
487 {
488 GrannyNoAccumulation,
489 GrannyConstantExtractionAccumulation,
490 GrannyVariableDeltaAccumulation
491 } granny_accumulation_mode;
492
493 typedef struct granny_controlled_animation_builder granny_controlled_animation_builder;
494 typedef enum granny_blend_dag_node_type
495 {
496 GrannyDagNodeType_Leaf_AnimationBlend,
497 GrannyDagNodeType_Leaf_LocalPose,
498 GrannyDagNodeType_Leaf_Callback,
499 GrannyDagNodeType_OnePastLastLeafType,
500 GrannyDagNodeType_Node_Crossfade,
501 GrannyDagNodeType_Node_WeightedBlend,
502 GrannyDagNodeType_OnePastLast
503 } granny_blend_dag_node_type;
504
505 typedef struct granny_blend_dag_node granny_blend_dag_node;
506
507 typedef struct granny_dag_pose_cache granny_dag_pose_cache;
508 typedef enum granny_file_data_tree_flags
509 {
510 GrannyExcludeTypeTree = 0x1
511 } granny_file_data_tree_flags;
512
513 typedef struct granny_file_data_tree_writer
514 {
515 }granny_file_data_tree_writer;
516 typedef enum granny_deformation_type
517 {
518 GrannyDeformPosition = 1,
519 GrannyDeformPositionNormal,
520 GrannyDeformPositionNormalTangent,
521 GrannyDeformPositionNormalTangentBinormal
522 } granny_deformation_type;
523 typedef enum granny_degree_of_freedom
524 {
525 GrannyNoDOFs = 0,
526 GrannyXTranslation = 0x001,
527 GrannyYTranslation = 0x002,
528 GrannyZTranslation = 0x004,
529 GrannyXRotation = 0x008,
530 GrannyYRotation = 0x010,
531 GrannyZRotation = 0x020,
532 GrannyXScaleShear = 0x040,
533 GrannyYScaleShear = 0x080,
534 GrannyZScaleShear = 0x100,
535 GrannyTranslationDOFs = GrannyXTranslation | GrannyYTranslation | GrannyZTranslation,
536 GrannyRotationDOFs = GrannyXRotation | GrannyYRotation | GrannyZRotation,
537 GrannyScaleShearDOFs = GrannyXScaleShear | GrannyYScaleShear | GrannyZScaleShear,
538 GrannyAllDOFs = GrannyTranslationDOFs | GrannyRotationDOFs | GrannyScaleShearDOFs
539 } granny_degree_of_freedom;
540
541 typedef struct granny_exporter_info granny_exporter_info;
542
543 typedef struct granny_file granny_file;
544
545 typedef struct granny_file_location granny_file_location;
546
547 typedef struct granny_file_fixup granny_file_fixup;
548
549 typedef struct granny_file_builder
550 {
551 }granny_file_builder;
552 typedef enum granny_compression_type
553 {
554 GrannyNoCompression,
555 GrannyOodle0Compression,
556 GrannyOodle1Compression,
557 GrannyOnePastLastCompressionType
558 } granny_compression_type;
559
560 typedef struct granny_file_compressor granny_file_compressor;
561 #define GrannyCurrentGRNStandardTag (0x80000000 + 38)
562 #define GrannyCurrentGRNFileVersion 7
563 #define GrannyGRNExtraTagCount 4
564 typedef enum granny_standard_section_index
565 {
566 GrannyStandardMainSection = 0,
567 GrannyStandardRigidVertexSection = 1,
568 GrannyStandardRigidIndexSection = 2,
569 GrannyStandardDeformableVertexSection = 3,
570 GrannyStandardDeformableIndexSection = 4,
571 GrannyStandardTextureSection = 5,
572 GrannyStandardDiscardableSection = 6,
573 GrannyStandardUnloadedSection = 7,
574 GrannyStandardSectionCount
575 } granny_standard_section_index;
576 typedef enum granny_grn_type_tag
577 {
578 GrannyFirstGRNUserTag = 0,
579 GrannyLastGRNUserTag = 0x7FFFFFFF,
580 GrannyFirstGRNStandardTag = 0x80000000,
581 GrannyLastGRNStandardTag = 0xFFFFFFFF
582 } granny_grn_type_tag;
583
584 typedef struct granny_grn_file_magic_value granny_grn_file_magic_value;
585
586 typedef struct granny_grn_reference granny_grn_reference;
587
588 typedef struct granny_grn_pointer_fixup granny_grn_pointer_fixup;
589
590 typedef struct granny_grn_mixed_marshalling_fixup granny_grn_mixed_marshalling_fixup;
591
592 typedef struct granny_grn_section granny_grn_section;
593
594 typedef struct granny_grn_file_header granny_grn_file_header;
595
596 typedef struct granny_file_info granny_file_info;
597 #define GrannyCloseFileReader(Reader) if(Reader) {(*(Reader)->CloseFileReaderCallback)(__FILE__, __LINE__, Reader);}
598 #define GrannyReadAtMost(Reader, Pos, Count, Buffer) (*(Reader).ReadAtMostCallback)(__FILE__, __LINE__, Reader, Pos, Count, Buffer)
599 #define GrannyReadExactly(Reader, Pos, Count, Buffer) ((*(Reader).ReadAtMostCallback)(__FILE__, __LINE__, Reader, Pos, Count, Buffer) == Count)
600
601 typedef struct granny_file_reader granny_file_reader;
602 #define GrannyDeleteFileWriter(Writer) (*(Writer)->DeleteFileWriterCallback)(__FILE__, __LINE__, Writer)
603 #define GrannyGetWriterPosition(Writer) (*(Writer).SeekWriterCallback)(__FILE__, __LINE__, Writer, 0, SeekCurrent)
604 #define GrannySeekWriterFromStart(Writer, OffsetInUInt8s) (SeekWriterFromStartStub(__FILE__, __LINE__, Writer, OffsetInUInt8s))
605 #define GrannySeekWriterFromEnd(Writer, OffsetInUInt8s) (SeekWriterFromEndStub(__FILE__, __LINE__, Writer, OffsetInUInt8s))
606 #define GrannySeekWriterFromCurrentPosition(Writer, OffsetInUInt8s) (SeekWriterFromCurrentPositionStub(__FILE__, __LINE__, Writer, OffsetInUInt8s))
607 #define GrannyWrite(Writer, UInt8Count, WritePointer) (*(Writer).WriteCallback)(__FILE__, __LINE__, Writer, UInt8Count, WritePointer)
608 #define GrannyBeginWriterCRC(Writer) (*(Writer).BeginCRCCallback)(__FILE__, __LINE__, Writer)
609 #define GrannyEndWriterCRC(Writer) (*(Writer).EndCRCCallback)(__FILE__, __LINE__, Writer)
610 #define GrannyWriterIsCRCing(Writer) ((Writer).CRCing)
611 typedef enum granny_file_writer_seek_type
612 {
613 GrannySeekStart,
614 GrannySeekEnd,
615 GrannySeekCurrent
616 } granny_file_writer_seek_type;
617
618 typedef struct granny_file_writer granny_file_writer;
619
620 typedef struct granny_fixed_allocator_unit granny_fixed_allocator_unit;
621
622 typedef struct granny_fixed_allocator_block granny_fixed_allocator_block;
623
624 typedef struct granny_fixed_allocator granny_fixed_allocator;
625 typedef enum granny_pixel_filter_type
626 {
627 GrannyCubicPixelFilter,
628 GrannyLinearPixelFilter,
629 GrannyBoxPixelFilter,
630 GrannyOnePastLastPixelFilterType
631 } granny_pixel_filter_type;
632
633 typedef struct granny_box_intersection granny_box_intersection;
634
635 typedef struct granny_triangle_intersection granny_triangle_intersection;
636 #define GrannyMaximumSystemFileNameSize (1 << 9)
637 #define GrannyMaximumTempFileNameSize (1 << 9)
638 #define GrannyMaximumMessageBufferSize (1 << 15)
639 #define GrannyMaximumLogFileNameSize (1 << 9)
640 #define GrannyMaximumAggregateCount (1 << 6)
641 #define GrannyMaximumNumberToStringBuffer (1 << 8)
642 #define GrannyMaximumIKLinkCount (1 << 8)
643 #define GrannyMaximumMIPLevelCount (1 << 5)
644 #define GrannyMaximumVertexNameLength (1 << 6)
645 #define GrannyMaximumUserData (1 << 2)
646 #define GrannyMaximumBoneNameLength (1 << 9)
647 #define GrannyMaximumChannelCount (1 << 8)
648 #define GrannyMaximumWeightCount (1 << 8)
649 #define GrannyMaximumChannelWidth (1 << 2)
650 #define GrannyMaximumBSplineDimension 16
651 #define GrannyMaximumBSplineKnotPower 16
652 #define GrannyDefaultAllocationAlignment 4
653 #define GrannyMatrixBufferAlignment 16
654 #define GrannyDefaultFixedAllocatorBlockAlignment 16
655 #define GrannyBlockFileFixupCount (1 << 8)
656 #define GrannyExpectedUsablePageSize (4000)
657 #define GrannyMinimumAllocationsPerFixedBlock (1 << 6)
658 #define GrannyFileCopyBufferSize (1 << 16)
659 #define GrannyCRCCheckBufferSize (1 << 16)
660 #define GrannyTrackWeightEpsilon 0.001f
661 #define GrannyPositionIdentityThreshold 0.001f
662 #define GrannyOrientationIdentityThreshold 0.0001f
663 #define GrannyScaleShearIdentityThreshold 0.001f
664 #define GrannyBlendEffectivelyZero 0.001f
665 #define GrannyBlendEffectivelyOne 0.999f
666 #define GrannyTimeEffectivelyZero 0.00001f
667 #define GrannyDefaultLocalPoseFillThreshold 0.2f
668 #define GrannyNoSparseBone -1
669 typedef enum granny_quaternion_mode
670 {
671 GrannyBlendQuaternionDirectly = 0,
672 GrannyBlendQuaternionInverted = 1,
673 GrannyBlendQuaternionNeighborhooded = 2,
674 GrannyBlendQuaternionAccumNeighborhooded = 3
675 } granny_quaternion_mode;
676
677 typedef struct granny_local_pose granny_local_pose;
678 typedef enum granny_log_message_type
679 {
680 GrannyIgnoredLogMessage,
681 GrannyNoteLogMessage,
682 GrannyWarningLogMessage,
683 GrannyErrorLogMessage,
684 GrannyOnePastLastMessageType
685 } granny_log_message_type;
686 typedef enum granny_log_message_origin
687 {
688 GrannyNotImplementedLogMessage,
689 GrannyApplicationLogMessage,
690 GrannyWin32SubsystemLogMessage,
691 GrannyWin64SubsystemLogMessage,
692 GrannyMacOSSubsystemLogMessage,
693 GrannyANSISubsystemLogMessage,
694 GrannyGamecubeSubsystemLogMessage,
695 GrannyPS2SubsystemLogMessage,
696 GrannyPSPSubsystemLogMessage,
697 GrannyPS3SubsystemLogMessage,
698 GrannyXboxSubsystemLogMessage,
699 GrannyXenonSubsystemLogMessage,
700 GrannyMAXSubsystemLogMessage,
701 GrannyMayaSubsystemLogMessage,
702 GrannyXSISubsystemLogMessage,
703 GrannyLightwaveSubsystemLogMessage,
704 GrannyFileWritingLogMessage,
705 GrannyFileReadingLogMessage,
706 GrannyExporterLogMessage,
707 GrannyCompressorLogMessage,
708 GrannyStringLogMessage,
709 GrannyStringTableLogMessage,
710 GrannyVertexLayoutLogMessage,
711 GrannyMeshLogMessage,
712 GrannyPropertyLogMessage,
713 GrannySkeletonLogMessage,
714 GrannyAnimationLogMessage,
715 GrannySetupGraphLogMessage,
716 GrannyTextureLogMessage,
717 GrannyBSplineLogMessage,
718 GrannyHashLogMessage,
719 GrannyLinkerLogMessage,
720 GrannyInstantiatorLogMessage,
721 GrannyDataTypeLogMessage,
722 GrannyNameMapLogMessage,
723 GrannyMaterialLogMessage,
724 GrannyModelLogMessage,
725 GrannyStackAllocatorLogMessage,
726 GrannyFixedAllocatorLogMessage,
727 GrannySceneLogMessage,
728 GrannyTrackMaskLogMessage,
729 GrannyLocalPoseLogMessage,
730 GrannyWorldPoseLogMessage,
731 GrannyNameLibraryLogMessage,
732 GrannyControlLogMessage,
733 GrannyMeshBindingLogMessage,
734 GrannyMathLogMessage,
735 GrannyVersionLogMessage,
736 GrannyMemoryLogMessage,
737 GrannyDeformerLogMessage,
738 GrannyVoxelLogMessage,
739 GrannyBitmapLogMessage,
740 GrannyIKLogMessage,
741 GrannyCurveLogMessage,
742 GrannyTrackGroupLogMessage,
743 GrannyThreadSafetyLogMessage,
744 GrannyQuantizeLogMessage,
745 GrannyBlendDagLogMessage,
746 GrannyOnePastLastMessageOrigin
747 } granny_log_message_origin;
748
749 typedef struct granny_log_callback granny_log_callback;
750
751 typedef struct granny_allocation_header granny_allocation_header;
752
753 typedef struct granny_allocation_information granny_allocation_information;
754
755 typedef struct granny_memory_arena granny_memory_arena;
756
757 typedef struct granny_bone_binding granny_bone_binding;
758
759 typedef struct granny_material_binding granny_material_binding;
760
761 typedef struct granny_morph_target granny_morph_target;
762
763 typedef struct granny_mesh granny_mesh;
764
765 typedef struct granny_mesh_binding granny_mesh_binding;
766
767 typedef struct granny_mesh_builder granny_mesh_builder;
768 typedef enum granny_deformer_tail_flags
769 {
770 GrannyDontAllowUncopiedTail,
771 GrannyAllowUncopiedTail
772 } granny_deformer_tail_flags;
773
774 typedef struct granny_mesh_deformer granny_mesh_deformer;
775
776 typedef struct granny_oodle1_state granny_oodle1_state;
777
778 typedef struct granny_periodic_loop granny_periodic_loop;
779
780 typedef struct granny_pointer_hash granny_pointer_hash;
781 typedef enum granny_s3tc_texture_format
782 {
783 GrannyS3TCBGR565,
784 GrannyS3TCBGRA5551,
785 GrannyS3TCBGRA8888MappedAlpha,
786 GrannyS3TCBGRA8888InterpolatedAlpha,
787 GrannyOnePastLastS3TCTextureFormat
788 } granny_s3tc_texture_format;
789 #define GrannyNoParentBone -1
790 typedef enum granny_skeleton_lod_type
791 {
792 GrannyNoSkeletonLOD = 0x0,
793 GrannyEstimatedLOD = 0x1,
794 GrannyMeasuredLOD = 0x2
795 } granny_skeleton_lod_type;
796
797 typedef struct granny_bone granny_bone;
798
799 typedef struct granny_skeleton granny_skeleton;
800
801 typedef struct granny_skeleton_builder granny_skeleton_builder;
802
803 typedef struct granny_spu_animation granny_spu_animation;
804
805 typedef struct granny_spu_animation_binding_id granny_spu_animation_binding_id;
806
807 typedef struct granny_spu_animation_binding granny_spu_animation_binding;
808
809 typedef struct granny_spu_animation_info granny_spu_animation_info;
810
811 typedef struct granny_controlled_spu_animation_builder granny_controlled_spu_animation_builder;
812 typedef enum granny_spu_curve_types
813 {
814 GrannySPUCurveTypeReal32 = 0,
815 GrannySPUCurveTypeK16 = 1,
816 GrannySPUCurveTypeK8 = 2,
817 GrannySPUCurveType4nK16 = 3,
818 GrannySPUCurveType4nK8 = 4
819 } granny_spu_curve_types;
820 typedef enum granny_spu_replication_type
821 {
822 GrannySPUReplicationRaw = 0,
823 GrannySPUReplicationNormOri = 1,
824 GrannySPUReplicationDiagonalSS = 2
825 } granny_spu_replication_type;
826
827 typedef struct granny_spu_curve_header_basic granny_spu_curve_header_basic;
828
829 typedef struct granny_spu_curve_header_quantized granny_spu_curve_header_quantized;
830
831 typedef struct granny_spu_curve_header_quantized4n granny_spu_curve_header_quantized4n;
832 #define GrannySPUTransformTrackNoCurve (0xffffffff)
833
834 typedef struct granny_spu_transform_track granny_spu_transform_track;
835
836 typedef struct granny_spu_track_group granny_spu_track_group;
837
838 typedef struct granny_allocated_block granny_allocated_block;
839
840 typedef struct granny_stack_allocator granny_stack_allocator;
841
842 typedef struct granny_counter_results granny_counter_results;
843
844 typedef struct granny_animation_binding_cache_status granny_animation_binding_cache_status;
845
846 typedef struct granny_stat_hud_alloc_point granny_stat_hud_alloc_point;
847
848 typedef struct granny_stat_hud_perf_point granny_stat_hud_perf_point;
849
850 typedef struct granny_stat_hud_model_instances granny_stat_hud_model_instances;
851
852 typedef struct granny_stat_hud_model_controls granny_stat_hud_model_controls;
853
854 typedef struct granny_stat_hud_footprint granny_stat_hud_footprint;
855
856 typedef struct granny_stat_hud_perf granny_stat_hud_perf;
857
858 typedef struct granny_stat_hud_animation_types granny_stat_hud_animation_types;
859
860 typedef struct granny_stat_hud granny_stat_hud;
861
862 typedef struct granny_string_database granny_string_database;
863
864 typedef struct granny_string_table granny_string_table;
865
866 typedef struct granny_system_clock granny_system_clock;
867
868 typedef struct granny_tangent_frame granny_tangent_frame;
869 typedef enum granny_texture_type
870 {
871 GrannyColorMapTextureType,
872 GrannyCubeMapTextureType,
873 GrannyOnePastLastTextureType
874 } granny_texture_type;
875 typedef enum granny_texture_encoding
876 {
877 GrannyUserTextureEncoding,
878 GrannyRawTextureEncoding,
879 GrannyS3TCTextureEncoding,
880 GrannyBinkTextureEncoding,
881 GrannyOnePastLastTextureEncoding
882 } granny_texture_encoding;
883
884 typedef struct granny_texture_mip_level granny_texture_mip_level;
885
886 typedef struct granny_texture_image granny_texture_image;
887
888 typedef struct granny_texture granny_texture;
889
890 typedef struct granny_texture_builder granny_texture_builder;
891 typedef enum granny_transform_track_flags
892 {
893 GrannyUseAccumulatorNeighborhood = 0x1
894 } granny_transform_track_flags;
895 typedef enum granny_track_group_flags
896 {
897 GrannyAccumulationExtracted = 0x1,
898 GrannyTrackGroupIsSorted = 0x2,
899 GrannyAccumulationIsVDA = 0x4
900 } granny_track_group_flags;
901 typedef enum granny_vector_diff_mode
902 {
903 GrannyDiffAsVectors,
904 GrannyDiffAsQuaternions,
905 GrannyManhattanMetric
906 } granny_vector_diff_mode;
907
908 typedef struct granny_vector_track granny_vector_track;
909
910 typedef struct granny_transform_track granny_transform_track;
911
912 typedef struct granny_text_track_entry granny_text_track_entry;
913
914 typedef struct granny_text_track granny_text_track;
915
916 typedef struct granny_track_group granny_track_group;
917
918 typedef struct granny_track_group_builder granny_track_group_builder;
919
920 typedef struct granny_track_group_sampler granny_track_group_sampler;
921 typedef enum granny_extract_track_mask_result
922 {
923 GrannyExtractTrackMaskResult_AllDataPresent,
924 GrannyExtractTrackMaskResult_PartialDataPresent,
925 GrannyExtractTrackMaskResult_NoDataPresent
926 } granny_extract_track_mask_result;
927
928 typedef struct granny_track_mask granny_track_mask;
929
930 typedef struct granny_unbound_weight granny_unbound_weight;
931
932 typedef struct granny_unbound_track_mask granny_unbound_track_mask;
933
934 typedef struct granny_sample_context granny_sample_context;
935 #define GrannyTopologyNullIndex 0xFFFFFFFF
936
937 typedef struct granny_tri_material_group granny_tri_material_group;
938
939 typedef struct granny_tri_annotation_set granny_tri_annotation_set;
940
941 typedef struct granny_tri_topology granny_tri_topology;
942
943 typedef struct granny_defined_type granny_defined_type;
944
945 typedef struct granny_variant_builder granny_variant_builder;
946 #define GrannyProductVersion "2.7.0.30"
947 #define GrannyProductMajorVersion 2
948 #define GrannyProductMinorVersion 7
949 #define GrannyProductCustomization 0
950 #define GrannyProductBuildNumber 30
951 #define GrannyProductReleaseName release
952 #define GrannyProductCompanyName "RAD Game Tools, Inc."
953 #define GrannyProductName "Granny"
954 #define GrannyProductCopyright "1999-2007 by RAD Game Tools, Inc., All Rights Reserved."
955 #define GrannyProductTrademarks ProductName " is a registered trademark of " ProductCompanyName
956 #define GrannyProductComments "Who's your Granny?"
957 #define GrannyProductSupportAddress "granny3@radgametools.com"
958 #define GrannyProductSupportPage "www.radgametools.com/granny.html"
959 #define GrannyVersionsMatch GrannyVersionsMatch_(GrannyProductMajorVersion, GrannyProductMinorVersion, GrannyProductCustomization, GrannyProductBuildNumber)
960 #define GrannyVertexPositionName "Position"
961 #define GrannyVertexNormalName "Normal"
962 #define GrannyVertexTangentName "Tangent"
963 #define GrannyVertexBinormalName "Binormal"
964 #define GrannyVertexTangentBinormalCrossName "TangentBinormalCross"
965 #define GrannyVertexBoneWeightsName "BoneWeights"
966 #define GrannyVertexBoneIndicesName "BoneIndices"
967 #define GrannyVertexDiffuseColorName "DiffuseColor"
968 #define GrannyVertexSpecularColorName "SpecularColor"
969 #define GrannyVertexTextureCoordinatesName "TextureCoordinates"
970 #define GrannyVertexMorphCurvePrefix "VertexMorphCurve"
971
972 typedef struct granny_vertex_annotation_set granny_vertex_annotation_set;
973
974 typedef struct granny_vertex_data granny_vertex_data;
975
976 typedef struct granny_p3_vertex granny_p3_vertex;
977
978 typedef struct granny_pt32_vertex granny_pt32_vertex;
979
980 typedef struct granny_pn33_vertex granny_pn33_vertex;
981
982 typedef struct granny_png333_vertex granny_png333_vertex;
983
984 typedef struct granny_pngt3332_vertex granny_pngt3332_vertex;
985
986 typedef struct granny_pntg3323_vertex granny_pntg3323_vertex;
987
988 typedef struct granny_pngb3333_vertex granny_pngb3333_vertex;
989
990 typedef struct granny_pnt332_vertex granny_pnt332_vertex;
991
992 typedef struct granny_pngbt33332_vertex granny_pngbt33332_vertex;
993
994 typedef struct granny_pnt333_vertex granny_pnt333_vertex;
995
996 typedef struct granny_pngbt33333_vertex granny_pngbt33333_vertex;
997
998 typedef struct granny_pwn313_vertex granny_pwn313_vertex;
999
1000 typedef struct granny_pwng3133_vertex granny_pwng3133_vertex;
1001
1002 typedef struct granny_pwngt31332_vertex granny_pwngt31332_vertex;
1003
1004 typedef struct granny_pwngb31333_vertex granny_pwngb31333_vertex;
1005
1006 typedef struct granny_pwnt3132_vertex granny_pwnt3132_vertex;
1007
1008 typedef struct granny_pwngbt313332_vertex granny_pwngbt313332_vertex;
1009
1010 typedef struct granny_pwn323_vertex granny_pwn323_vertex;
1011
1012 typedef struct granny_pwng3233_vertex granny_pwng3233_vertex;
1013
1014 typedef struct granny_pwngt32332_vertex granny_pwngt32332_vertex;
1015
1016 typedef struct granny_pwngb32333_vertex granny_pwngb32333_vertex;
1017
1018 typedef struct granny_pwnt3232_vertex granny_pwnt3232_vertex;
1019
1020 typedef struct granny_pwngbt323332_vertex granny_pwngbt323332_vertex;
1021
1022 typedef struct granny_pwn343_vertex granny_pwn343_vertex;
1023
1024 typedef struct granny_pwng3433_vertex granny_pwng3433_vertex;
1025
1026 typedef struct granny_pwngt34332_vertex granny_pwngt34332_vertex;
1027
1028 typedef struct granny_pwngb34333_vertex granny_pwngb34333_vertex;
1029
1030 typedef struct granny_pwnt3432_vertex granny_pwnt3432_vertex;
1031
1032 typedef struct granny_pwngbt343332_vertex granny_pwngbt343332_vertex;
1033
1034 typedef struct granny_vertex_weight_arrays granny_vertex_weight_arrays;
1035 typedef enum granny_composite_flag
1036 {
1037 GrannyIncludeComposites = 0,
1038 GrannyExcludeComposites = 1
1039 } granny_composite_flag;
1040
1041 typedef struct granny_world_pose granny_world_pose;
1042 typedef GRANNY_CALLBACK(granny_local_pose *) granny_blend_dag_leaf_callback_sample_callback(void * UserData,
1043 granny_int32x BoneCount,
1044 granny_real32 AllowedError,
1045 granny_int32x const * SparseBoneArray);
1046 typedef GRANNY_CALLBACK(void) granny_blend_dag_leaf_callback_set_clock_callback(void * UserData,
1047 granny_real32 NewClock);
1048 typedef GRANNY_CALLBACK(void) granny_blend_dag_leaf_callback_motion_vectors_callback(void * UserData,
1049 granny_real32 SecondsElapsed,
1050 granny_real32 * ResultTranslationVec3,
1051 granny_real32 * ResultRotationVec3,
1052 bool Inverse);
1053 typedef GRANNY_CALLBACK(char *) granny_rebase_pointers_string_callback(void * Data,
1054 granny_uint32 Identifier);
1055 typedef GRANNY_CALLBACK(granny_uint32) granny_file_writer_string_callback(void * Data,
1056 char const * String);
1057 typedef GRANNY_CALLBACK(granny_file_reader *) granny_open_file_reader_callback(char const * SourceFileName,
1058 granny_int32x SourceLineNumber,
1059 char const * FileName);
1060 typedef GRANNY_CALLBACK(void) granny_close_file_reader_callback(char const * SourceFileName,
1061 granny_int32x SourceLineNumber,
1062 granny_file_reader * Reader);
1063 typedef GRANNY_CALLBACK(granny_int32x) granny_read_at_most_callback(char const * SourceFileName,
1064 granny_int32x SourceLineNumber,
1065 granny_file_reader * Reader,
1066 granny_int32x FilePosition,
1067 granny_int32x UInt8Count,
1068 void * Buffer);
1069 typedef GRANNY_CALLBACK(granny_file_writer *) granny_open_file_writer_callback(char const * SourceFileName,
1070 granny_int32x SourceLineNumber,
1071 char const * FileName,
1072 bool EraseExisting);
1073 typedef GRANNY_CALLBACK(void) granny_delete_file_writer_callback(char const * SourceFileName,
1074 granny_int32x SourceLineNumber,
1075 granny_file_writer * Writer);
1076 typedef GRANNY_CALLBACK(granny_int32x) granny_seek_file_writer_callback(char const * SourceFileName,
1077 granny_int32x SourceLineNumber,
1078 granny_file_writer * Writer,
1079 granny_int32x OffsetInUInt8s,
1080 granny_file_writer_seek_type SeekType);
1081 typedef GRANNY_CALLBACK(bool) granny_write_file_writer_callback(char const * SourceFileName,
1082 granny_int32x SourceLineNumber,
1083 granny_file_writer * Writer,
1084 granny_int32x UInt8Count,
1085 void const * WritePointer);
1086 typedef GRANNY_CALLBACK(void) granny_begincrc_file_writer_callback(char const * SourceFileName,
1087 granny_int32x SourceLineNumber,
1088 granny_file_writer * Writer);
1089 typedef GRANNY_CALLBACK(granny_uint32) granny_endcrc_file_writer_callback(char const * SourceFileName,
1090 granny_int32x SourceLineNumber,
1091 granny_file_writer * Writer);
1092 typedef GRANNY_CALLBACK(void) granny_log_function(granny_log_message_type Type,
1093 granny_log_message_origin Origin,
1094 char const * Message,
1095 void * UserData);
1096 typedef GRANNY_CALLBACK(void *) granny_allocate_callback(char const * File,
1097 granny_int32x Line,
1098 granny_intaddrx Alignment,
1099 granny_intaddrx Size);
1100 typedef GRANNY_CALLBACK(void) granny_deallocate_callback(char const * File,
1101 granny_int32x Line,
1102 void * Memory);
1103 typedef GRANNY_CALLBACK(granny_int32x) granny_string_comparison_callback(char const * A,
1104 char const * B);
1105 typedef GRANNY_CALLBACK(granny_uint32x) granny_thread_id_callback(void);
1106 typedef GRANNY_CALLBACK(void) granny_track_sampler(granny_sample_context const * Context,
1107 granny_transform_track const * SourceTrack,
1108 granny_bound_transform_track * Track,
1109 granny_transform const * RestTransform,
1110 granny_real32 const * InverseWorld4x4,
1111 granny_real32 const * ParentMatrix,
1112 granny_real32 * WorldResult,
1113 granny_real32 * CompositeResult);
1114
1115 struct granny_transform
1116 {
1117 granny_uint32 Flags;
1118 granny_triple Position;
1119 granny_quad Orientation;
1120 granny_triple ScaleShear[3];
1121 } GrannyAlignAttribute;
1122 GrannyTypeSizeCheck(sizeof(granny_transform) == (sizeof(granny_uint32) +
1123 sizeof(granny_triple) +
1124 sizeof(granny_quad) +
1125 sizeof(granny_triple) * 3));
1126
1127 struct granny_model_mesh_binding
1128 {
1129 granny_mesh * Mesh;
1130 } GrannyAlignAttribute;
1131 GrannyTypeSizeCheck(sizeof(granny_model_mesh_binding) == (sizeof(granny_mesh *)));
1132
1133 struct granny_model
1134 {
1135 char const * Name;
1136 granny_skeleton * Skeleton;
1137 granny_transform InitialPlacement;
1138 granny_int32 MeshBindingCount;
1139 granny_model_mesh_binding * MeshBindings;
1140 } GrannyAlignAttribute;
1141 GrannyTypeSizeCheck(sizeof(granny_model) == (sizeof(char const *) +
1142 sizeof(granny_skeleton *) +
1143 sizeof(granny_transform) +
1144 sizeof(granny_int32) +
1145 sizeof(granny_model_mesh_binding *)));
1146
1147 struct granny_model_control_binding;
1148
1149 struct granny_controlled_animation;
1150
1151 struct granny_controlled_pose;
1152
1153 struct granny_model_instance;
1154
1155 struct granny_data_type_definition
1156 {
1157 granny_member_type Type;
1158 char const * Name;
1159 granny_data_type_definition * ReferenceType;
1160 granny_int32 ArrayWidth;
1161 granny_int32 Extra[3];
1162 granny_uintaddrx Ignored__Ignored;
1163 } GrannyAlignAttribute;
1164 GrannyTypeSizeCheck(sizeof(granny_data_type_definition) == (sizeof(granny_member_type) +
1165 sizeof(char const *) +
1166 sizeof(granny_data_type_definition *) +
1167 sizeof(granny_int32) +
1168 sizeof(granny_int32) * 3 +
1169 sizeof(granny_uintaddrx)));
1170
1171 struct granny_variant
1172 {
1173 granny_data_type_definition * Type;
1174 void * Object;
1175 } GrannyAlignAttribute;
1176 GrannyTypeSizeCheck(sizeof(granny_variant) == (sizeof(granny_data_type_definition *) +
1177 sizeof(void *)));
1178
1179 struct granny_old_curve
1180 {
1181 granny_int32 Degree;
1182 granny_int32 KnotCount;
1183 granny_real32 * Knots;
1184 granny_int32 ControlCount;
1185 granny_real32 * Controls;
1186 } GrannyAlignAttribute;
1187 GrannyTypeSizeCheck(sizeof(granny_old_curve) == (sizeof(granny_int32) +
1188 sizeof(granny_int32) +
1189 sizeof(granny_real32 *) +
1190 sizeof(granny_int32) +
1191 sizeof(granny_real32 *)));
1192
1193 struct granny_curve2
1194 {
1195 granny_variant CurveData;
1196 } GrannyAlignAttribute;
1197 GrannyTypeSizeCheck(sizeof(granny_curve2) == (sizeof(granny_variant)));
1198
1199 struct granny_curve_data_header
1200 {
1201 granny_uint8 Format;
1202 granny_uint8 Degree;
1203 } GrannyAlignAttribute;
1204 GrannyTypeSizeCheck(sizeof(granny_curve_data_header) == (sizeof(granny_uint8) +
1205 sizeof(granny_uint8)));
1206
1207 struct granny_curve_data_da_keyframes32f
1208 {
1209 granny_curve_data_header CurveDataHeader;
1210 granny_int16 Dimension;
1211 granny_int32 ControlCount;
1212 granny_real32 * Controls;
1213 } GrannyAlignAttribute;
1214 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_keyframes32f) == (sizeof(granny_curve_data_header) +
1215 sizeof(granny_int16) +
1216 sizeof(granny_int32) +
1217 sizeof(granny_real32 *)));
1218
1219 struct granny_curve_data_da_k32f_c32f
1220 {
1221 granny_curve_data_header CurveDataHeader;
1222 granny_int16 Padding;
1223 granny_int32 KnotCount;
1224 granny_real32 * Knots;
1225 granny_int32 ControlCount;
1226 granny_real32 * Controls;
1227 } GrannyAlignAttribute;
1228 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_k32f_c32f) == (sizeof(granny_curve_data_header) +
1229 sizeof(granny_int16) +
1230 sizeof(granny_int32) +
1231 sizeof(granny_real32 *) +
1232 sizeof(granny_int32) +
1233 sizeof(granny_real32 *)));
1234
1235 struct granny_curve_data_da_k16u_c16u
1236 {
1237 granny_curve_data_header CurveDataHeader;
1238 granny_uint16 OneOverKnotScaleTrunc;
1239 granny_int32 ControlScaleOffsetCount;
1240 granny_real32 * ControlScaleOffsets;
1241 granny_int32 KnotControlCount;
1242 granny_uint16 * KnotsControls;
1243 } GrannyAlignAttribute;
1244 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_k16u_c16u) == (sizeof(granny_curve_data_header) +
1245 sizeof(granny_uint16) +
1246 sizeof(granny_int32) +
1247 sizeof(granny_real32 *) +
1248 sizeof(granny_int32) +
1249 sizeof(granny_uint16 *)));
1250
1251 struct granny_curve_data_da_k8u_c8u
1252 {
1253 granny_curve_data_header CurveDataHeader;
1254 granny_uint16 OneOverKnotScaleTrunc;
1255 granny_int32 ControlScaleOffsetCount;
1256 granny_real32 * ControlScaleOffsets;
1257 granny_int32 KnotControlCount;
1258 granny_uint8 * KnotsControls;
1259 } GrannyAlignAttribute;
1260 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_k8u_c8u) == (sizeof(granny_curve_data_header) +
1261 sizeof(granny_uint16) +
1262 sizeof(granny_int32) +
1263 sizeof(granny_real32 *) +
1264 sizeof(granny_int32) +
1265 sizeof(granny_uint8 *)));
1266
1267 struct granny_curve_data_d3_k16u_c16u
1268 {
1269 granny_curve_data_header CurveDataHeader;
1270 granny_uint16 OneOverKnotScaleTrunc;
1271 granny_real32 ControlScales[3];
1272 granny_real32 ControlOffsets[3];
1273 granny_int32 KnotControlCount;
1274 granny_uint16 * KnotsControls;
1275 } GrannyAlignAttribute;
1276 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3_k16u_c16u) == (sizeof(granny_curve_data_header) +
1277 sizeof(granny_uint16) +
1278 sizeof(granny_real32) * 3 +
1279 sizeof(granny_real32) * 3 +
1280 sizeof(granny_int32) +
1281 sizeof(granny_uint16 *)));
1282
1283 struct granny_curve_data_d3_k8u_c8u
1284 {
1285 granny_curve_data_header CurveDataHeader;
1286 granny_uint16 OneOverKnotScaleTrunc;
1287 granny_real32 ControlScales[3];
1288 granny_real32 ControlOffsets[3];
1289 granny_int32 KnotControlCount;
1290 granny_uint8 * KnotsControls;
1291 } GrannyAlignAttribute;
1292 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3_k8u_c8u) == (sizeof(granny_curve_data_header) +
1293 sizeof(granny_uint16) +
1294 sizeof(granny_real32) * 3 +
1295 sizeof(granny_real32) * 3 +
1296 sizeof(granny_int32) +
1297 sizeof(granny_uint8 *)));
1298
1299 struct granny_curve_data_d4n_k16u_c15u
1300 {
1301 granny_curve_data_header CurveDataHeader;
1302 granny_uint16 ScaleOffsetTableEntries;
1303 granny_real32 OneOverKnotScale;
1304 granny_int32 KnotControlCount;
1305 granny_uint16 * KnotsControls;
1306 } GrannyAlignAttribute;
1307 GrannyTypeSizeCheck(sizeof(granny_curve_data_d4n_k16u_c15u) == (sizeof(granny_curve_data_header) +
1308 sizeof(granny_uint16) +
1309 sizeof(granny_real32) +
1310 sizeof(granny_int32) +
1311 sizeof(granny_uint16 *)));
1312
1313 struct granny_curve_data_d4n_k8u_c7u
1314 {
1315 granny_curve_data_header CurveDataHeader;
1316 granny_uint16 ScaleOffsetTableEntries;
1317 granny_real32 OneOverKnotScale;
1318 granny_int32 KnotControlCount;
1319 granny_uint8 * KnotsControls;
1320 } GrannyAlignAttribute;
1321 GrannyTypeSizeCheck(sizeof(granny_curve_data_d4n_k8u_c7u) == (sizeof(granny_curve_data_header) +
1322 sizeof(granny_uint16) +
1323 sizeof(granny_real32) +
1324 sizeof(granny_int32) +
1325 sizeof(granny_uint8 *)));
1326
1327 struct granny_curve_data_da_identity
1328 {
1329 granny_curve_data_header CurveDataHeader;
1330 granny_int16 Dimension;
1331 } GrannyAlignAttribute;
1332 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_identity) == (sizeof(granny_curve_data_header) +
1333 sizeof(granny_int16)));
1334
1335 struct granny_curve_data_da_constant32f
1336 {
1337 granny_curve_data_header CurveDataHeader;
1338 granny_int16 Padding;
1339 granny_int32 ControlCount;
1340 granny_real32 * Controls;
1341 } GrannyAlignAttribute;
1342 GrannyTypeSizeCheck(sizeof(granny_curve_data_da_constant32f) == (sizeof(granny_curve_data_header) +
1343 sizeof(granny_int16) +
1344 sizeof(granny_int32) +
1345 sizeof(granny_real32 *)));
1346
1347 struct granny_curve_data_d3_constant32f
1348 {
1349 granny_curve_data_header CurveDataHeader;
1350 granny_int16 Padding;
1351 granny_real32 Controls[3];
1352 } GrannyAlignAttribute;
1353 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3_constant32f) == (sizeof(granny_curve_data_header) +
1354 sizeof(granny_int16) +
1355 sizeof(granny_real32) * 3));
1356
1357 struct granny_curve_data_d4_constant32f
1358 {
1359 granny_curve_data_header CurveDataHeader;
1360 granny_int16 Padding;
1361 granny_real32 Controls[4];
1362 } GrannyAlignAttribute;
1363 GrannyTypeSizeCheck(sizeof(granny_curve_data_d4_constant32f) == (sizeof(granny_curve_data_header) +
1364 sizeof(granny_int16) +
1365 sizeof(granny_real32) * 4));
1366
1367 struct granny_curve_data_d9i1_k16u_c16u
1368 {
1369 granny_curve_data_header CurveDataHeader;
1370 granny_uint16 OneOverKnotScaleTrunc;
1371 granny_real32 ControlScale;
1372 granny_real32 ControlOffset;
1373 granny_int32 KnotControlCount;
1374 granny_uint16 * KnotsControls;
1375 } GrannyAlignAttribute;
1376 GrannyTypeSizeCheck(sizeof(granny_curve_data_d9i1_k16u_c16u) == (sizeof(granny_curve_data_header) +
1377 sizeof(granny_uint16) +
1378 sizeof(granny_real32) +
1379 sizeof(granny_real32) +
1380 sizeof(granny_int32) +
1381 sizeof(granny_uint16 *)));
1382
1383 struct granny_curve_data_d9i3_k16u_c16u
1384 {
1385 granny_curve_data_header CurveDataHeader;
1386 granny_uint16 OneOverKnotScaleTrunc;
1387 granny_real32 ControlScales[3];
1388 granny_real32 ControlOffsets[3];
1389 granny_int32 KnotControlCount;
1390 granny_uint16 * KnotsControls;
1391 } GrannyAlignAttribute;
1392 GrannyTypeSizeCheck(sizeof(granny_curve_data_d9i3_k16u_c16u) == (sizeof(granny_curve_data_header) +
1393 sizeof(granny_uint16) +
1394 sizeof(granny_real32) * 3 +
1395 sizeof(granny_real32) * 3 +
1396 sizeof(granny_int32) +
1397 sizeof(granny_uint16 *)));
1398
1399 struct granny_curve_data_d9i1_k8u_c8u
1400 {
1401 granny_curve_data_header CurveDataHeader;
1402 granny_uint16 OneOverKnotScaleTrunc;
1403 granny_real32 ControlScale;
1404 granny_real32 ControlOffset;
1405 granny_int32 KnotControlCount;
1406 granny_uint8 * KnotsControls;
1407 } GrannyAlignAttribute;
1408 GrannyTypeSizeCheck(sizeof(granny_curve_data_d9i1_k8u_c8u) == (sizeof(granny_curve_data_header) +
1409 sizeof(granny_uint16) +
1410 sizeof(granny_real32) +
1411 sizeof(granny_real32) +
1412 sizeof(granny_int32) +
1413 sizeof(granny_uint8 *)));
1414
1415 struct granny_curve_data_d9i3_k8u_c8u
1416 {
1417 granny_curve_data_header CurveDataHeader;
1418 granny_uint16 OneOverKnotScaleTrunc;
1419 granny_real32 ControlScales[3];
1420 granny_real32 ControlOffsets[3];
1421 granny_int32 KnotControlCount;
1422 granny_uint8 * KnotsControls;
1423 } GrannyAlignAttribute;
1424 GrannyTypeSizeCheck(sizeof(granny_curve_data_d9i3_k8u_c8u) == (sizeof(granny_curve_data_header) +
1425 sizeof(granny_uint16) +
1426 sizeof(granny_real32) * 3 +
1427 sizeof(granny_real32) * 3 +
1428 sizeof(granny_int32) +
1429 sizeof(granny_uint8 *)));
1430
1431 struct granny_curve_data_d3i1_k32f_c32f
1432 {
1433 granny_curve_data_header CurveDataHeader;
1434 granny_int16 Padding;
1435 granny_real32 ControlScales[3];
1436 granny_real32 ControlOffsets[3];
1437 granny_int32 KnotControlCount;
1438 granny_real32 * KnotsControls;
1439 } GrannyAlignAttribute;
1440 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3i1_k32f_c32f) == (sizeof(granny_curve_data_header) +
1441 sizeof(granny_int16) +
1442 sizeof(granny_real32) * 3 +
1443 sizeof(granny_real32) * 3 +
1444 sizeof(granny_int32) +
1445 sizeof(granny_real32 *)));
1446
1447 struct granny_curve_data_d3i1_k16u_c16u
1448 {
1449 granny_curve_data_header CurveDataHeader;
1450 granny_uint16 OneOverKnotScaleTrunc;
1451 granny_real32 ControlScales[3];
1452 granny_real32 ControlOffsets[3];
1453 granny_int32 KnotControlCount;
1454 granny_uint16 * KnotsControls;
1455 } GrannyAlignAttribute;
1456 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3i1_k16u_c16u) == (sizeof(granny_curve_data_header) +
1457 sizeof(granny_uint16) +
1458 sizeof(granny_real32) * 3 +
1459 sizeof(granny_real32) * 3 +
1460 sizeof(granny_int32) +
1461 sizeof(granny_uint16 *)));
1462
1463 struct granny_curve_data_d3i1_k8u_c8u
1464 {
1465 granny_curve_data_header CurveDataHeader;
1466 granny_uint16 OneOverKnotScaleTrunc;
1467 granny_real32 ControlScales[3];
1468 granny_real32 ControlOffsets[3];
1469 granny_int32 KnotControlCount;
1470 granny_uint8 * KnotsControls;
1471 } GrannyAlignAttribute;
1472 GrannyTypeSizeCheck(sizeof(granny_curve_data_d3i1_k8u_c8u) == (sizeof(granny_curve_data_header) +
1473 sizeof(granny_uint16) +
1474 sizeof(granny_real32) * 3 +
1475 sizeof(granny_real32) * 3 +
1476 sizeof(granny_int32) +
1477 sizeof(granny_uint8 *)));
1478
1479 struct granny_curve_builder;
1480
1481 struct granny_material_map
1482 {
1483 char const * Usage;
1484 granny_material * Material;
1485 } GrannyAlignAttribute;
1486 GrannyTypeSizeCheck(sizeof(granny_material_map) == (sizeof(char const *) +
1487 sizeof(granny_material *)));
1488
1489 struct granny_material
1490 {
1491 char const * Name;
1492 granny_int32 MapCount;
1493 granny_material_map * Maps;
1494 granny_texture * Texture;
1495 granny_variant ExtendedData;
1496 } GrannyAlignAttribute;
1497 GrannyTypeSizeCheck(sizeof(granny_material) == (sizeof(char const *) +
1498 sizeof(granny_int32) +
1499 sizeof(granny_material_map *) +
1500 sizeof(granny_texture *) +
1501 sizeof(granny_variant)));
1502
1503 struct granny_pixel_layout
1504 {
1505 granny_int32 BytesPerPixel;
1506 granny_int32 ShiftForComponent[4];
1507 granny_int32 BitsForComponent[4];
1508 } GrannyAlignAttribute;
1509 GrannyTypeSizeCheck(sizeof(granny_pixel_layout) == (sizeof(granny_int32) +
1510 sizeof(granny_int32) * 4 +
1511 sizeof(granny_int32) * 4));
1512
1513 struct granny_animation
1514 {
1515 char const * Name;
1516 granny_real32 Duration;
1517 granny_real32 TimeStep;
1518 granny_real32 Oversampling;
1519 granny_int32 TrackGroupCount;
1520 granny_track_group ** TrackGroups;
1521 } GrannyAlignAttribute;
1522 GrannyTypeSizeCheck(sizeof(granny_animation) == (sizeof(char const *) +
1523 sizeof(granny_real32) +
1524 sizeof(granny_real32) +
1525 sizeof(granny_real32) +
1526 sizeof(granny_int32) +
1527 sizeof(granny_track_group **)));
1528
1529 struct granny_bound_transform_track
1530 {
1531 granny_int16 SourceTrackIndex;
1532 granny_int8 QuaternionMode;
1533 granny_int8 Flags;
1534 granny_transform_track const * SourceTrack;
1535 granny_track_sampler * Sampler;
1536 granny_real32 LODError;
1537 granny_transform LODTransform;
1538 };
1539
1540 struct granny_animation_binding_identifier
1541 {
1542 granny_animation const * Animation;
1543 granny_int32x SourceTrackGroupIndex;
1544 char const * TrackPattern;
1545 char const * BonePattern;
1546 granny_model const * OnModel;
1547 granny_model * FromBasis;
1548 granny_model * ToBasis;
1549 };
1550
1551 struct granny_animation_binding
1552 {
1553 granny_animation_binding_identifier ID;
1554 void * RebasingMemory;
1555 granny_int32x TrackBindingCount;
1556 granny_bound_transform_track * TrackBindings;
1557 granny_animation_binding * Left;
1558 granny_animation_binding * Right;
1559 granny_int32x UsedBy;
1560 granny_animation_binding * PreviousUnused;
1561 granny_animation_binding * NextUnused;
1562 };
1563
1564 struct granny_animation_lod_builder;
1565
1566 struct granny_art_tool_info
1567 {
1568 char const * FromArtToolName;
1569 granny_int32 ArtToolMajorRevision;
1570 granny_int32 ArtToolMinorRevision;
1571 granny_real32 UnitsPerMeter;
1572 granny_triple Origin;
1573 granny_triple RightVector;
1574 granny_triple UpVector;
1575 granny_triple BackVector;
1576 granny_variant ExtendedData;
1577 } GrannyAlignAttribute;
1578 GrannyTypeSizeCheck(sizeof(granny_art_tool_info) == (sizeof(char const *) +
1579 sizeof(granny_int32) +
1580 sizeof(granny_int32) +
1581 sizeof(granny_real32) +
1582 sizeof(granny_triple) +
1583 sizeof(granny_triple) +
1584 sizeof(granny_triple) +
1585 sizeof(granny_triple) +
1586 sizeof(granny_variant)));
1587
1588 struct granny_bspline_solver;
1589
1590 struct granny_bspline_error
1591 {
1592 granny_int32x MaximumSquaredErrorKnotIndex;
1593 granny_int32x MaximumSquaredErrorSampleIndex;
1594 granny_real32 MaximumSquaredError;
1595 granny_real32 AccumulatedSquaredError;
1596 };
1597
1598 struct granny_camera
1599 {
1600 granny_real32 WpOverHp;
1601 granny_real32 WrOverHr;
1602 granny_real32 WwOverHw;
1603 granny_real32 FOVY;
1604 granny_real32 NearClipPlane;
1605 granny_real32 FarClipPlane;
1606 granny_real32 ZRangeEpsilon;
1607 granny_camera_output_z_range OutputZRange;
1608 bool UseQuaternionOrientation;
1609 granny_quad Orientation;
1610 granny_matrix_3x3 OrientationMatrix;
1611 granny_triple Position;
1612 granny_triple ElevAzimRoll;
1613 granny_triple Offset;
1614 granny_matrix_4x4 View4x4;
1615 granny_matrix_4x4 InverseView4x4;
1616 granny_matrix_4x4 Projection4x4;
1617 granny_matrix_4x4 InverseProjection4x4;
1618 };
1619
1620 struct granny_compress_curve_parameters
1621 {
1622 granny_int32x DesiredDegree;
1623 bool AllowDegreeReduction;
1624 bool AllowReductionOnMissedTolerance;
1625 granny_real32 ErrorTolerance;
1626 granny_real32 C0Threshold;
1627 granny_real32 C1Threshold;
1628 granny_data_type_definition ** PossibleCompressionTypes;
1629 granny_int32x PossibleCompressionTypesCount;
1630 granny_data_type_definition * ConstantCompressionType;
1631 granny_data_type_definition * IdentityCompressionType;
1632 granny_real32 const * IdentityVector;
1633 };
1634
1635 struct granny_control;
1636
1637 struct granny_controlled_animation_builder;
1638
1639 struct granny_blend_dag_node;
1640
1641 struct granny_dag_pose_cache;
1642
1643 struct granny_file_data_tree_writer;
1644
1645 struct granny_exporter_info
1646 {
1647 char * ExporterName;
1648 granny_int32 ExporterMajorRevision;
1649 granny_int32 ExporterMinorRevision;
1650 granny_int32 ExporterCustomization;
1651 granny_int32 ExporterBuildNumber;
1652 granny_variant ExtendedData;
1653 } GrannyAlignAttribute;
1654 GrannyTypeSizeCheck(sizeof(granny_exporter_info) == (sizeof(char *) +
1655 sizeof(granny_int32) +
1656 sizeof(granny_int32) +
1657 sizeof(granny_int32) +
1658 sizeof(granny_int32) +
1659 sizeof(granny_variant)));
1660
1661 struct granny_file
1662 {
1663 bool IsByteReversed;
1664 granny_grn_file_header * Header;
1665 granny_grn_file_magic_value * SourceMagicValue;
1666 granny_int32x SectionCount;
1667 void ** Sections;
1668 bool * Marshalled;
1669 bool * IsUserMemory;
1670 void * ConversionBuffer;
1671 };
1672
1673 struct granny_file_location
1674 {
1675 granny_uint32 SectionIndex;
1676 granny_uint32 BufferIndex;
1677 granny_uint32 Offset;
1678 } GrannyAlignAttribute;
1679 GrannyTypeSizeCheck(sizeof(granny_file_location) == (sizeof(granny_uint32) +
1680 sizeof(granny_uint32) +
1681 sizeof(granny_uint32)));
1682
1683 struct granny_file_fixup;
1684
1685 struct granny_file_builder;
1686
1687 struct granny_file_compressor;
1688
1689 struct granny_grn_file_magic_value
1690 {
1691 granny_uint32 MagicValue[4];
1692 granny_uint32 HeaderSize;
1693 granny_uint32 HeaderFormat;
1694 granny_uint32 Reserved[2];
1695 } GrannyAlignAttribute;
1696 GrannyTypeSizeCheck(sizeof(granny_grn_file_magic_value) == (sizeof(granny_uint32) * 4 +
1697 sizeof(granny_uint32) +
1698 sizeof(granny_uint32) +
1699 sizeof(granny_uint32) * 2));
1700
1701 struct granny_grn_reference
1702 {
1703 granny_uint32 SectionIndex;
1704 granny_uint32 Offset;
1705 } GrannyAlignAttribute;
1706 GrannyTypeSizeCheck(sizeof(granny_grn_reference) == (sizeof(granny_uint32) +
1707 sizeof(granny_uint32)));
1708
1709 struct granny_grn_pointer_fixup
1710 {
1711 granny_uint32 FromOffset;
1712 granny_grn_reference To;
1713 } GrannyAlignAttribute;
1714 GrannyTypeSizeCheck(sizeof(granny_grn_pointer_fixup) == (sizeof(granny_uint32) +
1715 sizeof(granny_grn_reference)));
1716
1717 struct granny_grn_mixed_marshalling_fixup
1718 {
1719 granny_uint32 Count;
1720 granny_uint32 Offset;
1721 granny_grn_reference Type;
1722 } GrannyAlignAttribute;
1723 GrannyTypeSizeCheck(sizeof(granny_grn_mixed_marshalling_fixup) == (sizeof(granny_uint32) +
1724 sizeof(granny_uint32) +
1725 sizeof(granny_grn_reference)));
1726
1727 struct granny_grn_section
1728 {
1729 granny_uint32 Format;
1730 granny_uint32 DataOffset;
1731 granny_uint32 DataSize;
1732 granny_uint32 ExpandedDataSize;
1733 granny_uint32 InternalAlignment;
1734 granny_uint32 First16Bit;
1735 granny_uint32 First8Bit;
1736 granny_uint32 PointerFixupArrayOffset;
1737 granny_uint32 PointerFixupArrayCount;
1738 granny_uint32 MixedMarshallingFixupArrayOffset;
1739 granny_uint32 MixedMarshallingFixupArrayCount;
1740 } GrannyAlignAttribute;
1741 GrannyTypeSizeCheck(sizeof(granny_grn_section) == (sizeof(granny_uint32) +
1742 sizeof(granny_uint32) +
1743 sizeof(granny_uint32) +
1744 sizeof(granny_uint32) +
1745 sizeof(granny_uint32) +
1746 sizeof(granny_uint32) +
1747 sizeof(granny_uint32) +
1748 sizeof(granny_uint32) +
1749 sizeof(granny_uint32) +
1750 sizeof(granny_uint32) +
1751 sizeof(granny_uint32)));
1752
1753 struct granny_grn_file_header
1754 {
1755 granny_uint32 Version;
1756 granny_uint32 TotalSize;
1757 granny_uint32 CRC;
1758 granny_uint32 SectionArrayOffset;
1759 granny_uint32 SectionArrayCount;
1760 granny_grn_reference RootObjectTypeDefinition;
1761 granny_grn_reference RootObject;
1762 granny_uint32 TypeTag;
1763 granny_uint32 ExtraTags[GrannyGRNExtraTagCount];
1764 granny_uint32 StringDatabaseCRC;
1765 granny_uint32 ReservedUnused[3];
1766 } GrannyAlignAttribute;
1767 GrannyTypeSizeCheck(sizeof(granny_grn_file_header) == (sizeof(granny_uint32) +
1768 sizeof(granny_uint32) +
1769 sizeof(granny_uint32) +
1770 sizeof(granny_uint32) +
1771 sizeof(granny_uint32) +
1772 sizeof(granny_grn_reference) +
1773 sizeof(granny_grn_reference) +
1774 sizeof(granny_uint32) +
1775 sizeof(granny_uint32) * GrannyGRNExtraTagCount +
1776 sizeof(granny_uint32) +
1777 sizeof(granny_uint32) * 3));
1778
1779 struct granny_file_info
1780 {
1781 granny_art_tool_info * ArtToolInfo;
1782 granny_exporter_info * ExporterInfo;
1783 char const * FromFileName;
1784 granny_int32 TextureCount;
1785 granny_texture ** Textures;
1786 granny_int32 MaterialCount;
1787 granny_material ** Materials;
1788 granny_int32 SkeletonCount;
1789 granny_skeleton ** Skeletons;
1790 granny_int32 VertexDataCount;
1791 granny_vertex_data ** VertexDatas;
1792 granny_int32 TriTopologyCount;
1793 granny_tri_topology ** TriTopologies;
1794 granny_int32 MeshCount;
1795 granny_mesh ** Meshes;
1796 granny_int32 ModelCount;
1797 granny_model ** Models;
1798 granny_int32 TrackGroupCount;
1799 granny_track_group ** TrackGroups;
1800 granny_int32 AnimationCount;
1801 granny_animation ** Animations;
1802 granny_variant ExtendedData;
1803 } GrannyAlignAttribute;
1804 GrannyTypeSizeCheck(sizeof(granny_file_info) == (sizeof(granny_art_tool_info *) +
1805 sizeof(granny_exporter_info *) +
1806 sizeof(char const *) +
1807 sizeof(granny_int32) +
1808 sizeof(granny_texture **) +
1809 sizeof(granny_int32) +
1810 sizeof(granny_material **) +
1811 sizeof(granny_int32) +
1812 sizeof(granny_skeleton **) +
1813 sizeof(granny_int32) +
1814 sizeof(granny_vertex_data **) +
1815 sizeof(granny_int32) +
1816 sizeof(granny_tri_topology **) +
1817 sizeof(granny_int32) +
1818 sizeof(granny_mesh **) +
1819 sizeof(granny_int32) +
1820 sizeof(granny_model **) +
1821 sizeof(granny_int32) +
1822 sizeof(granny_track_group **) +
1823 sizeof(granny_int32) +
1824 sizeof(granny_animation **) +
1825 sizeof(granny_variant)));
1826
1827 struct granny_file_reader
1828 {
1829 char const * SourceFileName;
1830 granny_int32x SourceLineNumber;
1831 granny_close_file_reader_callback * CloseFileReaderCallback;
1832 granny_read_at_most_callback * ReadAtMostCallback;
1833 };
1834
1835 struct granny_file_writer
1836 {
1837 char const * SourceFileName;
1838 granny_int32x SourceLineNumber;
1839 granny_delete_file_writer_callback * DeleteFileWriterCallback;
1840 granny_seek_file_writer_callback * SeekWriterCallback;
1841 granny_write_file_writer_callback * WriteCallback;
1842 granny_begincrc_file_writer_callback * BeginCRCCallback;
1843 granny_endcrc_file_writer_callback * EndCRCCallback;
1844 bool CRCing;
1845 granny_uint32 CRC;
1846 };
1847
1848 struct granny_fixed_allocator_unit
1849 {
1850 granny_fixed_allocator_unit * Next;
1851 };
1852
1853 struct granny_fixed_allocator_block
1854 {
1855 granny_int32x UnitCount;
1856 granny_uint8 * Units;
1857 granny_fixed_allocator_unit * FirstFreeUnit;
1858 granny_fixed_allocator_block * Next;
1859 granny_fixed_allocator_block * Previous;
1860 };
1861
1862 struct granny_fixed_allocator
1863 {
1864 granny_int32x UnitSize;
1865 granny_int32x UnitsPerBlock;
1866 granny_fixed_allocator_block Sentinel;
1867 };
1868
1869 struct granny_box_intersection
1870 {
1871 granny_real32 MinT;
1872 granny_triple MinNormal;
1873 granny_real32 MaxT;
1874 granny_triple MaxNormal;
1875 };
1876
1877 struct granny_triangle_intersection
1878 {
1879 granny_real32 T;
1880 granny_real32 TriangleU;
1881 granny_real32 TriangleV;
1882 granny_triple EdgeU;
1883 granny_triple EdgeV;
1884 bool Backfacing;
1885 };
1886
1887 struct granny_local_pose;
1888
1889 struct granny_log_callback
1890 {
1891 granny_log_function * Function;
1892 void * UserData;
1893 };
1894
1895 struct granny_allocation_header;
1896
1897 struct granny_allocation_information
1898 {
1899 void * Memory;
1900 granny_intaddrx RequestedSize;
1901 granny_intaddrx ActualSize;
1902 char const * SourceFileName;
1903 granny_int32x SourceLineNumber;
1904 };
1905
1906 struct granny_memory_arena;
1907
1908 struct granny_bone_binding
1909 {
1910 char const * BoneName;
1911 granny_triple OBBMin;
1912 granny_triple OBBMax;
1913 granny_int32 TriangleCount;
1914 granny_int32 * TriangleIndices;
1915 } GrannyAlignAttribute;
1916 GrannyTypeSizeCheck(sizeof(granny_bone_binding) == (sizeof(char const *) +
1917 sizeof(granny_triple) +
1918 sizeof(granny_triple) +
1919 sizeof(granny_int32) +
1920 sizeof(granny_int32 *)));
1921
1922 struct granny_material_binding
1923 {
1924 granny_material * Material;
1925 } GrannyAlignAttribute;
1926 GrannyTypeSizeCheck(sizeof(granny_material_binding) == (sizeof(granny_material *)));
1927
1928 struct granny_morph_target
1929 {
1930 char const * ScalarName;
1931 granny_vertex_data * VertexData;
1932 granny_int32 DataIsDeltas;
1933 } GrannyAlignAttribute;
1934 GrannyTypeSizeCheck(sizeof(granny_morph_target) == (sizeof(char const *) +
1935 sizeof(granny_vertex_data *) +
1936 sizeof(granny_int32)));
1937
1938 struct granny_mesh
1939 {
1940 char const * Name;
1941 granny_vertex_data * PrimaryVertexData;
1942 granny_int32 MorphTargetCount;
1943 granny_morph_target * MorphTargets;
1944 granny_tri_topology * PrimaryTopology;
1945 granny_int32 MaterialBindingCount;
1946 granny_material_binding * MaterialBindings;
1947 granny_int32 BoneBindingCount;
1948 granny_bone_binding * BoneBindings;
1949 granny_variant ExtendedData;
1950 } GrannyAlignAttribute;
1951 GrannyTypeSizeCheck(sizeof(granny_mesh) == (sizeof(char const *) +
1952 sizeof(granny_vertex_data *) +
1953 sizeof(granny_int32) +
1954 sizeof(granny_morph_target *) +
1955 sizeof(granny_tri_topology *) +
1956 sizeof(granny_int32) +
1957 sizeof(granny_material_binding *) +
1958 sizeof(granny_int32) +
1959 sizeof(granny_bone_binding *) +
1960 sizeof(granny_variant)));
1961
1962 struct granny_mesh_binding;
1963
1964 struct granny_mesh_builder;
1965
1966 struct granny_mesh_deformer;
1967
1968 struct granny_oodle1_state;
1969
1970 struct granny_periodic_loop
1971 {
1972 granny_real32 Radius;
1973 granny_real32 dAngle;
1974 granny_real32 dZ;
1975 granny_triple BasisX;
1976 granny_triple BasisY;
1977 granny_triple Axis;
1978 } GrannyAlignAttribute;
1979 GrannyTypeSizeCheck(sizeof(granny_periodic_loop) == (sizeof(granny_real32) +
1980 sizeof(granny_real32) +
1981 sizeof(granny_real32) +
1982 sizeof(granny_triple) +
1983 sizeof(granny_triple) +
1984 sizeof(granny_triple)));
1985
1986 struct granny_pointer_hash;
1987
1988 struct granny_bone
1989 {
1990 char const * Name;
1991 granny_int32 ParentIndex;
1992 granny_transform LocalTransform;
1993 granny_matrix_4x4 InverseWorld4x4;
1994 granny_real32 LODError;
1995 granny_variant ExtendedData;
1996 } GrannyAlignAttribute;
1997 GrannyTypeSizeCheck(sizeof(granny_bone) == (sizeof(char const *) +
1998 sizeof(granny_int32) +
1999 sizeof(granny_transform) +
2000 sizeof(granny_matrix_4x4) +
2001 sizeof(granny_real32) +
2002 sizeof(granny_variant)));
2003
2004 struct granny_skeleton
2005 {
2006 char const * Name;
2007 granny_int32 BoneCount;
2008 granny_bone * Bones;
2009 granny_int32 LODType;
2010 } GrannyAlignAttribute;
2011 GrannyTypeSizeCheck(sizeof(granny_skeleton) == (sizeof(char const *) +
2012 sizeof(granny_int32) +
2013 sizeof(granny_bone *) +
2014 sizeof(granny_int32)));
2015
2016 struct granny_skeleton_builder;
2017
2018 struct granny_spu_animation
2019 {
2020 char const * Name;
2021 granny_real32 Duration;
2022 granny_real32 TimeStep;
2023 granny_real32 Oversampling;
2024 granny_int32 TrackGroupCount;
2025 granny_spu_track_group ** TrackGroups;
2026 } GrannyAlignAttribute;
2027 GrannyTypeSizeCheck(sizeof(granny_spu_animation) == (sizeof(char const *) +
2028 sizeof(granny_real32) +
2029 sizeof(granny_real32) +
2030 sizeof(granny_real32) +
2031 sizeof(granny_int32) +
2032 sizeof(granny_spu_track_group ** )));
2033
2034 struct granny_spu_animation_binding_id
2035 {
2036 granny_spu_animation const* Animation;
2037 granny_spu_track_group const* TrackGroup;
2038 granny_model const* Model;
2039 char const * TrackPattern;
2040 char const * BonePattern;
2041 granny_int32 TransformTrackCount;
2042 granny_spu_transform_track * TransformTracks;
2043 granny_int32 CurveByteCount;
2044 granny_uint8 * CurveBytes;
2045 };
2046
2047 struct granny_spu_animation_binding
2048 {
2049 granny_spu_animation_binding_id ID;
2050 granny_int32 TrackNameRemapCount;
2051 granny_int32 * TrackNameRemaps;
2052 granny_spu_animation_binding * Left;
2053 granny_spu_animation_binding * Right;
2054 granny_int32 UsedBy;
2055 granny_spu_animation_binding * PreviousUnused;
2056 granny_spu_animation_binding * NextUnused;
2057 };
2058
2059 struct granny_spu_animation_info
2060 {
2061 granny_int32 SPUAnimationCount;
2062 granny_spu_animation ** SPUAnimations;
2063 granny_variant ExtendedData;
2064 } GrannyAlignAttribute;
2065 GrannyTypeSizeCheck(sizeof(granny_spu_animation_info) == (sizeof(granny_int32) +
2066 sizeof(granny_spu_animation ** ) +
2067 sizeof(granny_variant)));
2068
2069 struct granny_controlled_spu_animation_builder;
2070
2071 struct granny_spu_curve_header_basic
2072 {
2073 granny_uint16 TotalSize;
2074 granny_uint16 CurveType;
2075 granny_uint8 Degree;
2076 granny_uint8 Dimension;
2077 granny_uint16 ReplicationType;
2078 granny_uint16 KnotCount;
2079 granny_uint16 KnotStart;
2080 granny_uint16 ControlStart;
2081 granny_uint16 ControlStride;
2082 } GrannyAlignAttribute;
2083 GrannyTypeSizeCheck(sizeof(granny_spu_curve_header_basic) == (sizeof(granny_uint16) +
2084 sizeof(granny_uint16) +
2085 sizeof(granny_uint8) +
2086 sizeof(granny_uint8) +
2087 sizeof(granny_uint16) +
2088 sizeof(granny_uint16) +
2089 sizeof(granny_uint16) +
2090 sizeof(granny_uint16) +
2091 sizeof(granny_uint16)));
2092
2093 struct granny_spu_curve_header_quantized
2094 {
2095 granny_spu_curve_header_basic BasicHeader;
2096 granny_real32 OneOverKnotScale;
2097 } GrannyAlignAttribute;
2098 GrannyTypeSizeCheck(sizeof(granny_spu_curve_header_quantized) == (sizeof(granny_spu_curve_header_basic) +
2099 sizeof(granny_real32)));
2100
2101 struct granny_spu_curve_header_quantized4n
2102 {
2103 granny_spu_curve_header_basic BasicHeader;
2104 granny_int32 ScaleOffsetTableEntries;
2105 granny_real32 OneOverKnotScale;
2106 } GrannyAlignAttribute;
2107 GrannyTypeSizeCheck(sizeof(granny_spu_curve_header_quantized4n) == (sizeof(granny_spu_curve_header_basic) +
2108 sizeof(granny_int32) +
2109 sizeof(granny_real32)));
2110
2111 struct granny_spu_transform_track
2112 {
2113 granny_uint32 FromNameIndex;
2114 granny_uint32 Flags;
2115 granny_real32 AnimLODValue;
2116 granny_transform LODTransform;
2117 granny_uint32 PosCurveOffset;
2118 granny_uint32 OriCurveOffset;
2119 granny_uint32 SSCurveOffset;
2120 granny_uint32 Reserved;
2121 } GrannyAlignAttribute;
2122 GrannyTypeSizeCheck(sizeof(granny_spu_transform_track) == (sizeof(granny_uint32) +
2123 sizeof(granny_uint32) +
2124 sizeof(granny_real32) +
2125 sizeof(granny_transform) +
2126 sizeof(granny_uint32) +
2127 sizeof(granny_uint32) +
2128 sizeof(granny_uint32) +
2129 sizeof(granny_uint32)));
2130
2131 struct granny_spu_track_group
2132 {
2133 char const * Name;
2134 granny_int32 Flags;
2135 granny_int32 TrackNameCount;
2136 char const** TrackNames;
2137 granny_int32 TransformTrackCount;
2138 granny_spu_transform_track * TransformTracks;
2139 granny_int32 CurveByteCount;
2140 granny_uint8 * CurveBytes;
2141 } GrannyAlignAttribute;
2142 GrannyTypeSizeCheck(sizeof(granny_spu_track_group) == (sizeof(char const *) +
2143 sizeof(granny_int32) +
2144 sizeof(granny_int32) +
2145 sizeof(char const** ) +
2146 sizeof(granny_int32) +
2147 sizeof(granny_spu_transform_track * ) +
2148 sizeof(granny_int32) +
2149 sizeof(granny_uint8 * )));
2150
2151 struct granny_allocated_block;
2152
2153 struct granny_stack_allocator
2154 {
2155 granny_int32x UnitSize;
2156 granny_int32x UnitsPerBlock;
2157 granny_int32x TotalUsedUnitCount;
2158 granny_allocated_block * LastBlock;
2159 granny_int32x MaxUnits;
2160 granny_int32x ActiveBlocks;
2161 granny_int32x MaxActiveBlocks;
2162 granny_allocated_block ** BlockDirectory;
2163 };
2164
2165 struct granny_counter_results
2166 {
2167 char const * Name;
2168 granny_int32x Count;
2169 granny_real64x TotalSeconds;
2170 granny_real64x SecondsWithoutChildren;
2171 granny_real64x TotalCycles;
2172 granny_real64x TotalCyclesWithoutChildren;
2173 granny_int32x PeakCount;
2174 granny_real64x PeakTotalSeconds;
2175 granny_real64x PeakSecondsWithoutChildren;
2176 };
2177
2178 struct granny_animation_binding_cache_status
2179 {
2180 granny_int32x TotalBindingsCreated;
2181 granny_int32x TotalBindingsDestroyed;
2182 granny_int32x DirectAcquireCount;
2183 granny_int32x IndirectAcquireCount;
2184 granny_int32x ReleaseCount;
2185 granny_int32x CurrentTotalBindingCount;
2186 granny_int32x CurrentUsedBindingCount;
2187 granny_int32x CacheHits;
2188 granny_int32x CacheMisses;
2189 granny_int32x ExplicitFlushCount;
2190 granny_int32x ExplicitFlushFrees;
2191 granny_int32x OverflowFrees;
2192 };
2193
2194 struct granny_stat_hud_alloc_point
2195 {
2196 char * SourceFilename;
2197 granny_int32x SourceLineNumber;
2198 granny_intaddrx AllocationCount;
2199 granny_intaddrx BytesRequested;
2200 granny_intaddrx BytesAllocated;
2201 };
2202
2203 struct granny_stat_hud_perf_point
2204 {
2205 char * Name;
2206 granny_int32x Count;
2207 granny_real64x TotalSeconds;
2208 granny_real64x TotalCycles;
2209 };
2210
2211 struct granny_stat_hud_model_instances
2212 {
2213 granny_int32x TotalInstanceCount;
2214 granny_int32x TotalInstancedBoneCount;
2215 granny_int32x TotalUsedModelCount;
2216 granny_int32x MaxInstanceCount;
2217 granny_int32x MaxBoneCount;
2218 granny_int32x MaxInstanceControlCount;
2219 };
2220
2221 struct granny_stat_hud_model_controls
2222 {
2223 granny_int32x TotalControlCount;
2224 granny_int32x ActiveControlCount;
2225 granny_int32x ActiveAndWeightedControlCount;
2226 granny_int32x ActiveAndWeightedButEasedOutControlCount;
2227 granny_int32x CompletableControlCount;
2228 granny_int32x CompletedControlCount;
2229 granny_int32x UnusedControlCount;
2230 granny_real32 MinClockTime;
2231 granny_real32 MaxClockTime;
2232 granny_real32 MinCompletionTime;
2233 granny_real32 MaxCompletionTime;
2234 };
2235
2236 struct granny_stat_hud_footprint
2237 {
2238 granny_intaddrx TotalAllocationCount;
2239 granny_intaddrx TotalBytesRequested;
2240 granny_intaddrx TotalBytesAllocated;
2241 };
2242
2243 struct granny_stat_hud_perf
2244 {
2245 granny_real64x TotalSeconds;
2246 granny_real64x TotalCycles;
2247 };
2248
2249 struct granny_stat_hud_animation_types
2250 {
2251 granny_int32x TotalTrackCount;
2252 granny_int32x TrackTypes[3][3][3][2];
2253 };
2254
2255 struct granny_stat_hud
2256 {
2257 granny_int32x FrameCount;
2258 granny_stat_hud_model_instances ModelInstances;
2259 granny_stat_hud_model_controls Controls;
2260 granny_animation_binding_cache_status AnimBindingCacheStatus;
2261 granny_stat_hud_animation_types AnimTypes;
2262 granny_stat_hud_footprint Footprint;
2263 granny_int32x AllocPointCount;
2264 granny_stat_hud_alloc_point * AllocPoints;
2265 granny_stat_hud_perf Perf;
2266 granny_int32x PerfPointCount;
2267 granny_stat_hud_perf_point * PerfPoints;
2268 };
2269
2270 struct granny_string_database
2271 {
2272 granny_int32 StringCount;
2273 char ** Strings;
2274 granny_uint32 DatabaseCRC;
2275 granny_variant ExtendedData;
2276 } GrannyAlignAttribute;
2277 GrannyTypeSizeCheck(sizeof(granny_string_database) == (sizeof(granny_int32) +
2278 sizeof(char **) +
2279 sizeof(granny_uint32) +
2280 sizeof(granny_variant)));
2281
2282 struct granny_string_table;
2283
2284 struct granny_system_clock
2285 {
2286 granny_uint32 Data[4];
2287 };
2288
2289 struct granny_tangent_frame
2290 {
2291 granny_triple U;
2292 granny_triple V;
2293 granny_triple N;
2294 } GrannyAlignAttribute;
2295 GrannyTypeSizeCheck(sizeof(granny_tangent_frame) == (sizeof(granny_triple) +
2296 sizeof(granny_triple) +
2297 sizeof(granny_triple)));
2298
2299 struct granny_texture_mip_level
2300 {
2301 granny_int32 Stride;
2302 granny_int32 PixelByteCount;
2303 //void * PixelBytes;
2304 unsigned char * PixelBytes;
2305 } GrannyAlignAttribute;
2306 GrannyTypeSizeCheck(sizeof(granny_texture_mip_level) == (sizeof(granny_int32) +
2307 sizeof(granny_int32) +
2308 sizeof(void *)));
2309
2310 struct granny_texture_image
2311 {
2312 granny_int32 MIPLevelCount;
2313 granny_texture_mip_level * MIPLevels;
2314 } GrannyAlignAttribute;
2315 GrannyTypeSizeCheck(sizeof(granny_texture_image) == (sizeof(granny_int32) +
2316 sizeof(granny_texture_mip_level *)));
2317
2318 struct granny_texture
2319 {
2320 char const * FromFileName;
2321 granny_int32 TextureType;
2322 granny_int32 Width;
2323 granny_int32 Height;
2324 granny_int32 Encoding;
2325 granny_int32 SubFormat;
2326 granny_pixel_layout Layout;
2327 granny_int32 ImageCount;
2328 granny_texture_image * Images;
2329 granny_variant ExtendedData;
2330 } GrannyAlignAttribute;
2331 GrannyTypeSizeCheck(sizeof(granny_texture) == (sizeof(char const *) +
2332 sizeof(granny_int32) +
2333 sizeof(granny_int32) +
2334 sizeof(granny_int32) +
2335 sizeof(granny_int32) +
2336 sizeof(granny_int32) +
2337 sizeof(granny_pixel_layout) +
2338 sizeof(granny_int32) +
2339 sizeof(granny_texture_image *) +
2340 sizeof(granny_variant)));
2341
2342 struct granny_texture_builder;
2343
2344 struct granny_vector_track
2345 {
2346 char const * Name;
2347 granny_uint32 TrackKey;
2348 granny_int32 Dimension;
2349 granny_curve2 ValueCurve;
2350 } GrannyAlignAttribute;
2351 GrannyTypeSizeCheck(sizeof(granny_vector_track) == (sizeof(char const *) +
2352 sizeof(granny_uint32) +
2353 sizeof(granny_int32) +
2354 sizeof(granny_curve2)));
2355
2356 struct granny_transform_track
2357 {
2358 char const * Name;
2359 granny_int32 Flags;
2360 granny_curve2 OrientationCurve;
2361 granny_curve2 PositionCurve;
2362 granny_curve2 ScaleShearCurve;
2363 } GrannyAlignAttribute;
2364 GrannyTypeSizeCheck(sizeof(granny_transform_track) == (sizeof(char const *) +
2365 sizeof(granny_int32) +
2366 sizeof(granny_curve2) +
2367 sizeof(granny_curve2) +
2368 sizeof(granny_curve2)));
2369
2370 struct granny_text_track_entry
2371 {
2372 granny_real32 TimeStamp;
2373 char const * Text;
2374 } GrannyAlignAttribute;
2375 GrannyTypeSizeCheck(sizeof(granny_text_track_entry) == (sizeof(granny_real32) +
2376 sizeof(char const *)));
2377
2378 struct granny_text_track
2379 {
2380 char const * Name;
2381 granny_int32 EntryCount;
2382 granny_text_track_entry * Entries;
2383 } GrannyAlignAttribute;
2384 GrannyTypeSizeCheck(sizeof(granny_text_track) == (sizeof(char const *) +
2385 sizeof(granny_int32) +
2386 sizeof(granny_text_track_entry *)));
2387
2388 struct granny_track_group
2389 {
2390 char const * Name;
2391 granny_int32 VectorTrackCount;
2392 granny_vector_track * VectorTracks;
2393 granny_int32 TransformTrackCount;
2394 granny_transform_track * TransformTracks;
2395 granny_int32 TransformLODErrorCount;
2396 granny_real32 * TransformLODErrors;
2397 granny_int32 TextTrackCount;
2398 granny_text_track * TextTracks;
2399 granny_transform InitialPlacement;
2400 granny_int32 Flags;
2401 granny_triple LoopTranslation;
2402 granny_periodic_loop * PeriodicLoop;
2403 granny_transform_track * RootMotion;
2404 granny_variant ExtendedData;
2405 } GrannyAlignAttribute;
2406 GrannyTypeSizeCheck(sizeof(granny_track_group) == (sizeof(char const *) +
2407 sizeof(granny_int32) +
2408 sizeof(granny_vector_track *) +
2409 sizeof(granny_int32) +
2410 sizeof(granny_transform_track *) +
2411 sizeof(granny_int32) +
2412 sizeof(granny_real32 *) +
2413 sizeof(granny_int32) +
2414 sizeof(granny_text_track *) +
2415 sizeof(granny_transform) +
2416 sizeof(granny_int32) +
2417 sizeof(granny_triple) +
2418 sizeof(granny_periodic_loop *) +
2419 sizeof(granny_transform_track *) +
2420 sizeof(granny_variant)));
2421
2422 struct granny_track_group_builder;
2423
2424 struct granny_track_group_sampler;
2425
2426 struct granny_track_mask;
2427
2428 struct granny_unbound_weight
2429 {
2430 char const* Name;
2431 granny_real32 Weight;
2432 } GrannyAlignAttribute;
2433 GrannyTypeSizeCheck(sizeof(granny_unbound_weight) == (sizeof(char const* ) +
2434 sizeof(granny_real32)));
2435
2436 struct granny_unbound_track_mask
2437 {
2438 granny_real32 DefaultWeight;
2439 granny_int32 WeightCount;
2440 granny_unbound_weight * Weights;
2441 } GrannyAlignAttribute;
2442 GrannyTypeSizeCheck(sizeof(granny_unbound_track_mask) == (sizeof(granny_real32) +
2443 sizeof(granny_int32) +
2444 sizeof(granny_unbound_weight * )));
2445
2446 struct granny_sample_context
2447 {
2448 granny_real32 LocalClock;
2449 granny_real32 LocalDuration;
2450 bool UnderflowLoop;
2451 bool OverflowLoop;
2452 granny_int32x FrameIndex;
2453 };
2454
2455 struct granny_tri_material_group
2456 {
2457 granny_int32 MaterialIndex;
2458 granny_int32 TriFirst;
2459 granny_int32 TriCount;
2460 } GrannyAlignAttribute;
2461 GrannyTypeSizeCheck(sizeof(granny_tri_material_group) == (sizeof(granny_int32) +
2462 sizeof(granny_int32) +
2463 sizeof(granny_int32)));
2464
2465 struct granny_tri_annotation_set
2466 {
2467 char const * Name;
2468 granny_data_type_definition * TriAnnotationType;
2469 granny_int32 TriAnnotationCount;
2470 granny_uint8 * TriAnnotations;
2471 granny_int32 IndicesMapFromTriToAnnotation;
2472 granny_int32 TriAnnotationIndexCount;
2473 granny_int32 * TriAnnotationIndices;
2474 } GrannyAlignAttribute;
2475 GrannyTypeSizeCheck(sizeof(granny_tri_annotation_set) == (sizeof(char const *) +
2476 sizeof(granny_data_type_definition *) +
2477 sizeof(granny_int32) +
2478 sizeof(granny_uint8 *) +
2479 sizeof(granny_int32) +
2480 sizeof(granny_int32) +
2481 sizeof(granny_int32 *)));
2482
2483 struct granny_tri_topology
2484 {
2485 granny_int32 GroupCount;
2486 granny_tri_material_group * Groups;
2487 granny_int32 IndexCount;
2488 granny_int32 * Indices;
2489 granny_int32 Index16Count;
2490 granny_uint16 * Indices16;
2491 granny_int32 VertexToVertexCount;
2492 granny_int32 * VertexToVertexMap;
2493 granny_int32 VertexToTriangleCount;
2494 granny_int32 * VertexToTriangleMap;
2495 granny_int32 SideToNeighborCount;
2496 granny_uint32 * SideToNeighborMap;
2497 granny_int32 BonesForTriangleCount;
2498 granny_int32 * BonesForTriangle;
2499 granny_int32 TriangleToBoneCount;
2500 granny_int32 * TriangleToBoneIndices;
2501 granny_int32 TriAnnotationSetCount;
2502 granny_tri_annotation_set * TriAnnotationSets;
2503 } GrannyAlignAttribute;
2504 GrannyTypeSizeCheck(sizeof(granny_tri_topology) == (sizeof(granny_int32) +
2505 sizeof(granny_tri_material_group *) +
2506 sizeof(granny_int32) +
2507 sizeof(granny_int32 *) +
2508 sizeof(granny_int32) +
2509 sizeof(granny_uint16 *) +
2510 sizeof(granny_int32) +
2511 sizeof(granny_int32 *) +
2512 sizeof(granny_int32) +
2513 sizeof(granny_int32 *) +
2514 sizeof(granny_int32) +
2515 sizeof(granny_uint32 *) +
2516 sizeof(granny_int32) +
2517 sizeof(granny_int32 *) +
2518 sizeof(granny_int32) +
2519 sizeof(granny_int32 *) +
2520 sizeof(granny_int32) +
2521 sizeof(granny_tri_annotation_set *)));
2522
2523 struct granny_defined_type
2524 {
2525 granny_int32x UIID;
2526 char * Name;
2527 granny_data_type_definition * Definition;
2528 };
2529
2530 struct granny_variant_builder;
2531
2532 struct granny_vertex_annotation_set
2533 {
2534 char const * Name;
2535 granny_data_type_definition * VertexAnnotationType;
2536 granny_int32 VertexAnnotationCount;
2537 granny_uint8 * VertexAnnotations;
2538 granny_int32 IndicesMapFromVertexToAnnotation;
2539 granny_int32 VertexAnnotationIndexCount;
2540 granny_int32 * VertexAnnotationIndices;
2541 } GrannyAlignAttribute;
2542 GrannyTypeSizeCheck(sizeof(granny_vertex_annotation_set) == (sizeof(char const *) +
2543 sizeof(granny_data_type_definition *) +
2544 sizeof(granny_int32) +
2545 sizeof(granny_uint8 *) +
2546 sizeof(granny_int32) +
2547 sizeof(granny_int32) +
2548 sizeof(granny_int32 *)));
2549
2550 struct granny_vertex_data
2551 {
2552 granny_data_type_definition * VertexType;
2553 granny_int32 VertexCount;
2554 granny_uint8 * Vertices;
2555 granny_int32 VertexComponentNameCount;
2556 char const ** VertexComponentNames;
2557 granny_int32 VertexAnnotationSetCount;
2558 granny_vertex_annotation_set * VertexAnnotationSets;
2559 } GrannyAlignAttribute;
2560 GrannyTypeSizeCheck(sizeof(granny_vertex_data) == (sizeof(granny_data_type_definition *) +
2561 sizeof(granny_int32) +
2562 sizeof(granny_uint8 *) +
2563 sizeof(granny_int32) +
2564 sizeof(char const **) +
2565 sizeof(granny_int32) +
2566 sizeof(granny_vertex_annotation_set *)));
2567
2568 struct granny_p3_vertex
2569 {
2570 granny_real32 Position[3];
2571 } GrannyAlignAttribute;
2572 GrannyTypeSizeCheck(sizeof(granny_p3_vertex) == (sizeof(granny_real32) * 3));
2573
2574 struct granny_pt32_vertex
2575 {
2576 granny_real32 Position[3];
2577 granny_real32 UV[2];
2578 } GrannyAlignAttribute;
2579 GrannyTypeSizeCheck(sizeof(granny_pt32_vertex) == (sizeof(granny_real32) * 3 +
2580 sizeof(granny_real32) * 2));
2581
2582 struct granny_pn33_vertex
2583 {
2584 granny_real32 Position[3];
2585 granny_real32 Normal[3];
2586 } GrannyAlignAttribute;
2587 GrannyTypeSizeCheck(sizeof(granny_pn33_vertex) == (sizeof(granny_real32) * 3 +
2588 sizeof(granny_real32) * 3));
2589
2590 struct granny_png333_vertex
2591 {
2592 granny_real32 Position[3];
2593 granny_real32 Normal[3];
2594 granny_real32 Tangent[3];
2595 } GrannyAlignAttribute;
2596 GrannyTypeSizeCheck(sizeof(granny_png333_vertex) == (sizeof(granny_real32) * 3 +
2597 sizeof(granny_real32) * 3 +
2598 sizeof(granny_real32) * 3));
2599
2600 struct granny_pngt3332_vertex
2601 {
2602 granny_real32 Position[3];
2603 granny_real32 Normal[3];
2604 granny_real32 Tangent[3];
2605 granny_real32 UV[2];
2606 } GrannyAlignAttribute;
2607 GrannyTypeSizeCheck(sizeof(granny_pngt3332_vertex) == (sizeof(granny_real32) * 3 +
2608 sizeof(granny_real32) * 3 +
2609 sizeof(granny_real32) * 3 +
2610 sizeof(granny_real32) * 2));
2611
2612 struct granny_pntg3323_vertex
2613 {
2614 granny_real32 Position[3];
2615 granny_real32 Normal[3];
2616 granny_real32 UV[2];
2617 granny_real32 Tangent[3];
2618 } GrannyAlignAttribute;
2619 GrannyTypeSizeCheck(sizeof(granny_pntg3323_vertex) == (sizeof(granny_real32) * 3 +
2620 sizeof(granny_real32) * 3 +
2621 sizeof(granny_real32) * 2 +
2622 sizeof(granny_real32) * 3));
2623
2624 struct granny_pngb3333_vertex
2625 {
2626 granny_real32 Position[3];
2627 granny_real32 Normal[3];
2628 granny_real32 Tangent[3];
2629 granny_real32 Binormal[3];
2630 } GrannyAlignAttribute;
2631 GrannyTypeSizeCheck(sizeof(granny_pngb3333_vertex) == (sizeof(granny_real32) * 3 +
2632 sizeof(granny_real32) * 3 +
2633 sizeof(granny_real32) * 3 +
2634 sizeof(granny_real32) * 3));
2635
2636 struct granny_pnt332_vertex
2637 {
2638 granny_real32 Position[3];
2639 granny_real32 Normal[3];
2640 granny_real32 UV[2];
2641 } GrannyAlignAttribute;
2642 GrannyTypeSizeCheck(sizeof(granny_pnt332_vertex) == (sizeof(granny_real32) * 3 +
2643 sizeof(granny_real32) * 3 +
2644 sizeof(granny_real32) * 2));
2645
2646 struct granny_pngbt33332_vertex
2647 {
2648 granny_real32 Position[3];
2649 granny_real32 Normal[3];
2650 granny_real32 Tangent[3];
2651 granny_real32 Binormal[3];
2652 granny_real32 UV[2];
2653 } GrannyAlignAttribute;
2654 GrannyTypeSizeCheck(sizeof(granny_pngbt33332_vertex) == (sizeof(granny_real32) * 3 +
2655 sizeof(granny_real32) * 3 +
2656 sizeof(granny_real32) * 3 +
2657 sizeof(granny_real32) * 3 +
2658 sizeof(granny_real32) * 2));
2659
2660 struct granny_pnt333_vertex
2661 {
2662 granny_real32 Position[3];
2663 granny_real32 Normal[3];
2664 granny_real32 UVW[3];
2665 } GrannyAlignAttribute;
2666 GrannyTypeSizeCheck(sizeof(granny_pnt333_vertex) == (sizeof(granny_real32) * 3 +
2667 sizeof(granny_real32) * 3 +
2668 sizeof(granny_real32) * 3));
2669
2670 struct granny_pngbt33333_vertex
2671 {
2672 granny_real32 Position[3];
2673 granny_real32 Normal[3];
2674 granny_real32 Tangent[3];
2675 granny_real32 Binormal[3];
2676 granny_real32 UVW[3];
2677 } GrannyAlignAttribute;
2678 GrannyTypeSizeCheck(sizeof(granny_pngbt33333_vertex) == (sizeof(granny_real32) * 3 +
2679 sizeof(granny_real32) * 3 +
2680 sizeof(granny_real32) * 3 +
2681 sizeof(granny_real32) * 3 +
2682 sizeof(granny_real32) * 3));
2683
2684 struct granny_pwn313_vertex
2685 {
2686 granny_real32 Position[3];
2687 granny_uint32 BoneIndex;
2688 granny_real32 Normal[3];
2689 } GrannyAlignAttribute;
2690 GrannyTypeSizeCheck(sizeof(granny_pwn313_vertex) == (sizeof(granny_real32) * 3 +
2691 sizeof(granny_uint32) +
2692 sizeof(granny_real32) * 3));
2693
2694 struct granny_pwng3133_vertex
2695 {
2696 granny_real32 Position[3];
2697 granny_uint32 BoneIndex;
2698 granny_real32 Normal[3];
2699 granny_real32 Tangent[3];
2700 } GrannyAlignAttribute;
2701 GrannyTypeSizeCheck(sizeof(granny_pwng3133_vertex) == (sizeof(granny_real32) * 3 +
2702 sizeof(granny_uint32) +
2703 sizeof(granny_real32) * 3 +
2704 sizeof(granny_real32) * 3));
2705
2706 struct granny_pwngt31332_vertex
2707 {
2708 granny_real32 Position[3];
2709 granny_uint32 BoneIndex;
2710 granny_real32 Normal[3];
2711 granny_real32 Tangent[3];
2712 granny_real32 UV[2];
2713 } GrannyAlignAttribute;
2714 GrannyTypeSizeCheck(sizeof(granny_pwngt31332_vertex) == (sizeof(granny_real32) * 3 +
2715 sizeof(granny_uint32) +
2716 sizeof(granny_real32) * 3 +
2717 sizeof(granny_real32) * 3 +
2718 sizeof(granny_real32) * 2));
2719
2720 struct granny_pwngb31333_vertex
2721 {
2722 granny_real32 Position[3];
2723 granny_uint32 BoneIndex;
2724 granny_real32 Normal[3];
2725 granny_real32 Tangent[3];
2726 granny_real32 Binormal[3];
2727 } GrannyAlignAttribute;
2728 GrannyTypeSizeCheck(sizeof(granny_pwngb31333_vertex) == (sizeof(granny_real32) * 3 +
2729 sizeof(granny_uint32) +
2730 sizeof(granny_real32) * 3 +
2731 sizeof(granny_real32) * 3 +
2732 sizeof(granny_real32) * 3));
2733
2734 struct granny_pwnt3132_vertex
2735 {
2736 granny_real32 Position[3];
2737 granny_uint32 BoneIndex;
2738 granny_real32 Normal[3];
2739 granny_real32 UV[2];
2740 } GrannyAlignAttribute;
2741 GrannyTypeSizeCheck(sizeof(granny_pwnt3132_vertex) == (sizeof(granny_real32) * 3 +
2742 sizeof(granny_uint32) +
2743 sizeof(granny_real32) * 3 +
2744 sizeof(granny_real32) * 2));
2745
2746 struct granny_pwngbt313332_vertex
2747 {
2748 granny_real32 Position[3];
2749 granny_uint32 BoneIndex;
2750 granny_real32 Normal[3];
2751 granny_real32 Tangent[3];
2752 granny_real32 Binormal[3];
2753 granny_real32 UV[2];
2754 } GrannyAlignAttribute;
2755 GrannyTypeSizeCheck(sizeof(granny_pwngbt313332_vertex) == (sizeof(granny_real32) * 3 +
2756 sizeof(granny_uint32) +
2757 sizeof(granny_real32) * 3 +
2758 sizeof(granny_real32) * 3 +
2759 sizeof(granny_real32) * 3 +
2760 sizeof(granny_real32) * 2));
2761
2762 struct granny_pwn323_vertex
2763 {
2764 granny_real32 Position[3];
2765 granny_uint8 BoneWeights[2];
2766 granny_uint8 BoneIndices[2];
2767 granny_real32 Normal[3];
2768 } GrannyAlignAttribute;
2769 GrannyTypeSizeCheck(sizeof(granny_pwn323_vertex) == (sizeof(granny_real32) * 3 +
2770 sizeof(granny_uint8) * 2 +
2771 sizeof(granny_uint8) * 2 +
2772 sizeof(granny_real32) * 3));
2773
2774 struct granny_pwng3233_vertex
2775 {
2776 granny_real32 Position[3];
2777 granny_uint8 BoneWeights[2];
2778 granny_uint8 BoneIndices[2];
2779 granny_real32 Normal[3];
2780 granny_real32 Tangent[3];
2781 } GrannyAlignAttribute;
2782 GrannyTypeSizeCheck(sizeof(granny_pwng3233_vertex) == (sizeof(granny_real32) * 3 +
2783 sizeof(granny_uint8) * 2 +
2784 sizeof(granny_uint8) * 2 +
2785 sizeof(granny_real32) * 3 +
2786 sizeof(granny_real32) * 3));
2787
2788 struct granny_pwngt32332_vertex
2789 {
2790 granny_real32 Position[3];
2791 granny_uint8 BoneWeights[2];
2792 granny_uint8 BoneIndices[2];
2793 granny_real32 Normal[3];
2794 granny_real32 Tangent[3];
2795 granny_real32 UV[2];
2796 } GrannyAlignAttribute;
2797 GrannyTypeSizeCheck(sizeof(granny_pwngt32332_vertex) == (sizeof(granny_real32) * 3 +
2798 sizeof(granny_uint8) * 2 +
2799 sizeof(granny_uint8) * 2 +
2800 sizeof(granny_real32) * 3 +
2801 sizeof(granny_real32) * 3 +
2802 sizeof(granny_real32) * 2));
2803
2804 struct granny_pwngb32333_vertex
2805 {
2806 granny_real32 Position[3];
2807 granny_uint8 BoneWeights[2];
2808 granny_uint8 BoneIndices[2];
2809 granny_real32 Normal[3];
2810 granny_real32 Tangent[3];
2811 granny_real32 Binormal[3];
2812 } GrannyAlignAttribute;
2813 GrannyTypeSizeCheck(sizeof(granny_pwngb32333_vertex) == (sizeof(granny_real32) * 3 +
2814 sizeof(granny_uint8) * 2 +
2815 sizeof(granny_uint8) * 2 +
2816 sizeof(granny_real32) * 3 +
2817 sizeof(granny_real32) * 3 +
2818 sizeof(granny_real32) * 3));
2819
2820 struct granny_pwnt3232_vertex
2821 {
2822 granny_real32 Position[3];
2823 granny_uint8 BoneWeights[2];
2824 granny_uint8 BoneIndices[2];
2825 granny_real32 Normal[3];
2826 granny_real32 UV[2];
2827 } GrannyAlignAttribute;
2828 GrannyTypeSizeCheck(sizeof(granny_pwnt3232_vertex) == (sizeof(granny_real32) * 3 +
2829 sizeof(granny_uint8) * 2 +
2830 sizeof(granny_uint8) * 2 +
2831 sizeof(granny_real32) * 3 +
2832 sizeof(granny_real32) * 2));
2833
2834 struct granny_pwngbt323332_vertex
2835 {
2836 granny_real32 Position[3];
2837 granny_uint8 BoneWeights[2];
2838 granny_uint8 BoneIndices[2];
2839 granny_real32 Normal[3];
2840 granny_real32 Tangent[3];
2841 granny_real32 Binormal[3];
2842 granny_real32 UV[2];
2843 } GrannyAlignAttribute;
2844 GrannyTypeSizeCheck(sizeof(granny_pwngbt323332_vertex) == (sizeof(granny_real32) * 3 +
2845 sizeof(granny_uint8) * 2 +
2846 sizeof(granny_uint8) * 2 +
2847 sizeof(granny_real32) * 3 +
2848 sizeof(granny_real32) * 3 +
2849 sizeof(granny_real32) * 3 +
2850 sizeof(granny_real32) * 2));
2851
2852 struct granny_pwn343_vertex
2853 {
2854 granny_real32 Position[3];
2855 granny_uint8 BoneWeights[4];
2856 granny_uint8 BoneIndices[4];
2857 granny_real32 Normal[3];
2858 } GrannyAlignAttribute;
2859 GrannyTypeSizeCheck(sizeof(granny_pwn343_vertex) == (sizeof(granny_real32) * 3 +
2860 sizeof(granny_uint8) * 4 +
2861 sizeof(granny_uint8) * 4 +
2862 sizeof(granny_real32) * 3));
2863
2864 struct granny_pwng3433_vertex
2865 {
2866 granny_real32 Position[3];
2867 granny_uint8 BoneWeights[4];
2868 granny_uint8 BoneIndices[4];
2869 granny_real32 Normal[3];
2870 granny_real32 Tangent[3];
2871 } GrannyAlignAttribute;
2872 GrannyTypeSizeCheck(sizeof(granny_pwng3433_vertex) == (sizeof(granny_real32) * 3 +
2873 sizeof(granny_uint8) * 4 +
2874 sizeof(granny_uint8) * 4 +
2875 sizeof(granny_real32) * 3 +
2876 sizeof(granny_real32) * 3));
2877
2878 struct granny_pwngt34332_vertex
2879 {
2880 granny_real32 Position[3];
2881 granny_uint8 BoneWeights[4];
2882 granny_uint8 BoneIndices[4];
2883 granny_real32 Normal[3];
2884 granny_real32 Tangent[3];
2885 granny_real32 UV[2];
2886 } GrannyAlignAttribute;
2887 GrannyTypeSizeCheck(sizeof(granny_pwngt34332_vertex) == (sizeof(granny_real32) * 3 +
2888 sizeof(granny_uint8) * 4 +
2889 sizeof(granny_uint8) * 4 +
2890 sizeof(granny_real32) * 3 +
2891 sizeof(granny_real32) * 3 +
2892 sizeof(granny_real32) * 2));
2893
2894 struct granny_pwngb34333_vertex
2895 {
2896 granny_real32 Position[3];
2897 granny_uint8 BoneWeights[4];
2898 granny_uint8 BoneIndices[4];
2899 granny_real32 Normal[3];
2900 granny_real32 Tangent[3];
2901 granny_real32 Binormal[3];
2902 } GrannyAlignAttribute;
2903 GrannyTypeSizeCheck(sizeof(granny_pwngb34333_vertex) == (sizeof(granny_real32) * 3 +
2904 sizeof(granny_uint8) * 4 +
2905 sizeof(granny_uint8) * 4 +
2906 sizeof(granny_real32) * 3 +
2907 sizeof(granny_real32) * 3 +
2908 sizeof(granny_real32) * 3));
2909
2910 struct granny_pwnt3432_vertex
2911 {
2912 granny_real32 Position[3];
2913 granny_uint8 BoneWeights[4];
2914 granny_uint8 BoneIndices[4];
2915 granny_real32 Normal[3];
2916 granny_real32 UV[2];
2917 } GrannyAlignAttribute;
2918 GrannyTypeSizeCheck(sizeof(granny_pwnt3432_vertex) == (sizeof(granny_real32) * 3 +
2919 sizeof(granny_uint8) * 4 +
2920 sizeof(granny_uint8) * 4 +
2921 sizeof(granny_real32) * 3 +
2922 sizeof(granny_real32) * 2));
2923
2924 struct granny_pwngbt343332_vertex
2925 {
2926 granny_real32 Position[3];
2927 granny_uint8 BoneWeights[4];
2928 granny_uint8 BoneIndices[4];
2929 granny_real32 Normal[3];
2930 granny_real32 Tangent[3];
2931 granny_real32 Binormal[3];
2932 granny_real32 UV[2];
2933 } GrannyAlignAttribute;
2934 GrannyTypeSizeCheck(sizeof(granny_pwngbt343332_vertex) == (sizeof(granny_real32) * 3 +
2935 sizeof(granny_uint8) * 4 +
2936 sizeof(granny_uint8) * 4 +
2937 sizeof(granny_real32) * 3 +
2938 sizeof(granny_real32) * 3 +
2939 sizeof(granny_real32) * 3 +
2940 sizeof(granny_real32) * 2));
2941
2942 struct granny_vertex_weight_arrays
2943 {
2944 granny_real32 BoneWeights[GrannyMaximumWeightCount];
2945 granny_uint32 BoneIndices[GrannyMaximumWeightCount];
2946 } GrannyAlignAttribute;
2947 GrannyTypeSizeCheck(sizeof(granny_vertex_weight_arrays) == (sizeof(granny_real32) * GrannyMaximumWeightCount +
2948 sizeof(granny_uint32) * GrannyMaximumWeightCount));
2949
2950 struct granny_world_pose;
2951
2952 /* granny_transform.h bindings: */
2953 GRANNY_DYNLINK(void) GrannySetTransform(granny_transform * Result,
2954 granny_real32 const * Position3,
2955 granny_real32 const * Orientation4,
2956 granny_real32 const * ScaleShear3x3);
2957 GRANNY_DYNLINK(void) GrannySetTransformWithIdentityCheck(granny_transform * Result,
2958 granny_real32 const * Position3,
2959 granny_real32 const * Orientation4,
2960 granny_real32 const * ScaleShear3x3);
2961 GRANNY_DYNLINK(void) GrannyMakeIdentity(granny_transform * Result);
2962 GRANNY_DYNLINK(void) GrannyZeroTransform(granny_transform * Result);
2963 GRANNY_DYNLINK(granny_real32) GrannyGetTransformDeterminant(granny_transform const * Transform);
2964 GRANNY_DYNLINK(void) GrannyTransformVectorInPlace(granny_real32 * Result,
2965 granny_transform const * Transform);
2966 GRANNY_DYNLINK(void) GrannyTransformVectorInPlaceTransposed(granny_real32 * Result,
2967 granny_transform const * Transform);
2968 GRANNY_DYNLINK(void) GrannyTransformVector(granny_real32 * Dest,
2969 granny_transform const * Transform,
2970 granny_real32 const * Source);
2971 GRANNY_DYNLINK(void) GrannyTransformPointInPlace(granny_real32 * Result,
2972 granny_transform const * Transform);
2973 GRANNY_DYNLINK(void) GrannyTransformPoint(granny_real32 * Dest,
2974 granny_transform const * Transform,
2975 granny_real32 const * Source);
2976 GRANNY_DYNLINK(void) GrannyPreMultiplyBy(granny_transform * Transform,
2977 granny_transform const * PreMult);
2978 GRANNY_DYNLINK(void) GrannyPostMultiplyBy(granny_transform * Transform,
2979 granny_transform const * PostMult);
2980 GRANNY_DYNLINK(void) GrannyMultiply(granny_transform * Result,
2981 granny_transform const * A,
2982 granny_transform const * B);
2983 GRANNY_DYNLINK(void) GrannyLinearBlendTransform(granny_transform * Result,
2984 granny_transform const * A,
2985 granny_real32 t,
2986 granny_transform const * B);
2987 GRANNY_DYNLINK(void) GrannyBuildInverse(granny_transform * Result,
2988 granny_transform const * Source);
2989 GRANNY_DYNLINK(void) GrannySimilarityTransform(granny_transform * Result,
2990 granny_real32 const * Affine3,
2991 granny_real32 const * Linear3x3,
2992 granny_real32 const * InverseLinear3x3);
2993 GRANNY_DYNLINK(void) GrannyBuildCompositeTransform(granny_transform const * Transform,
2994 granny_int32 Stride,
2995 granny_real32 * Composite3x3);
2996 GRANNY_DYNLINK(void) GrannyBuildCompositeTransform4x4(granny_transform const * Transform,
2997 granny_real32 * Composite4x4);
2998 GRANNY_DYNLINK(void) GrannyBuildCompositeTransform4x3(granny_transform const * Transform,
2999 granny_real32 * Composite4x3);
3000
3001 /* granny_model.h bindings: */
3002 GRANNY_DYNLINK(void) GrannyGetModelInitialPlacement4x4(granny_model const * Model,
3003 granny_real32 * Placement4x4);
3004 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyModelMeshBindingType;
3005 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyModelType;
3006
3007 /* granny_model_control_binding.h bindings: */
3008 GRANNY_DYNLINK(granny_model_control_binding *) GrannyModelControlsBegin(granny_model_instance * Model);
3009 GRANNY_DYNLINK(granny_model_control_binding *) GrannyModelControlsNext(granny_model_control_binding * Binding);
3010 GRANNY_DYNLINK(granny_model_control_binding *) GrannyModelControlsEnd(granny_model_instance * Model);
3011 GRANNY_DYNLINK(granny_model_control_binding *) GrannyControlModelsBegin(granny_control * Control);
3012 GRANNY_DYNLINK(granny_model_control_binding *) GrannyControlModelsNext(granny_model_control_binding * Binding);
3013 GRANNY_DYNLINK(granny_model_control_binding *) GrannyControlModelsEnd(granny_control * Control);
3014 GRANNY_DYNLINK(granny_model_instance *) GrannyGetModelInstanceFromBinding(granny_model_control_binding * Binding);
3015 GRANNY_DYNLINK(granny_control *) GrannyGetControlFromBinding(granny_model_control_binding * Binding);
3016
3017 /* granny_model_instance.h bindings: */
3018 GRANNY_DYNLINK(granny_model_instance *) GrannyInstantiateModel(granny_model const * Model);
3019 GRANNY_DYNLINK(void) GrannyFreeModelInstance(granny_model_instance * ModelInstance);
3020 GRANNY_DYNLINK(granny_model *) GrannyGetSourceModel(granny_model_instance const * Model);
3021 GRANNY_DYNLINK(granny_skeleton *) GrannyGetSourceSkeleton(granny_model_instance const * Model);
3022 GRANNY_DYNLINK(void) GrannySetModelClock(granny_model_instance const * ModelInstance,
3023 granny_real32 NewClock);
3024 GRANNY_DYNLINK(void) GrannyFreeCompletedModelControls(granny_model_instance const * ModelInstance);
3025 GRANNY_DYNLINK(void) GrannyAccumulateModelAnimationsLODSparse(granny_model_instance const * ModelInstance,
3026 granny_int32x FirstBone,
3027 granny_int32x BoneCount,
3028 granny_local_pose * Result,
3029 granny_real32 AllowedError,
3030 granny_int32x const * SparseBoneArray);
3031 GRANNY_DYNLINK(void) GrannySampleModelAnimationsLODSparse(granny_model_instance const * ModelInstance,
3032 granny_int32x FirstBone,
3033 granny_int32x BoneCount,
3034 granny_local_pose * Result,
3035 granny_real32 AllowedError,
3036 granny_int32x const * SparseBoneArray);
3037 GRANNY_DYNLINK(bool) GrannySampleSingleModelAnimationLODSparse(granny_model_instance const * ModelInstance,
3038 granny_control const * Control,
3039 granny_int32x FirstBone,
3040 granny_int32x BoneCount,
3041 granny_local_pose * Result,
3042 granny_real32 AllowedError,
3043 granny_int32x const * SparseBoneArray);
3044 GRANNY_DYNLINK(void) GrannySampleModelAnimationsAcceleratedLOD(granny_model_instance const * ModelInstance,
3045 granny_int32x BoneCount,
3046 granny_real32 const * Offset4x4,
3047 granny_local_pose * Scratch,
3048 granny_world_pose * Result,
3049 granny_real32 AllowedError);
3050 GRANNY_DYNLINK(void) GrannyAccumulateModelAnimations(granny_model_instance const * ModelInstance,
3051 granny_int32x FirstBone,
3052 granny_int32x BoneCount,
3053 granny_local_pose * Result);
3054 GRANNY_DYNLINK(void) GrannySampleModelAnimations(granny_model_instance const * ModelInstance,
3055 granny_int32x FirstBone,
3056 granny_int32x BoneCount,
3057 granny_local_pose * Result);
3058 GRANNY_DYNLINK(bool) GrannySampleSingleModelAnimation(granny_model_instance const * ModelInstance,
3059 granny_control const * Control,
3060 granny_int32x FirstBone,
3061 granny_int32x BoneCount,
3062 granny_local_pose * Result);
3063 GRANNY_DYNLINK(void) GrannySampleModelAnimationsAccelerated(granny_model_instance const * ModelInstance,
3064 granny_int32x BoneCount,
3065 granny_real32 const * Offset4x4,
3066 granny_local_pose * Scratch,
3067 granny_world_pose * Result);
3068 GRANNY_DYNLINK(void) GrannyAccumulateModelAnimationsLOD(granny_model_instance const * ModelInstance,
3069 granny_int32x FirstBone,
3070 granny_int32x BoneCount,
3071 granny_local_pose * Result,
3072 granny_real32 AllowedError);
3073 GRANNY_DYNLINK(void) GrannySampleModelAnimationsLOD(granny_model_instance const * ModelInstance,
3074 granny_int32x FirstBone,
3075 granny_int32x BoneCount,
3076 granny_local_pose * Result,
3077 granny_real32 AllowedError);
3078 GRANNY_DYNLINK(bool) GrannySampleSingleModelAnimationLOD(granny_model_instance const * ModelInstance,
3079 granny_control const * Control,
3080 granny_int32x FirstBone,
3081 granny_int32x BoneCount,
3082 granny_local_pose * Result,
3083 granny_real32 AllowedError);
3084 GRANNY_DYNLINK(void) GrannyGetRootMotionVectors(granny_model_instance const * ModelInstance,
3085 granny_real32 SecondsElapsed,
3086 granny_real32 * ResultTranslation3,
3087 granny_real32 * ResultRotation3,
3088 bool Inverse);
3089 GRANNY_DYNLINK(void) GrannyClipRootMotionVectors(granny_real32 const * Translation3,
3090 granny_real32 const * Rotation3,
3091 granny_uint32 AllowableDOFs,
3092 granny_real32 * AllowedTranslation3,
3093 granny_real32 * AllowedRotation3,
3094 granny_real32 * DisallowedTranslation3,
3095 granny_real32 * DisallowedRotation3);
3096 GRANNY_DYNLINK(void) GrannyApplyRootMotionVectorsToMatrix(granny_real32 const * ModelMatrix4x4,
3097 granny_real32 const * Translation3,
3098 granny_real32 const * Rotation3,
3099 granny_real32 * DestMatrix4x4);
3100 GRANNY_DYNLINK(void) GrannyApplyRootMotionVectorsToLocalPose(granny_local_pose * Pose,
3101 granny_real32 const * Translation3,
3102 granny_real32 const * Rotation3);
3103 GRANNY_DYNLINK(void) GrannyUpdateModelMatrix(granny_model_instance const * ModelInstance,
3104 granny_real32 SecondsElapsed,
3105 granny_real32 const * ModelMatrix4x4,
3106 granny_real32 * DestMatrix4x4,
3107 bool Inverse);
3108 GRANNY_DYNLINK(void **) GrannyGetModelUserDataArray(granny_model_instance const * ModelInstance);
3109 GRANNY_DYNLINK(granny_model_instance *) GrannyGetGlobalModelInstancesBegin(void);
3110 GRANNY_DYNLINK(granny_model_instance *) GrannyGetGlobalModelInstancesEnd(void);
3111 GRANNY_DYNLINK(granny_model_instance *) GrannyGetGlobalNextModelInstance(granny_model_instance * Instance);
3112
3113 /* granny_data_type_definition.h bindings: */
3114 GRANNY_DYNLINK(granny_int32x) GrannyGetMemberUnitSize(granny_data_type_definition const * MemberType);
3115 GRANNY_DYNLINK(granny_int32x) GrannyGetMemberTypeSize(granny_data_type_definition const * MemberType);
3116 GRANNY_DYNLINK(granny_int32x) GrannyGetTotalObjectSize(granny_data_type_definition const * TypeDefinition);
3117 GRANNY_DYNLINK(granny_int32x) GrannyGetTotalTypeSize(granny_data_type_definition const * TypeDefinition);
3118 GRANNY_DYNLINK(char const *) GrannyGetMemberTypeName(granny_member_type Type);
3119 GRANNY_DYNLINK(char const *) GrannyGetMemberCTypeName(granny_member_type Type);
3120 GRANNY_DYNLINK(bool) GrannyMemberHasPointers(granny_data_type_definition const * MemberType);
3121 GRANNY_DYNLINK(bool) GrannyTypeHasPointers(granny_data_type_definition const * TypeDefinition);
3122 GRANNY_DYNLINK(granny_uint32) GrannyGetMemberMarshalling(granny_data_type_definition const * MemberType);
3123 GRANNY_DYNLINK(granny_uint32) GrannyGetObjectMarshalling(granny_data_type_definition const * TypeDefinition);
3124 GRANNY_DYNLINK(bool) GrannyIsMixedMarshalling(granny_uint32x Marshalling);
3125 GRANNY_DYNLINK(granny_intaddrx) GrannyMakeEmptyDataTypeMember(granny_data_type_definition const * MemberType,
3126 void * Member);
3127 GRANNY_DYNLINK(granny_intaddrx) GrannyMakeEmptyDataTypeObject(granny_data_type_definition const * TypeDefinition,
3128 void * Object);
3129 GRANNY_DYNLINK(granny_int32x) GrannyGetMemberArrayWidth(granny_data_type_definition const * MemberType);
3130 GRANNY_DYNLINK(granny_int32x) GrannyGetTypeTableCount(granny_data_type_definition const ** TypeTable);
3131 GRANNY_DYNLINK(bool) GrannyDataTypesAreEqual(granny_data_type_definition const * A,
3132 granny_data_type_definition const * B);
3133 GRANNY_DYNLINK(bool) GrannyDataTypesAreEqualWithNames(granny_data_type_definition const * A,
3134 granny_data_type_definition const * B);
3135 GRANNY_DYNLINK(bool) GrannyDataTypesAreEqualWithNameCallback(granny_data_type_definition const * A,
3136 granny_data_type_definition const * B,
3137 granny_string_comparison_callback * Callback);
3138 GRANNY_DYNLINK(granny_data_type_definition *) GrannyDataTypeBeginsWith(granny_data_type_definition const * Type,
3139 granny_data_type_definition const * Prefix);
3140 GRANNY_DYNLINK(void) GrannyReverseTypeArray(granny_data_type_definition const * Type,
3141 granny_int32x Count,
3142 void * TypeArray);
3143 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyEmptyType;
3144 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyStringType;
3145 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyInt16Type;
3146 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyInt32Type;
3147 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyUInt8Type;
3148 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyUInt16Type;
3149 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyUInt32Type;
3150 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyReal32Type;
3151 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTripleType;
3152 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyQuadType;
3153 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTransformType;
3154
3155 /* granny_curve.h bindings: */
3156 GRANNY_DYNLINK(void) GrannyCurveInitializeFormat(granny_curve2 * Curve);
3157 GRANNY_DYNLINK(bool) GrannyCurveFormatIsInitializedCorrectly(granny_curve2 const * Curve,
3158 bool CheckTypes);
3159 GRANNY_DYNLINK(bool) GrannyCurveIsKeyframed(granny_curve2 const * Curve);
3160 GRANNY_DYNLINK(bool) GrannyCurveIsIdentity(granny_curve2 const * Curve);
3161 GRANNY_DYNLINK(bool) GrannyCurveIsConstantOrIdentity(granny_curve2 const * Curve);
3162 GRANNY_DYNLINK(bool) GrannyCurveIsConstantNotIdentity(granny_curve2 const * Curve);
3163 GRANNY_DYNLINK(granny_int32x) GrannyCurveGetKnotCount(granny_curve2 const * Curve);
3164 GRANNY_DYNLINK(granny_int32x) GrannyCurveGetDimension(granny_curve2 const * Curve);
3165 GRANNY_DYNLINK(granny_int32x) GrannyCurveGetDegree(granny_curve2 const * Curve);
3166 GRANNY_DYNLINK(granny_data_type_definition const *) GrannyCurveGetDataTypeDefinition(granny_curve2 const * Curve);
3167 GRANNY_DYNLINK(granny_curve_builder *) GrannyBeginCurve(granny_data_type_definition const * TypeDefinition,
3168 granny_int32x Degree,
3169 granny_int32x Dimension,
3170 granny_int32x KnotCount);
3171 GRANNY_DYNLINK(granny_curve_builder *) GrannyBeginCurveCopy(granny_curve2 const * SourceCurve);
3172 GRANNY_DYNLINK(void) GrannyPushCurveKnotArray(granny_curve_builder * Builder,
3173 granny_real32 const * KnotArray);
3174 GRANNY_DYNLINK(void) GrannyPushCurveControlArray(granny_curve_builder * Builder,
3175 granny_real32 const * ControlArray);
3176 GRANNY_DYNLINK(void) GrannyPushCurveSampleArrays(granny_curve_builder * Builder,
3177 granny_int32x SampleCount,
3178 granny_int32x Dimension,
3179 granny_real32 const * TransformedSamples,
3180 granny_real32 const * OriginalSamples);
3181 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingCurveSize(granny_curve_builder const * Builder);
3182 GRANNY_DYNLINK(granny_curve2 *) GrannyEndCurveInPlace(granny_curve_builder * Builder,
3183 void * Memory);
3184 GRANNY_DYNLINK(granny_curve2 *) GrannyEndCurve(granny_curve_builder * Builder);
3185 GRANNY_DYNLINK(void) GrannyAbortCurveBuilder(granny_curve_builder * Builder);
3186 GRANNY_DYNLINK(void) GrannyFreeCurve(granny_curve2 * Curve);
3187 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingCurveDataSize(granny_curve_builder const * Builder);
3188 GRANNY_DYNLINK(granny_curve2 *) GrannyEndCurveDataInPlace(granny_curve_builder * Builder,
3189 granny_curve2 * Curve,
3190 void * CurveDataMemory);
3191 GRANNY_DYNLINK(bool) GrannyCurveIsTypeDaK32fC32f(granny_curve2 const * SrcCurve);
3192 GRANNY_DYNLINK(granny_curve_data_da_k32f_c32f *) GrannyCurveGetContentsOfDaK32fC32f(granny_curve2 const * SrcCurve);
3193 GRANNY_DYNLINK(granny_curve2 *) GrannyCurveConvertToDaK32fC32f(granny_curve2 const * SrcCurve,
3194 granny_real32 const * IdentityVector);
3195 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingDaK32fC32fCurveSize(granny_curve2 const * SrcCurve);
3196 GRANNY_DYNLINK(granny_curve2 *) GrannyCurveConvertToDaK32fC32fInPlace(granny_curve2 const * SrcCurve,
3197 void * Memory,
3198 granny_real32 const * IdentityVector);
3199 GRANNY_DYNLINK(void) GrannyCurveMakeStaticDaK32fC32f(granny_curve2 * Curve,
3200 granny_curve_data_da_k32f_c32f * CurveData,
3201 granny_int32x KnotCount,
3202 granny_int32x Degree,
3203 granny_int32x Dimension,
3204 granny_real32 const * Knots,
3205 granny_real32 const * Controls);
3206 GRANNY_DYNLINK(granny_real32) GrannyCurveExtractKnotValue(granny_curve2 const * Curve,
3207 granny_int32x KnotIndex,
3208 granny_real32 * ControlResult,
3209 granny_real32 const * IdentityVector);
3210 GRANNY_DYNLINK(void) GrannyCurveExtractKnotValues(granny_curve2 const * Curve,
3211 granny_int32x KnotIndexStart,
3212 granny_int32x KnotCount,
3213 granny_real32 * KnotResults,
3214 granny_real32 * ControlResults,
3215 granny_real32 const * IdentityVector);
3216 GRANNY_DYNLINK(void) GrannyCurveSetAllKnotValues(granny_curve2 * Curve,
3217 granny_int32x KnotCount,
3218 granny_int32x Dimension,
3219 granny_real32 const * KnotSrc,
3220 granny_real32 const * ControlSrc);
3221 GRANNY_DYNLINK(void) GrannyCurveScaleOffsetSwizzle(granny_curve2 * Curve,
3222 granny_int32x Dimension,
3223 granny_real32 const * Scales,
3224 granny_real32 const * Offsets,
3225 granny_int32x const * Swizzles);
3226 GRANNY_DYNLINK(granny_int32x) GrannyCurveFindKnot(granny_curve2 const * Curve,
3227 granny_real32 t);
3228 GRANNY_DYNLINK(granny_int32x) GrannyCurveFindCloseKnot(granny_curve2 const * Curve,
3229 granny_real32 t,
3230 granny_int32x StartingKnotIndex);
3231 GRANNY_DYNLINK(granny_int32) GrannyCurveGetSize(granny_curve2 const * Curve);
3232 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyOldCurveType;
3233 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurve2Type;
3234 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataHeaderType;
3235 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaKeyframes32fType;
3236 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaK32fC32fType;
3237 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaK16uC16uType;
3238 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaK8uC8uType;
3239 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3K16uC16uType;
3240 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3K8uC8uType;
3241 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD4nK16uC15uType;
3242 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD4nK8uC7uType;
3243 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaIdentityType;
3244 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataDaConstant32fType;
3245 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3Constant32fType;
3246 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD4Constant32fType;
3247 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD9I1K16uC16uType;
3248 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD9I3K16uC16uType;
3249 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD9I1K8uC8uType;
3250 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD9I3K8uC8uType;
3251 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3I1K32fC32fType;
3252 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3I1K16uC16uType;
3253 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyCurveDataD3I1K8uC8uType;
3254 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityPosition;
3255 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityNormal;
3256 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityOrientation;
3257 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityScaleShear;
3258 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityScale;
3259 extern GRANNY_DYNLINKDATA(granny_real32 *) GrannyCurveIdentityShear;
3260
3261 /* granny_material.h bindings: */
3262 GRANNY_DYNLINK(granny_texture *) GrannyGetMaterialTextureByType(granny_material const * Material,
3263 granny_material_texture_type Type);
3264 GRANNY_DYNLINK(granny_material *) GrannyGetTexturedMaterialByChannelName(granny_material const * Material,
3265 char const * ChannelName);
3266 GRANNY_DYNLINK(granny_texture *) GrannyGetMaterialTextureByChannelName(granny_material const * Material,
3267 char const * ChannelName);
3268 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyMaterialMapType;
3269 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyMaterialType;
3270
3271 /* granny_pixel_layout.h bindings: */
3272 GRANNY_DYNLINK(bool) GrannyPixelLayoutsAreEqual(granny_pixel_layout const * Operand0,
3273 granny_pixel_layout const * Operand1);
3274 GRANNY_DYNLINK(bool) GrannyPixelLayoutHasAlpha(granny_pixel_layout const * Layout);
3275 GRANNY_DYNLINK(void) GrannySetStockSpecification(granny_pixel_layout * Layout,
3276 granny_int32 const * BitsForComponent,
3277 granny_int32 const * ComponentPlacement);
3278 GRANNY_DYNLINK(void) GrannySetStockRGBASpecification(granny_pixel_layout * Layout,
3279 granny_int32x RedBits,
3280 granny_int32x GreenBits,
3281 granny_int32x BlueBits,
3282 granny_int32x AlphaBits);
3283 GRANNY_DYNLINK(void) GrannySetStockBGRASpecification(granny_pixel_layout * Layout,
3284 granny_int32x RedBits,
3285 granny_int32x GreenBits,
3286 granny_int32x BlueBits,
3287 granny_int32x AlphaBits);
3288 GRANNY_DYNLINK(void) GrannySwapRGBAToBGRA(granny_pixel_layout * Layout);
3289 GRANNY_DYNLINK(void) GrannyConvertPixelFormat(granny_int32x Width,
3290 granny_int32x Height,
3291 granny_pixel_layout const * SourceLayout,
3292 granny_int32x SourceStride,
3293 void const * SourceBits,
3294 granny_pixel_layout const * DestLayout,
3295 granny_int32x DestStride,
3296 void * DestBits);
3297 GRANNY_DYNLINK(void) GrannyARGB8888SwizzleNGC(granny_uint32 Width,
3298 granny_uint32 Height,
3299 granny_uint32 SourceStride,
3300 void * SourceBits,
3301 void * DestBits);
3302 GRANNY_DYNLINK(void) GrannyAll16SwizzleNGC(granny_uint32 Width,
3303 granny_uint32 Height,
3304 granny_uint32 SourceStride,
3305 void * SourceBits,
3306 void * DestBits);
3307 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyPixelLayoutType;
3308 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGB555PixelFormat;
3309 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGB565PixelFormat;
3310 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGBA5551PixelFormat;
3311 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGBA4444PixelFormat;
3312 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGB888PixelFormat;
3313 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyRGBA8888PixelFormat;
3314 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyARGB8888PixelFormat;
3315 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGR555PixelFormat;
3316 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGR565PixelFormat;
3317 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGRA5551PixelFormat;
3318 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGRA4444PixelFormat;
3319 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGR888PixelFormat;
3320 extern GRANNY_DYNLINKDATA(granny_pixel_layout const *) GrannyBGRA8888PixelFormat;
3321
3322 /* granny_animation.h bindings: */
3323 GRANNY_DYNLINK(bool) GrannyFindTrackGroupForModel(granny_animation const * Animation,
3324 char const * ModelName,
3325 granny_int32x * TrackGroupIndex);
3326 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyAnimationType;
3327
3328 /* granny_animation_binding.h bindings: */
3329 GRANNY_DYNLINK(void) GrannyMakeDefaultAnimationBindingID(granny_animation_binding_identifier * ID,
3330 granny_animation const * Animation,
3331 granny_int32x TrackGroupIndex);
3332 GRANNY_DYNLINK(granny_animation_binding *) GrannyAcquireAnimationBindingFromID(granny_animation_binding_identifier * ID);
3333 GRANNY_DYNLINK(granny_animation_binding *) GrannyAcquireAnimationBinding(granny_animation_binding * Binding);
3334 GRANNY_DYNLINK(void) GrannyReleaseAnimationBinding(granny_animation_binding * Binding);
3335 GRANNY_DYNLINK(granny_int32x) GrannyGetMaximumAnimationBindingCount(void);
3336 GRANNY_DYNLINK(void) GrannySetMaximumAnimationBindingCount(granny_int32x BindingCountMax);
3337 GRANNY_DYNLINK(void) GrannyFlushAllUnusedAnimationBindings(void);
3338 GRANNY_DYNLINK(void) GrannyFlushAllBindingsForAnimation(granny_animation const * Animation);
3339 GRANNY_DYNLINK(void) GrannyFlushAnimationBinding(granny_animation_binding * Binding);
3340 GRANNY_DYNLINK(granny_animation_binding *) GrannyGetFirstBindingForAnimation(granny_animation const * Animation);
3341 GRANNY_DYNLINK(granny_animation_binding *) GrannyGetNextBindingForAnimation(granny_animation const * Animation,
3342 granny_animation_binding * Binding);
3343 GRANNY_DYNLINK(granny_animation_binding *) GrannyGetFirstUnusedAnimationBinding(void);
3344 GRANNY_DYNLINK(granny_animation_binding *) GrannyGetNextUnusedAnimationBinding(granny_animation_binding * Binding);
3345 GRANNY_DYNLINK(bool) GrannyIsAnimationUsed(granny_animation const * Animation);
3346 GRANNY_DYNLINK(void) GrannyRemapAnimationBindingPointers(granny_animation_binding * Binding,
3347 granny_animation const * NewAnimationPointer);
3348 GRANNY_DYNLINK(void) GrannyRemapAllAnimationBindingPointers(granny_animation const * OldAnimationPointer,
3349 granny_animation const * NewAnimationPointer);
3350 GRANNY_DYNLINK(void) GrannyGetAnimationBindingCacheStatus(granny_animation_binding_cache_status * Result);
3351 GRANNY_DYNLINK(void) GrannyCalculateLODErrorValues(granny_animation_binding * Binding,
3352 granny_mesh_binding const * MeshBinding,
3353 bool AnimationHasScales,
3354 granny_real32 ManualScaler);
3355 GRANNY_DYNLINK(void) GrannyCalculateLODErrorValuesAllBindings(granny_model_instance * ModelInstance,
3356 granny_mesh_binding const * MeshBinding,
3357 bool AnimationHasScales,
3358 granny_real32 ManualScaler);
3359 GRANNY_DYNLINK(granny_real32) GrannyGetLODErrorValue(granny_animation_binding const * AnimationBinding,
3360 granny_int32x SkeletonBoneIndex);
3361 GRANNY_DYNLINK(void) GrannySetLODErrorValue(granny_animation_binding * AnimationBinding,
3362 granny_int32x SkeletonBoneIndex,
3363 granny_real32 NewError);
3364 GRANNY_DYNLINK(void) GrannyCopyLODErrorValuesToAnimation(granny_animation_binding * Binding,
3365 granny_real32 ManualScaler,
3366 bool OnlyCopyIfGreater);
3367 GRANNY_DYNLINK(void) GrannyCopyLODErrorValuesToAllAnimations(granny_control * Control,
3368 granny_real32 ManualScaler,
3369 bool OnlyCopyIfGreater);
3370 GRANNY_DYNLINK(void) GrannyCopyLODErrorValuesFromAnimation(granny_animation_binding * Binding,
3371 granny_real32 ManualScaler);
3372 GRANNY_DYNLINK(void) GrannyCopyLODErrorValuesFromAllAnimations(granny_control * Control,
3373 granny_real32 ManualScaler);
3374 GRANNY_DYNLINK(void) GrannySetAllLODErrorValues(granny_animation_binding * AnimationBinding,
3375 granny_real32 NewValue);
3376 GRANNY_DYNLINK(void) GrannyResetLODErrorValues(granny_animation_binding * AnimationBinding);
3377 GRANNY_DYNLINK(granny_animation_lod_builder *) GrannyCalculateAnimationLODBegin(granny_animation const * Animation,
3378 granny_real32 ManualScaler);
3379 GRANNY_DYNLINK(void) GrannyCalculateAnimationLODAddMeshBinding(granny_animation_lod_builder * Builder,
3380 granny_model const * Model,
3381 granny_mesh_binding const * MeshBinding,
3382 granny_real32 ManualScaler);
3383 GRANNY_DYNLINK(void) GrannyCalculateAnimationLODEnd(granny_animation_lod_builder * Builder);
3384 GRANNY_DYNLINK(void) GrannyCalculateAnimationLODCleanup(granny_animation_lod_builder * Builder);
3385
3386 /* granny_art_tool_info.h bindings: */
3387 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyArtToolInfoType;
3388
3389 /* granny_basis_conversion.h bindings: */
3390 GRANNY_DYNLINK(bool) GrannyComputeBasisConversion(granny_file_info const * FileInfo,
3391 granny_real32 DesiredUnitsPerMeter,
3392 granny_real32 const * DesiredOrigin3,
3393 granny_real32 const * DesiredRight3,
3394 granny_real32 const * DesiredUp3,
3395 granny_real32 const * DesiredBack3,
3396 granny_real32 * ResultAffine3,
3397 granny_real32 * ResultLinear3x3,
3398 granny_real32 * ResultInverseLinear3x3);
3399 GRANNY_DYNLINK(void) GrannyTransformMesh(granny_mesh * Mesh,
3400 granny_real32 const * Affine3,
3401 granny_real32 const * Linear3x3,
3402 granny_real32 const * InverseLinear3x3,
3403 granny_real32 AffineTolerance,
3404 granny_real32 LinearTolerance,
3405 granny_uint32x Flags);
3406 GRANNY_DYNLINK(void) GrannyTransformSkeleton(granny_skeleton * Skeleton,
3407 granny_real32 const * Affine3,
3408 granny_real32 const * Linear3x3,
3409 granny_real32 const * InverseLinear3x3,
3410 granny_real32 AffineTolerance,
3411 granny_real32 LinearTolerance,
3412 granny_uint32x Flags);
3413 GRANNY_DYNLINK(void) GrannyTransformModel(granny_model * Model,
3414 granny_real32 const * Affine3,
3415 granny_real32 const * Linear3x3,
3416 granny_real32 const * InverseLinear3x3,
3417 granny_real32 AffineTolerance,
3418 granny_real32 LinearTolerance,
3419 granny_uint32x Flags);
3420 GRANNY_DYNLINK(void) GrannyTransformAnimation(granny_animation * Animation,
3421 granny_real32 const * Affine3,
3422 granny_real32 const * Linear3x3,
3423 granny_real32 const * InverseLinear3x3,
3424 granny_real32 AffineTolerance,
3425 granny_real32 LinearTolerance,
3426 granny_uint32x Flags);
3427 GRANNY_DYNLINK(void) GrannyTransformFile(granny_file_info * FileInfo,
3428 granny_real32 const * Affine3,
3429 granny_real32 const * Linear3x3,
3430 granny_real32 const * InverseLinear3x3,
3431 granny_real32 AffineTolerance,
3432 granny_real32 LinearTolerance,
3433 granny_uint32x Flags);
3434 GRANNY_DYNLINK(void) GrannyResortAllAnimationTrackGroups(granny_animation * Animation);
3435 GRANNY_DYNLINK(void) GrannyResortAllFileTrackGroups(granny_file_info * FileInfo);
3436
3437 /* granny_bink.h bindings: */
3438 GRANNY_DYNLINK(granny_pixel_layout const *) GrannyGetBinkPixelLayout(bool Alpha);
3439 GRANNY_DYNLINK(granny_int32x) GrannyGetMaximumBinkImageSize(granny_int32x Width,
3440 granny_int32x Height,
3441 granny_uint32x Flags,
3442 granny_int32x Compression);
3443 GRANNY_DYNLINK(granny_int32x) GrannyBinkCompressTexture(granny_int32x Width,
3444 granny_int32x Height,
3445 granny_int32x SourceStride,
3446 void const * Source,
3447 granny_uint32x Flags,
3448 granny_int32x Compression,
3449 void * Dest);
3450 GRANNY_DYNLINK(void) GrannyBinkDecompressTexture(granny_int32x Width,
3451 granny_int32x Height,
3452 granny_uint32x Flags,
3453 granny_int32x SourceSize,
3454 void const * Source,
3455 granny_pixel_layout const * DestLayout,
3456 granny_int32x DestStride,
3457 void * Dest);
3458
3459 /* granny_bspline.h bindings: */
3460 GRANNY_DYNLINK(void) GrannySampleBSpline0x1(granny_real32 const * ti,
3461 granny_real32 const * pi,
3462 granny_real32 t,
3463 granny_real32 * Result);
3464 GRANNY_DYNLINK(void) GrannySampleBSpline0x2(granny_real32 const * ti,
3465 granny_real32 const * pi,
3466 granny_real32 t,
3467 granny_real32 * Result);
3468 GRANNY_DYNLINK(void) GrannySampleBSpline0x3(granny_real32 const * ti,
3469 granny_real32 const * pi,
3470 granny_real32 t,
3471 granny_real32 * Result);
3472 GRANNY_DYNLINK(void) GrannySampleBSpline0x4(granny_real32 const * ti,
3473 granny_real32 const * pi,
3474 granny_real32 t,
3475 granny_real32 * Result);
3476 GRANNY_DYNLINK(void) GrannySampleBSpline0x9(granny_real32 const * ti,
3477 granny_real32 const * pi,
3478 granny_real32 t,
3479 granny_real32 * Result);
3480 GRANNY_DYNLINK(void) GrannySampleBSpline1x1(granny_real32 const * ti,
3481 granny_real32 const * pi,
3482 granny_real32 t,
3483 granny_real32 * Result);
3484 GRANNY_DYNLINK(void) GrannySampleBSpline1x2(granny_real32 const * ti,
3485 granny_real32 const * pi,
3486 granny_real32 t,
3487 granny_real32 * Result);
3488 GRANNY_DYNLINK(void) GrannySampleBSpline1x3(granny_real32 const * ti,
3489 granny_real32 const * pi,
3490 granny_real32 t,
3491 granny_real32 * Result);
3492 GRANNY_DYNLINK(void) GrannySampleBSpline1x3n(granny_real32 const * ti,
3493 granny_real32 const * pi,
3494 granny_real32 t,
3495 granny_real32 * Result);
3496 GRANNY_DYNLINK(void) GrannySampleBSpline1x4(granny_real32 const * ti,
3497 granny_real32 const * pi,
3498 granny_real32 t,
3499 granny_real32 * Result);
3500 GRANNY_DYNLINK(void) GrannySampleBSpline1x4n(granny_real32 const * ti,
3501 granny_real32 const * pi,
3502 granny_real32 t,
3503 granny_real32 * Result);
3504 GRANNY_DYNLINK(void) GrannySampleBSpline1x9(granny_real32 const * ti,
3505 granny_real32 const * pi,
3506 granny_real32 t,
3507 granny_real32 * Result);
3508 GRANNY_DYNLINK(void) GrannySampleBSpline2x1(granny_real32 const * ti,
3509 granny_real32 const * pi,
3510 granny_real32 t,
3511 granny_real32 * Result);
3512 GRANNY_DYNLINK(void) GrannySampleBSpline2x2(granny_real32 const * ti,
3513 granny_real32 const * pi,
3514 granny_real32 t,
3515 granny_real32 * Result);
3516 GRANNY_DYNLINK(void) GrannySampleBSpline2x3(granny_real32 const * ti,
3517 granny_real32 const * pi,
3518 granny_real32 t,
3519 granny_real32 * Result);
3520 GRANNY_DYNLINK(void) GrannySampleBSpline2x3n(granny_real32 const * ti,
3521 granny_real32 const * pi,
3522 granny_real32 t,
3523 granny_real32 * Result);
3524 GRANNY_DYNLINK(void) GrannySampleBSpline2x4(granny_real32 const * ti,
3525 granny_real32 const * pi,
3526 granny_real32 t,
3527 granny_real32 * Result);
3528 GRANNY_DYNLINK(void) GrannySampleBSpline2x4n(granny_real32 const * ti,
3529 granny_real32 const * pi,
3530 granny_real32 t,
3531 granny_real32 * Result);
3532 GRANNY_DYNLINK(void) GrannySampleBSpline2x9(granny_real32 const * ti,
3533 granny_real32 const * pi,
3534 granny_real32 t,
3535 granny_real32 * Result);
3536 GRANNY_DYNLINK(void) GrannySampleBSpline3x1(granny_real32 const * ti,
3537 granny_real32 const * pi,
3538 granny_real32 t,
3539 granny_real32 * Result);
3540 GRANNY_DYNLINK(void) GrannySampleBSpline3x2(granny_real32 const * ti,
3541 granny_real32 const * pi,
3542 granny_real32 t,
3543 granny_real32 * Result);
3544 GRANNY_DYNLINK(void) GrannySampleBSpline3x3(granny_real32 const * ti,
3545 granny_real32 const * pi,
3546 granny_real32 t,
3547 granny_real32 * Result);
3548 GRANNY_DYNLINK(void) GrannySampleBSpline3x3n(granny_real32 const * ti,
3549 granny_real32 const * pi,
3550 granny_real32 t,
3551 granny_real32 * Result);
3552 GRANNY_DYNLINK(void) GrannySampleBSpline3x4(granny_real32 const * ti,
3553 granny_real32 const * pi,
3554 granny_real32 t,
3555 granny_real32 * Result);
3556 GRANNY_DYNLINK(void) GrannySampleBSpline3x4n(granny_real32 const * ti,
3557 granny_real32 const * pi,
3558 granny_real32 t,
3559 granny_real32 * Result);
3560 GRANNY_DYNLINK(void) GrannySampleBSpline3x9(granny_real32 const * ti,
3561 granny_real32 const * pi,
3562 granny_real32 t,
3563 granny_real32 * Result);
3564 GRANNY_DYNLINK(void) GrannySampleBSpline(granny_int32x Degree,
3565 granny_int32x Dimension,
3566 bool Normalize,
3567 granny_real32 const * ti,
3568 granny_real32 const * pi,
3569 granny_real32 t,
3570 granny_real32 * Result);
3571 GRANNY_DYNLINK(void) GrannyUncheckedSampleBSpline(granny_int32x Degree,
3572 granny_int32x Dimension,
3573 granny_real32 const * ti,
3574 granny_real32 const * pi,
3575 granny_real32 t,
3576 granny_real32 * Result);
3577 GRANNY_DYNLINK(void) GrannyUncheckedSampleBSplineN(granny_int32x Degree,
3578 granny_int32x Dimension,
3579 granny_real32 const * ti,
3580 granny_real32 const * pi,
3581 granny_real32 t,
3582 granny_real32 * Result);
3583
3584 /* granny_bspline_buffers.h bindings: */
3585 GRANNY_DYNLINK(bool) GrannyConstructBSplineBuffers(granny_int32x Dimension,
3586 granny_curve2 const * PrevCurve,
3587 granny_curve2 const * Curve,
3588 granny_curve2 const * NextCurve,
3589 granny_real32 PrevCurveDuration,
3590 granny_real32 CurveDuration,
3591 granny_real32 NextCurveDuration,
3592 granny_int32x KnotIndex,
3593 granny_real32 * ti,
3594 granny_real32 * pi,
3595 granny_real32 ** tiPtr,
3596 granny_real32 ** piPtr,
3597 granny_real32 const * IdentityVector);
3598 GRANNY_DYNLINK(void) GrannyEvaluateCurveAtT(granny_int32x Dimension,
3599 bool Normalize,
3600 bool BackwardsLoop,
3601 granny_curve2 const * Curve,
3602 bool ForwardsLoop,
3603 granny_real32 CurveDuration,
3604 granny_real32 t,
3605 granny_real32 * Result,
3606 granny_real32 const * IdentityVector);
3607 GRANNY_DYNLINK(void) GrannyEvaluateCurveAtKnotIndex(granny_int32x Dimension,
3608 bool Normalize,
3609 bool BackwardsLoop,
3610 granny_curve2 const * Curve,
3611 bool ForwardsLoop,
3612 granny_real32 CurveDuration,
3613 granny_int32x KnotIndex,
3614 granny_real32 t,
3615 granny_real32 * Result,
3616 granny_real32 const * IdentityVector);
3617
3618 /* granny_bspline_solver.h bindings: */
3619 GRANNY_DYNLINK(granny_int32x) GrannyGetMaximumKnotCountForSampleCount(granny_int32x MaxDegree,
3620 granny_int32x MaxSampleCount);
3621 GRANNY_DYNLINK(granny_bspline_solver *) GrannyAllocateBSplineSolver(granny_int32x MaxDegree,
3622 granny_int32x MaxSampleCount,
3623 granny_int32x MaxDimension);
3624 GRANNY_DYNLINK(void) GrannyDeallocateBSplineSolver(granny_bspline_solver * Solver);
3625 GRANNY_DYNLINK(granny_curve2 * ) GrannyFitBSplineToSamples(granny_bspline_solver * Solver,
3626 granny_uint32x SolverFlags,
3627 granny_int32x Degree,
3628 granny_real32 ErrorThreshold,
3629 granny_real32 C0Threshold,
3630 granny_real32 C1Threshold,
3631 granny_real32 const * Samples,
3632 granny_int32x Dimension,
3633 granny_int32x SampleCount,
3634 granny_real32 dT,
3635 granny_data_type_definition const * CurveDataType,
3636 granny_int32x MaximumCurveSizeInBytes,
3637 bool * AchievedTolerance,
3638 granny_int32x * CurveSizeInBytes);
3639 GRANNY_DYNLINK(granny_real32) GrannyOrientationToleranceFromDegrees(granny_real32 Degrees);
3640 GRANNY_DYNLINK(granny_real32) GrannyDegreesFromOrientationTolerance(granny_real32 Tolerance);
3641 GRANNY_DYNLINK(void) GrannyGetSquaredErrorOverCurve(granny_int32x Flags,
3642 granny_int32x Degree,
3643 granny_int32x Dimension,
3644 granny_real32 Duration,
3645 granny_curve2 const * Curve,
3646 granny_int32x SampleCount,
3647 granny_real32 const * Samples,
3648 granny_real32 const * IdentityVector,
3649 granny_bspline_error * Result);
3650
3651 /* granny_camera.h bindings: */
3652 GRANNY_DYNLINK(void) GrannyInitializeDefaultCamera(granny_camera * Camera);
3653 GRANNY_DYNLINK(void) GrannySetCameraAspectRatios(granny_camera * Camera,
3654 granny_real32 PhysicalAspectRatio,
3655 granny_real32 ScreenWidth,
3656 granny_real32 ScreenHeight,
3657 granny_real32 WindowWidth,
3658 granny_real32 WindowHeight);
3659 GRANNY_DYNLINK(void) GrannyMoveCameraRelative(granny_camera * Camera,
3660 granny_real32 X,
3661 granny_real32 Y,
3662 granny_real32 Z);
3663 GRANNY_DYNLINK(void) GrannyBuildCameraMatrices(granny_camera * Camera);
3664 GRANNY_DYNLINK(void) GrannyGetCameraLocation(granny_camera const * Camera,
3665 granny_real32 * Result);
3666 GRANNY_DYNLINK(void) GrannyGetCameraLeft(granny_camera const * Camera,
3667 granny_real32 * Result);
3668 GRANNY_DYNLINK(void) GrannyGetCameraRight(granny_camera const * Camera,
3669 granny_real32 * Result);
3670 GRANNY_DYNLINK(void) GrannyGetCameraUp(granny_camera const * Camera,
3671 granny_real32 * Result);
3672 GRANNY_DYNLINK(void) GrannyGetCameraDown(granny_camera const * Camera,
3673 granny_real32 * Result);
3674 GRANNY_DYNLINK(void) GrannyGetCameraForward(granny_camera const * Camera,
3675 granny_real32 * Result);
3676 GRANNY_DYNLINK(void) GrannyGetCameraBack(granny_camera const * Camera,
3677 granny_real32 * Result);
3678 GRANNY_DYNLINK(void) GrannyWindowSpaceToWorldSpace(granny_camera const * Camera,
3679 granny_real32 Width,
3680 granny_real32 Height,
3681 granny_real32 const * ScreenSpacePoint,
3682 granny_real32 * Result);
3683 GRANNY_DYNLINK(void) GrannyWorldSpaceToWindowSpace(granny_camera const * Camera,
3684 granny_real32 Width,
3685 granny_real32 Height,
3686 granny_real32 const * WorldSpacePoint,
3687 granny_real32 * Result);
3688 GRANNY_DYNLINK(void) GrannyGetPickingRay(granny_camera const * Camera,
3689 granny_real32 Width,
3690 granny_real32 Height,
3691 granny_real32 MouseX,
3692 granny_real32 MouseY,
3693 granny_real32 * Origin,
3694 granny_real32 * Normal);
3695 GRANNY_DYNLINK(void) GrannyGetCameraRelativePlanarBases(granny_camera const * Camera,
3696 bool ScreenOrthogonal,
3697 granny_real32 const * PlaneNormal,
3698 granny_real32 const * PointOnPlane,
3699 granny_real32 * XBasis,
3700 granny_real32 * YBasis);
3701 GRANNY_DYNLINK(granny_real32) GrannyGetMostLikelyPhysicalAspectRatio(granny_int32x ScreenWidth,
3702 granny_int32x ScreenHeight);
3703 GRANNY_DYNLINK(granny_real32) GrannyFindAllowedLODError(granny_real32 ErrorInPixels,
3704 granny_int32x ViewportHeightInPixels,
3705 granny_real32 CameraFOVY,
3706 granny_real32 DistanceFromCamera);
3707
3708 /* granny_compress_curve.h bindings: */
3709 GRANNY_DYNLINK(granny_curve2 *) GrannyCompressCurve(granny_bspline_solver * Solver,
3710 granny_uint32x SolverFlags,
3711 granny_compress_curve_parameters const * Params,
3712 granny_real32 const * Samples,
3713 granny_int32x Dimension,
3714 granny_int32x FrameCount,
3715 granny_real32 dT,
3716 bool * CurveAcheivedTolerance);
3717
3718 /* granny_control.h bindings: */
3719 GRANNY_DYNLINK(granny_control *) GrannyCreateControl(granny_real32 CurrentClock,
3720 granny_real32 LocalDuration);
3721 GRANNY_DYNLINK(void) GrannyFreeControl(granny_control * Control);
3722 GRANNY_DYNLINK(void) GrannyFreeControlOnceUnused(granny_control * Control);
3723 GRANNY_DYNLINK(void) GrannyCompleteControlAt(granny_control * Control,
3724 granny_real32 AtSeconds);
3725 GRANNY_DYNLINK(granny_real32) GrannyGetControlCompletionClock(granny_control const * Control);
3726 GRANNY_DYNLINK(bool) GrannyGetControlCompletionCheckFlag(granny_control const * Control);
3727 GRANNY_DYNLINK(void) GrannySetControlCompletionCheckFlag(granny_control * Control,
3728 bool CheckComplete);
3729 GRANNY_DYNLINK(granny_real32) GrannyGetControlClock(granny_control const * Control);
3730 GRANNY_DYNLINK(void) GrannySetControlClock(granny_control * Control,
3731 granny_real32 NewSeconds);
3732 GRANNY_DYNLINK(void) GrannySetControlClockOnly(granny_control * Control,
3733 granny_real32 NewSeconds);
3734 GRANNY_DYNLINK(bool) GrannyControlIsComplete(granny_control const * Control);
3735 GRANNY_DYNLINK(bool) GrannyFreeControlIfComplete(granny_control * Control);
3736 GRANNY_DYNLINK(granny_real32) GrannyGetControlWeight(granny_control const * Control);
3737 GRANNY_DYNLINK(void) GrannySetControlWeight(granny_control * Control,
3738 granny_real32 Weight);
3739 GRANNY_DYNLINK(granny_track_mask const* ) GrannyGetControlTrackGroupModelMask(granny_control const * Control,
3740 granny_model_instance const* ModelInstance);
3741 GRANNY_DYNLINK(granny_track_mask const* ) GrannyGetControlTrackGroupTrackMask(granny_control const * Control,
3742 granny_animation const* Animation,
3743 granny_int32x TrackGroupIndex);
3744 GRANNY_DYNLINK(granny_int32x) GrannyGetControlLoopCount(granny_control const * Control);
3745 GRANNY_DYNLINK(void) GrannySetControlLoopCount(granny_control * Control,
3746 granny_int32x LoopCount);
3747 GRANNY_DYNLINK(void) GrannyGetControlLoopState(granny_control * Control,
3748 bool * UnderflowLoop,
3749 bool * OverflowLoop);
3750 GRANNY_DYNLINK(granny_int32x) GrannyGetControlLoopIndex(granny_control * Control);
3751 GRANNY_DYNLINK(void) GrannySetControlLoopIndex(granny_control * Control,
3752 granny_int32x LoopIndex);
3753 GRANNY_DYNLINK(granny_real32) GrannyGetControlSpeed(granny_control const * Control);
3754 GRANNY_DYNLINK(void) GrannySetControlSpeed(granny_control * Control,
3755 granny_real32 Speed);
3756 GRANNY_DYNLINK(granny_real32) GrannyGetControlDuration(granny_control const * Control);
3757 GRANNY_DYNLINK(granny_real32) GrannyGetControlDurationLeft(granny_control * Control);
3758 GRANNY_DYNLINK(bool) GrannyControlIsActive(granny_control const * Control);
3759 GRANNY_DYNLINK(void) GrannySetControlActive(granny_control * Control,
3760 bool Active);
3761 GRANNY_DYNLINK(granny_real32) GrannyGetControlClampedLocalClock(granny_control * Control);
3762 GRANNY_DYNLINK(granny_real32) GrannyGetControlLocalDuration(granny_control const * Control);
3763 GRANNY_DYNLINK(granny_real32) GrannyGetControlEaseCurveMultiplier(granny_control const * Control);
3764 GRANNY_DYNLINK(granny_real32) GrannyGetControlEffectiveWeight(granny_control const * Control);
3765 GRANNY_DYNLINK(void) GrannySetControlEaseIn(granny_control * Control,
3766 bool EaseIn);
3767 GRANNY_DYNLINK(void) GrannySetControlEaseInCurve(granny_control * Control,
3768 granny_real32 StartSeconds,
3769 granny_real32 EndSeconds,
3770 granny_real32 StartValue,
3771 granny_real32 StartTangent,
3772 granny_real32 EndTangent,
3773 granny_real32 EndValue);
3774 GRANNY_DYNLINK(void) GrannySetControlEaseOut(granny_control * Control,
3775 bool EaseOut);
3776 GRANNY_DYNLINK(void) GrannySetControlEaseOutCurve(granny_control * Control,
3777 granny_real32 StartSeconds,
3778 granny_real32 EndSeconds,
3779 granny_real32 StartValue,
3780 granny_real32 StartTangent,
3781 granny_real32 EndTangent,
3782 granny_real32 EndValue);
3783 GRANNY_DYNLINK(granny_real32) GrannyGetControlRawLocalClock(granny_control * Control);
3784 GRANNY_DYNLINK(void) GrannySetControlRawLocalClock(granny_control * Control,
3785 granny_real32 LocalClock);
3786 GRANNY_DYNLINK(granny_real32) GrannyEaseControlIn(granny_control * Control,
3787 granny_real32 Duration,
3788 bool FromCurrent);
3789 GRANNY_DYNLINK(granny_real32) GrannyEaseControlOut(granny_control * Control,
3790 granny_real32 Duration);
3791 GRANNY_DYNLINK(void **) GrannyGetControlUserDataArray(granny_control const * Control);
3792 GRANNY_DYNLINK(granny_control *) GrannyGetGlobalControlsBegin(void);
3793 GRANNY_DYNLINK(granny_control *) GrannyGetGlobalControlsEnd(void);
3794 GRANNY_DYNLINK(granny_control *) GrannyGetGlobalNextControl(granny_control * Control);
3795 GRANNY_DYNLINK(void) GrannyRecenterControlClocks(granny_control * Control,
3796 granny_real32 dCurrentClock);
3797 GRANNY_DYNLINK(void) GrannyRecenterAllControlClocks(granny_real32 dCurrentClock);
3798 GRANNY_DYNLINK(void) GrannyRecenterAllModelInstanceControlClocks(granny_model_instance * ModelInstance,
3799 granny_real32 dCurrentClock);
3800 GRANNY_DYNLINK(void) GrannySetControlForceClampedLooping(granny_control * Control,
3801 bool Clamp);
3802 GRANNY_DYNLINK(void) GrannySetControlTargetState(granny_control * Control,
3803 granny_real32 CurrentGlobalTime,
3804 granny_real32 TargetGlobalTime,
3805 granny_real32 LocalTime,
3806 granny_int32x LoopIndex);
3807
3808 /* granny_controlled_animation.h bindings: */
3809 GRANNY_DYNLINK(granny_control *) GrannyPlayControlledAnimation(granny_real32 StartTime,
3810 granny_animation const * Animation,
3811 granny_model_instance * Model);
3812 GRANNY_DYNLINK(granny_control *) GrannyPlayControlledAnimationBinding(granny_real32 StartTime,
3813 granny_animation const * Animation,
3814 granny_animation_binding * Binding,
3815 granny_model_instance * Model);
3816 GRANNY_DYNLINK(granny_controlled_animation_builder *) GrannyBeginControlledAnimation(granny_real32 StartTime,
3817 granny_animation const * Animation);
3818 GRANNY_DYNLINK(granny_control *) GrannyEndControlledAnimation(granny_controlled_animation_builder * Builder);
3819 GRANNY_DYNLINK(void) GrannyUseExistingControlForAnimation(granny_controlled_animation_builder * Builder,
3820 granny_control * Control);
3821 GRANNY_DYNLINK(void) GrannySetTrackMatchRule(granny_controlled_animation_builder * Builder,
3822 granny_int32x TrackGroupIndex,
3823 char const * TrackPattern,
3824 char const * BonePattern);
3825 GRANNY_DYNLINK(void) GrannySetTrackGroupTarget(granny_controlled_animation_builder * Builder,
3826 granny_int32x TrackGroupIndex,
3827 granny_model_instance * Model);
3828 GRANNY_DYNLINK(void) GrannySetTrackGroupBinding(granny_controlled_animation_builder * Builder,
3829 granny_int32x TrackGroupIndex,
3830 granny_animation_binding * Binding);
3831 GRANNY_DYNLINK(void) GrannySetTrackGroupBasisTransform(granny_controlled_animation_builder * Builder,
3832 granny_int32x TrackGroupIndex,
3833 granny_model * FromModel,
3834 granny_model * ToModel);
3835 GRANNY_DYNLINK(void) GrannySetTrackGroupTrackMask(granny_controlled_animation_builder * Builder,
3836 granny_int32x TrackGroupIndex,
3837 granny_track_mask * TrackMask);
3838 GRANNY_DYNLINK(void) GrannySetTrackGroupModelMask(granny_controlled_animation_builder * Builder,
3839 granny_int32x TrackGroupIndex,
3840 granny_track_mask * ModelMask);
3841 GRANNY_DYNLINK(void) GrannySetTrackGroupAccumulation(granny_controlled_animation_builder * Builder,
3842 granny_int32x TrackGroupIndex,
3843 granny_accumulation_mode Mode);
3844 GRANNY_DYNLINK(void) GrannySetTrackGroupLOD(granny_controlled_animation_builder * Builder,
3845 granny_int32x TrackGroupIndex,
3846 bool CopyValuesFromAnimation,
3847 granny_real32 ManualScaler);
3848 GRANNY_DYNLINK(granny_animation_binding *) GrannyGetAnimationBindingFromControlBinding(granny_model_control_binding * Binding);
3849 GRANNY_DYNLINK(granny_real32) GrannyGetGlobalLODFadingFactor(void);
3850 GRANNY_DYNLINK(void) GrannySetGlobalLODFadingFactor(granny_real32 NewValue);
3851
3852 /* granny_controlled_pose.h bindings: */
3853 GRANNY_DYNLINK(granny_control *) GrannyPlayControlledPose(granny_real32 StartTime,
3854 granny_real32 Duration,
3855 granny_local_pose const * Pose,
3856 granny_model_instance * Model,
3857 granny_track_mask * ModelMask);
3858 GRANNY_DYNLINK(granny_local_pose *) GrannyGetLocalPoseFromControlBinding(granny_model_control_binding * Binding);
3859
3860 /* granny_crc.h bindings: */
3861 GRANNY_DYNLINK(void) GrannyBeginCRC32(granny_uint32 * CRC);
3862 GRANNY_DYNLINK(void) GrannyAddToCRC32(granny_uint32 * CRC,
3863 granny_uint32 Count,
3864 void const * UInt8s);
3865 GRANNY_DYNLINK(void) GrannyEndCRC32(granny_uint32 * CRC);
3866
3867 /* granny_dag.h bindings: */
3868 GRANNY_DYNLINK(bool) GrannyIsBlendDagLeafType(granny_blend_dag_node const * Node);
3869 GRANNY_DYNLINK(granny_blend_dag_node_type) GrannyGetBlendDagNodeType(granny_blend_dag_node const * Node);
3870 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeAnimationBlend(granny_model_instance * ModelInstance,
3871 bool AutoFree);
3872 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeLocalPose(granny_local_pose * LocalPose,
3873 bool AutoFree);
3874 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeCallback(granny_blend_dag_leaf_callback_sample_callback * SampleCallback,
3875 granny_blend_dag_leaf_callback_set_clock_callback * SetClockCallback,
3876 granny_blend_dag_leaf_callback_motion_vectors_callback * MotionVectorsCallback,
3877 void * UserData);
3878 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeCrossfade(granny_blend_dag_node * DagNode0,
3879 granny_blend_dag_node * DagNode1,
3880 granny_real32 WeightNone,
3881 granny_real32 WeightAll,
3882 granny_track_mask * TrackMask,
3883 bool AutoFreeTrackMask,
3884 granny_int32x BoneCount);
3885 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeWeightedBlend(granny_skeleton * ReferenceSkeleton,
3886 granny_real32 FillThreshold,
3887 granny_quaternion_mode QuaternionBlendingMode,
3888 granny_int32x BoneCount);
3889 GRANNY_DYNLINK(void) GrannyFreeBlendDagNode(granny_blend_dag_node * Node);
3890 GRANNY_DYNLINK(void) GrannySetBlendDagNodeAnimationBlend(granny_blend_dag_node * Node,
3891 granny_model_instance * ModelInstance,
3892 granny_real32 FillThreshold,
3893 bool AutoFree);
3894 GRANNY_DYNLINK(void) GrannySetBlendDagNodeLocalPose(granny_blend_dag_node * Node,
3895 granny_local_pose * LocalPose,
3896 bool AutoFree);
3897 GRANNY_DYNLINK(void) GrannySetBlendDagNodeCallbacks(granny_blend_dag_node * Node,
3898 granny_blend_dag_leaf_callback_sample_callback * SampleCallback,
3899 granny_blend_dag_leaf_callback_set_clock_callback * SetClockCallback,
3900 granny_blend_dag_leaf_callback_motion_vectors_callback * MotionVectorsCallback,
3901 void * UserData);
3902 GRANNY_DYNLINK(void) GrannySetBlendDagNodeCrossfade(granny_blend_dag_node * Node,
3903 granny_real32 WeightNone,
3904 granny_real32 WeightAll,
3905 granny_track_mask * TrackMask,
3906 bool AutoFreeTrackMask);
3907 GRANNY_DYNLINK(void) GrannySetBlendDagNodeCrossfadeWeights(granny_blend_dag_node * Node,
3908 granny_real32 WeightNone,
3909 granny_real32 WeightAll);
3910 GRANNY_DYNLINK(void) GrannySetBlendDagNodeWeightedBlend(granny_blend_dag_node * Node,
3911 granny_skeleton * ReferenceSkeleton,
3912 granny_real32 FillThreshold,
3913 granny_quaternion_mode QuaternionBlendingMode);
3914 GRANNY_DYNLINK(granny_model_instance *) GrannyGetBlendDagNodeAnimationBlend(granny_blend_dag_node * Node);
3915 GRANNY_DYNLINK(granny_local_pose *) GrannyGetBlendDagNodeLocalPose(granny_blend_dag_node * Node);
3916 GRANNY_DYNLINK(granny_blend_dag_leaf_callback_sample_callback *) GrannyGetBlendDagNodeCallbackSampleCallback(granny_blend_dag_node * Node);
3917 GRANNY_DYNLINK(granny_blend_dag_leaf_callback_set_clock_callback *) GrannyGetBlendDagNodeCallbackSetClockCallback(granny_blend_dag_node * Node);
3918 GRANNY_DYNLINK(granny_blend_dag_leaf_callback_motion_vectors_callback *) GrannyGetBlendDagNodeCallbackMotionVectorsCallback(granny_blend_dag_node * Node);
3919 GRANNY_DYNLINK(void *) GrannyGetBlendDagNodeCallbackUserData(granny_blend_dag_node * Node);
3920 GRANNY_DYNLINK(granny_track_mask *) GrannyGetBlendDagNodeCrossfadeTrackMask(granny_blend_dag_node * Node);
3921 GRANNY_DYNLINK(bool) GrannyGetBlendDagNodeCrossfadeWeights(granny_blend_dag_node const * Node,
3922 granny_real32 * WeightNone,
3923 granny_real32 * WeightAll);
3924 GRANNY_DYNLINK(granny_skeleton *) GrannyGetBlendDagNodeWeightedBlendSkeleton(granny_blend_dag_node * Node);
3925 GRANNY_DYNLINK(void) GrannyBlendDagNodeAnimationBlendFreeCompletedControls(granny_blend_dag_node * Node);
3926 GRANNY_DYNLINK(void) GrannyClearBlendDagNodeChildren(granny_blend_dag_node * Node);
3927 GRANNY_DYNLINK(granny_int32x) GrannyGetBlendDagNodeChildrenCount(granny_blend_dag_node const * Node);
3928 GRANNY_DYNLINK(void) GrannySetBlendDagNodeChildren(granny_blend_dag_node * Node,
3929 granny_int32x NumChildren,
3930 granny_blend_dag_node ** ArrayOfChildren);
3931 GRANNY_DYNLINK(void) GrannySetBlendDagNodeChild(granny_blend_dag_node * Node,
3932 granny_int32x ChildNumber,
3933 granny_blend_dag_node * Child);
3934 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyGetBlendDagNodeChild(granny_blend_dag_node * Node,
3935 granny_int32x ChildNumber);
3936 GRANNY_DYNLINK(void) GrannyAddBlendDagNodeChild(granny_blend_dag_node * Node,
3937 granny_blend_dag_node * Child);
3938 GRANNY_DYNLINK(void) GrannyRemoveBlendDagNodeChild(granny_blend_dag_node * Node,
3939 granny_blend_dag_node * Child);
3940 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyGetBlendDagNodeParent(granny_blend_dag_node * Node);
3941 GRANNY_DYNLINK(void) GrannySetBlendDagNodeResultTrackMask(granny_blend_dag_node * Node,
3942 granny_track_mask * TrackMask,
3943 bool AutoFree);
3944 GRANNY_DYNLINK(granny_track_mask *) GrannyGetBlendDagNodeResultTrackMask(granny_blend_dag_node * Node);
3945 GRANNY_DYNLINK(void) GrannySetBlendDagNodeResultWeight(granny_blend_dag_node * Node,
3946 granny_real32 Weight);
3947 GRANNY_DYNLINK(granny_real32) GrannyGetBlendDagNodeResultWeight(granny_blend_dag_node const * Node);
3948 GRANNY_DYNLINK(void) GrannyGetBlendDagTreeMotionVectors(granny_blend_dag_node const * Node,
3949 granny_real32 SecondsElapsed,
3950 granny_real32 * ResultTranslation,
3951 granny_real32 * ResultRotation,
3952 bool Inverse);
3953 GRANNY_DYNLINK(void) GrannyUpdateBlendDagTreeMatrix(granny_blend_dag_node const * Node,
3954 granny_real32 SecondsElapsed,
3955 granny_real32 const * ModelMatrix4x4,
3956 granny_real32 * DestMatrix4x4,
3957 bool Inverse);
3958 GRANNY_DYNLINK(void) GrannyPrimeBlendDagLocalPoseCache(granny_int32x MaxNumBones,
3959 granny_int32x MaxTreeDepth);
3960 GRANNY_DYNLINK(void) GrannyFreeBlendDagLocalPoseCache(void);
3961 GRANNY_DYNLINK(granny_dag_pose_cache *) GrannyCreateDagPoseCache(granny_int32x InitNumBones,
3962 granny_int32x InitTreeDepth);
3963 GRANNY_DYNLINK(void) GrannyFreeDagPoseCache(granny_dag_pose_cache * Cache);
3964 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTreeLODSparseReentrant(granny_blend_dag_node const * RootNode,
3965 granny_int32x BoneCount,
3966 granny_real32 AllowedError,
3967 granny_int32x const * SparseBoneArray,
3968 granny_dag_pose_cache * PoseCache);
3969 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTreeLODSparse(granny_blend_dag_node const * RootNode,
3970 granny_int32x BoneCount,
3971 granny_real32 AllowedError,
3972 granny_int32x const * SparseBoneArray);
3973 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTree(granny_blend_dag_node const * RootNode,
3974 granny_int32x BoneCount);
3975 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTreeLOD(granny_blend_dag_node const * RootNode,
3976 granny_int32x BoneCount,
3977 granny_real32 AllowedError);
3978 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTreeReentrant(granny_blend_dag_node const * RootNode,
3979 granny_int32x BoneCount,
3980 granny_dag_pose_cache * PoseCache);
3981 GRANNY_DYNLINK(granny_local_pose *) GrannySampleBlendDagTreeLODReentrant(granny_blend_dag_node const * RootNode,
3982 granny_int32x BoneCount,
3983 granny_real32 AllowedError,
3984 granny_dag_pose_cache * PoseCache);
3985 GRANNY_DYNLINK(void) GrannySetBlendDagTreeClock(granny_blend_dag_node * RootNode,
3986 granny_real32 NewClock);
3987 GRANNY_DYNLINK(void) GrannyGetBlendDagNodeChildren(granny_blend_dag_node * Node,
3988 granny_int32x MaxArraySize,
3989 granny_blend_dag_node ** ArrayOfChildren);
3990 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyCreateBlendDagNodeWeightedBlendChildren(granny_skeleton * ReferenceSkeleton,
3991 granny_real32 FillThreshold,
3992 granny_quaternion_mode QuaternionBlendingMode,
3993 granny_int32x BoneCount,
3994 granny_int32x NumChildren,
3995 granny_blend_dag_node ** ArrayOfChildren);
3996 GRANNY_DYNLINK(void) GrannyFreeBlendDagEntireTree(granny_blend_dag_node * RootNode);
3997 GRANNY_DYNLINK(void) GrannyBlendDagFreeCompletedControlsEntireTree(granny_blend_dag_node * Node);
3998 GRANNY_DYNLINK(granny_blend_dag_node *) GrannyDuplicateBlendDagTree(granny_blend_dag_node const * SourceTreeRoot,
3999 granny_blend_dag_node const ** SourceNodeList,
4000 granny_blend_dag_node ** DestNodeList,
4001 granny_int32 SizeOfNodeList,
4002 bool AutoFreeCreatedModelInstances);
4003 GRANNY_DYNLINK(bool) GrannyIsBlendDagNodeValid(granny_blend_dag_node const * Node,
4004 char ** ReasonFailed,
4005 granny_blend_dag_node const ** NodeFailed);
4006 GRANNY_DYNLINK(bool) GrannyIsBlendDagTreeValid(granny_blend_dag_node const * RootNode,
4007 char ** ReasonFailed,
4008 granny_blend_dag_node const ** NodeFailed);
4009 GRANNY_DYNLINK(granny_int32x) GrannyFindBlendDagTreeDepth(granny_blend_dag_node const * RootNode);
4010
4011 /* granny_data_type_conversion.h bindings: */
4012 GRANNY_DYNLINK(bool) GrannyFindMatchingMember(granny_data_type_definition const * SourceType,
4013 void const * SourceObject,
4014 char const * DestMemberName,
4015 granny_variant * Result);
4016 GRANNY_DYNLINK(void) GrannyConvertSingleObject(granny_data_type_definition const * SourceType,
4017 void const * SourceObject,
4018 granny_data_type_definition const * DestType,
4019 void * DestObject);
4020 GRANNY_DYNLINK(void) GrannyMergeSingleObject(granny_data_type_definition const * SourceType,
4021 void const * SourceObject,
4022 granny_data_type_definition const * DestType,
4023 void * DestObject);
4024 GRANNY_DYNLINK(void *) GrannyConvertTree(granny_data_type_definition const * SourceType,
4025 void const * SourceTree,
4026 granny_data_type_definition const * DestType);
4027 GRANNY_DYNLINK(granny_int32x) GrannyGetConvertedTreeSize(granny_data_type_definition const * SourceType,
4028 void const * SourceTree,
4029 granny_data_type_definition const * DestType);
4030 GRANNY_DYNLINK(void *) GrannyConvertTreeInPlace(granny_data_type_definition const * SourceType,
4031 void const * SourceTree,
4032 granny_data_type_definition const * DestType,
4033 void * Memory);
4034 GRANNY_DYNLINK(bool) GrannyRebasePointers(granny_data_type_definition const * Type,
4035 void * Data,
4036 granny_intaddrx Offset,
4037 bool RebaseStrings);
4038 GRANNY_DYNLINK(bool) GrannyRebasePointersStringCallback(granny_data_type_definition const * Type,
4039 void * Data,
4040 granny_intaddrx Offset,
4041 granny_rebase_pointers_string_callback * Callback,
4042 void * CallbackData);
4043
4044 /* granny_data_type_io.h bindings: */
4045 GRANNY_DYNLINK(granny_file_data_tree_writer *) GrannyBeginFileDataTreeWriting(granny_data_type_definition const * RootObjectTypeDefinition,
4046 void * RootObject,
4047 granny_int32x DefaultTypeSectionIndex,
4048 granny_int32x DefaultObjectSectionIndex);
4049 GRANNY_DYNLINK(void) GrannyPreserveObjectFileSections(granny_file_data_tree_writer * Writer,
4050 granny_file const * SourceFile);
4051 GRANNY_DYNLINK(void) GrannyEndFileDataTreeWriting(granny_file_data_tree_writer * Writer);
4052 GRANNY_DYNLINK(void) GrannySetFileDataTreeFlags(granny_file_data_tree_writer * Writer,
4053 granny_uint32x Flags);
4054 GRANNY_DYNLINK(void) GrannySetFileSectionForObjectsOfType(granny_file_data_tree_writer * Writer,
4055 granny_data_type_definition const * Type,
4056 granny_int32x SectionIndex);
4057 GRANNY_DYNLINK(void) GrannySetFileSectionForObject(granny_file_data_tree_writer * Writer,
4058 void const * Object,
4059 granny_int32x SectionIndex);
4060 GRANNY_DYNLINK(bool) GrannyWriteDataTreeToFileBuilder(granny_file_data_tree_writer * Writer,
4061 granny_file_builder * Builder);
4062 GRANNY_DYNLINK(bool) GrannyWriteDataTreeToFile(granny_file_data_tree_writer * Writer,
4063 granny_uint32 FileTypeTag,
4064 granny_grn_file_magic_value const * PlatformMagicValue,
4065 char const * FileName,
4066 granny_int32x FileSectionCount);
4067 GRANNY_DYNLINK(void) GrannySetFileWriterStringCallback(granny_file_data_tree_writer * Writer,
4068 granny_file_writer_string_callback * Callback,
4069 void * Data);
4070
4071 /* granny_degree_of_freedom.h bindings: */
4072 GRANNY_DYNLINK(bool) GrannyClipPositionDOFs(granny_real32 * Position,
4073 granny_uint32x AllowedDOFs);
4074 GRANNY_DYNLINK(bool) GrannyClipAngularVelocityDOFs(granny_real32 * Orientation,
4075 granny_uint32x AllowedDOFs);
4076 GRANNY_DYNLINK(bool) GrannyClipOrientationDOFs(granny_real32 * Orientation,
4077 granny_uint32x AllowedDOFs);
4078 GRANNY_DYNLINK(void) GrannyClipTransformDOFs(granny_transform * Result,
4079 granny_uint32x AllowedDOFs);
4080
4081 /* granny_exporter_info.h bindings: */
4082 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyExporterInfoType;
4083
4084 /* granny_file.h bindings: */
4085 GRANNY_DYNLINK(bool) GrannyFileCRCIsValid(char const * FileName);
4086 GRANNY_DYNLINK(granny_file *) GrannyReadEntireFile(char const * FileName);
4087 GRANNY_DYNLINK(granny_file *) GrannyReadEntireFileFromMemory(granny_int32x MemorySize,
4088 void * Memory);
4089 GRANNY_DYNLINK(granny_file *) GrannyReadEntireFileFromReader(granny_file_reader * Reader);
4090 GRANNY_DYNLINK(granny_file *) GrannyReadPartialFileFromReader(granny_file_reader * Reader);
4091 GRANNY_DYNLINK(void) GrannyFreeFileSection(granny_file * File,
4092 granny_int32x SectionIndex);
4093 GRANNY_DYNLINK(void) GrannyFreeAllFileSections(granny_file * File);
4094 GRANNY_DYNLINK(bool) GrannyReadFileSection(granny_file_reader * Reader,
4095 granny_file * File,
4096 granny_int32x SectionIndex);
4097 GRANNY_DYNLINK(bool) GrannyReadFileSectionInPlace(granny_file_reader * Reader,
4098 granny_file * File,
4099 granny_int32x SectionIndex,
4100 void * Memory);
4101 GRANNY_DYNLINK(void) GrannyFixupFileSectionPhase1(granny_file * File,
4102 granny_int32x SectionIndex,
4103 granny_grn_pointer_fixup const* PointerFixupArray);
4104 GRANNY_DYNLINK(bool) GrannyFixupFileSectionPhase2(granny_file_reader * Reader,
4105 granny_file * File,
4106 granny_int32x SectionIndex,
4107 granny_grn_pointer_fixup const* PointerFixupArray);
4108 GRANNY_DYNLINK(bool) GrannyLoadFixupArray(granny_file_reader * Reader,
4109 granny_grn_section const * Section,
4110 bool FileIsByteReversed,
4111 granny_grn_pointer_fixup ** Array);
4112 GRANNY_DYNLINK(void) GrannyFreeFile(granny_file * File);
4113 GRANNY_DYNLINK(granny_int32x) GrannyGetFileSectionOfLoadedObject(granny_file const * File,
4114 void const * Object);
4115 GRANNY_DYNLINK(void) GrannyGetDataTreeFromFile(granny_file const * File,
4116 granny_variant * Result);
4117 GRANNY_DYNLINK(granny_uint32) GrannyGetFileTypeTag(granny_file const * File);
4118 GRANNY_DYNLINK(bool) GrannyRecompressFile(char const * SourceFile,
4119 char const * DestFile,
4120 granny_int32x CompressorMappingCount,
4121 granny_int32x const * CompressorMapping);
4122 GRANNY_DYNLINK(bool) GrannyConvertFileInfoToRaw(granny_file_info * SourceFileInfo,
4123 char const * DestFileName);
4124 GRANNY_DYNLINK(bool) GrannyConvertFileToRaw(char const * SourceFileName,
4125 char const * DestFileName);
4126 GRANNY_DYNLINK(bool) GrannyPlatformConvertReaderToWriter(granny_file_reader * SourceReader,
4127 granny_file_writer * DestWriter,
4128 granny_grn_file_magic_value const * DestMagicValue,
4129 bool ExcludeTypeTree);
4130 GRANNY_DYNLINK(granny_uint32) GrannyGetInMemoryFileCRC(granny_file * File);
4131
4132 /* granny_file_builder.h bindings: */
4133 GRANNY_DYNLINK(granny_file_builder *) GrannyBeginFile(granny_int32x SectionCount,
4134 granny_uint32 FileTypeTag,
4135 granny_grn_file_magic_value const * PlatformMagicValue,
4136 char const * TemporaryDirectory,
4137 char const * TemporaryFileNameRoot);
4138 GRANNY_DYNLINK(granny_file_builder *) GrannyBeginFileInMemory(granny_int32x SectionCount,
4139 granny_uint32 FileTypeTag,
4140 granny_grn_file_magic_value const * PlatformMagicValue,
4141 granny_int32x MemoryBlockSize);
4142 GRANNY_DYNLINK(bool) GrannyEndFile(granny_file_builder * Builder,
4143 char const * FileName);
4144 GRANNY_DYNLINK(bool) GrannyEndFileToWriter(granny_file_builder * Builder,
4145 granny_file_writer * ToFile);
4146 GRANNY_DYNLINK(bool) GrannyEndFileRaw(granny_file_builder * Builder,
4147 char const * FileName);
4148 GRANNY_DYNLINK(bool) GrannyEndFileRawToWriter(granny_file_builder * Builder,
4149 granny_file_writer * ToFile);
4150 GRANNY_DYNLINK(void) GrannyAbortFile(granny_file_builder * Builder);
4151 GRANNY_DYNLINK(void) GrannySetFileSectionFormat(granny_file_builder * Builder,
4152 granny_int32x SectionIndex,
4153 granny_compression_type Compression,
4154 granny_int32x Alignment);
4155 GRANNY_DYNLINK(void) GrannyPreserveFileSectionFormats(granny_file_builder * Builder,
4156 granny_file const * SourceFile);
4157 GRANNY_DYNLINK(void) GrannyWriteFileChunk(granny_file_builder * Builder,
4158 granny_int32x InSectionIndex,
4159 granny_uint32 Marshalling,
4160 granny_uint32x Size,
4161 void const * Data,
4162 granny_file_location * Result);
4163 GRANNY_DYNLINK(void) GrannyOffsetFileLocation(granny_file_builder * Builder,
4164 granny_file_location const * Location,
4165 granny_uint32 AdditionalOffset,
4166 granny_file_location * Result);
4167 GRANNY_DYNLINK(granny_file_fixup *) GrannyMarkFileFixup(granny_file_builder * Builder,
4168 granny_file_location const * From,
4169 granny_int32x FromOffset,
4170 granny_file_location const * To);
4171 GRANNY_DYNLINK(void) GrannyAdjustFileFixup(granny_file_builder * Builder,
4172 granny_file_fixup * Fixup,
4173 granny_file_location const * NewTo);
4174 GRANNY_DYNLINK(void) GrannyMarkMarshallingFixup(granny_file_builder * Builder,
4175 granny_file_location const * Type,
4176 granny_file_location const * Object,
4177 granny_int32x ArrayCount);
4178 GRANNY_DYNLINK(void) GrannyMarkFileRootObject(granny_file_builder * Builder,
4179 granny_file_location const * TypeLocation,
4180 granny_file_location const * ObjectLocation);
4181 GRANNY_DYNLINK(void) GrannySetFileStringDatabaseCRC(granny_file_builder * Builder,
4182 granny_uint32 DatabaseCRC);
4183 GRANNY_DYNLINK(void) GrannySetFileExtraTag(granny_file_builder * Builder,
4184 granny_int32x Index,
4185 granny_uint32 Value);
4186
4187 /* granny_file_compressor.h bindings: */
4188 GRANNY_DYNLINK(granny_int32x) GrannyGetCompressedBytesPaddingSize(granny_compression_type Format);
4189 GRANNY_DYNLINK(bool) GrannyDecompressData(granny_compression_type Format,
4190 bool FileIsByteReversed,
4191 granny_int32x CompressedBytesSize,
4192 void * CompressedBytes,
4193 granny_int32x Stop0,
4194 granny_int32x Stop1,
4195 granny_int32x Stop2,
4196 void * DecompressedBytes);
4197 GRANNY_DYNLINK(bool) GrannyDecompressDataChunk(granny_compression_type Format,
4198 bool FileIsByteReversed,
4199 granny_int32x CompressedBytesSize,
4200 void * CompressedBytes,
4201 granny_int32x DecompressedBytesSize,
4202 void * DecompressedBytes);
4203 GRANNY_DYNLINK(granny_file_compressor *) GrannyBeginFileCompression(granny_uint32x ExpandedDataSize,
4204 granny_int32x ContentsCount,
4205 granny_compression_type Type,
4206 bool WritingForReversedPlatform,
4207 granny_file_writer * Writer);
4208 GRANNY_DYNLINK(bool) GrannyCompressContentsOfFile(granny_file_compressor * Compressor,
4209 granny_int32x FileSize,
4210 char const * FileName,
4211 granny_int32x CopyBufferSize,
4212 void * CopyBuffer);
4213 GRANNY_DYNLINK(bool) GrannyCompressContentsOfReader(granny_file_compressor * Compressor,
4214 granny_int32x FileSize,
4215 granny_file_reader * Reader,
4216 granny_int32x CopyBufferSize,
4217 void * CopyBuffer);
4218 GRANNY_DYNLINK(bool) GrannyCompressContentsOfMemory(granny_file_compressor * Compressor,
4219 granny_int32x BufferSize,
4220 void const * Buffer);
4221 GRANNY_DYNLINK(bool) GrannyEndFileCompression(granny_file_compressor * Compressor,
4222 granny_uint32x * CompressedSize);
4223
4224 /* granny_file_format.h bindings: */
4225 GRANNY_DYNLINK(char const *) GrannyGetStandardSectionName(granny_int32x SectionIndex);
4226 GRANNY_DYNLINK(bool) GrannyIsGrannyFile(granny_grn_file_magic_value const * MagicValue,
4227 granny_uint32x * TotalHeaderSize,
4228 bool * IsByteReversed,
4229 bool * IsPointerSizeDifferent);
4230 GRANNY_DYNLINK(granny_grn_section *) GrannyGetGRNSectionArray(granny_grn_file_header const * Header);
4231 GRANNY_DYNLINK(void) GrannyReverseSection(granny_int32x First16Bit,
4232 granny_int32x First8Bit,
4233 granny_int32x End,
4234 void * BufferInit);
4235 GRANNY_DYNLINK(void) GrannyGRNFixUp(granny_uint32x FixupCount,
4236 granny_grn_pointer_fixup const * FixupArray,
4237 void const ** ToSections,
4238 void * FromSection);
4239 GRANNY_DYNLINK(void) GrannyGRNMarshall(granny_uint32x FixupCount,
4240 granny_grn_mixed_marshalling_fixup const * FixupArray,
4241 void const ** ToSections,
4242 void * FromSection);
4243 GRANNY_DYNLINK(void *) GrannyDecodeGRNReference(void const ** Sections,
4244 granny_grn_reference const * Reference);
4245 GRANNY_DYNLINK(bool) GrannyGetMagicValueForPlatform(granny_int32x PointerSizeInBits,
4246 bool LittleEndian,
4247 granny_grn_file_magic_value * MagicValue);
4248 GRANNY_DYNLINK(void) GrannyGetThisPlatformProperties(granny_int32x * PointerSize,
4249 bool * LittleEndian);
4250 GRANNY_DYNLINK(bool) GrannyGetMagicValueProperties(granny_grn_file_magic_value const* MagicValue,
4251 granny_int32x * PointerSize,
4252 bool * LittleEndian);
4253 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_Old;
4254 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_32Bit_LittleEndian;
4255 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_32Bit_BigEndian;
4256 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_64Bit_LittleEndian;
4257 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_64Bit_BigEndian;
4258 extern GRANNY_DYNLINKDATA(granny_grn_file_magic_value const *) GrannyGRNFileMV_ThisPlatform;
4259
4260 /* granny_file_info.h bindings: */
4261 GRANNY_DYNLINK(granny_file_info *) GrannyGetFileInfo(granny_file * File);
4262 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyFileInfoType;
4263
4264 /* granny_file_operations.h bindings: */
4265 GRANNY_DYNLINK(char const *) GrannyGetTemporaryDirectory(void);
4266
4267 /* granny_file_reader.h bindings: */
4268 GRANNY_DYNLINK(void) GrannyInitializeFileReader(char const * SourceFileName,
4269 granny_int32x SourceLineNumber,
4270 granny_close_file_reader_callback * CloseFileReaderCallback,
4271 granny_read_at_most_callback * ReadAtMostCallback,
4272 granny_file_reader * Reader);
4273 GRANNY_DYNLINK(granny_file_reader *) GrannyCreatePlatformFileReader(char const * SourceFileName,
4274 granny_int32x SourceLineNumber,
4275 char const * FileNameToOpen);
4276 GRANNY_DYNLINK(granny_open_file_reader_callback *) GrannyGetDefaultFileReaderOpenCallback(void);
4277 GRANNY_DYNLINK(void) GrannySetDefaultFileReaderOpenCallback(granny_open_file_reader_callback * OpenFileReaderCallback);
4278
4279 /* granny_file_writer.h bindings: */
4280 GRANNY_DYNLINK(granny_int32x) GrannyAlignWriter(granny_file_writer * Writer);
4281 GRANNY_DYNLINK(granny_int32x) GrannyPredictWriterAlignment(granny_int32x Position);
4282 GRANNY_DYNLINK(void) GrannyInitializeFileWriter(char const * SourceFileName,
4283 granny_int32x SourceLineNumber,
4284 granny_delete_file_writer_callback * DeleteFileWriterCallback,
4285 granny_seek_file_writer_callback * SeekWriterCallback,
4286 granny_write_file_writer_callback * WriteCallback,
4287 granny_begincrc_file_writer_callback * BeginCRCCallback,
4288 granny_endcrc_file_writer_callback * EndCRCCallback,
4289 granny_file_writer * Writer);
4290 GRANNY_DYNLINK(granny_file_writer *) GrannyCreatePlatformFileWriter(char const * SourceFileName,
4291 granny_int32x SourceLineNumber,
4292 char const * FileNameToOpen,
4293 bool EraseExisting);
4294 GRANNY_DYNLINK(granny_open_file_writer_callback *) GrannyGetDefaultFileWriterOpenCallback(void);
4295 GRANNY_DYNLINK(void) GrannySetDefaultFileWriterOpenCallback(granny_open_file_writer_callback * OpenFileWriterCallback);
4296 GRANNY_DYNLINK(granny_int32x) GrannySeekWriterFromStartStub(char const * SourceFileName,
4297 granny_int32x SourceLineNumber,
4298 granny_file_writer * Writer,
4299 granny_int32x OffsetInUInt8s);
4300 GRANNY_DYNLINK(granny_int32x) GrannySeekWriterFromEndStub(char const * SourceFileName,
4301 granny_int32x SourceLineNumber,
4302 granny_file_writer * Writer,
4303 granny_int32x OffsetInUInt8s);
4304 GRANNY_DYNLINK(granny_int32x) GrannySeekWriterFromCurrentPositionStub(char const * SourceFileName,
4305 granny_int32x SourceLineNumber,
4306 granny_file_writer * Writer,
4307 granny_int32x OffsetInUInt8s);
4308
4309 /* granny_find_knot.h bindings: */
4310 GRANNY_DYNLINK(granny_int32x) GrannyFindKnot(granny_int32x KnotCount,
4311 granny_real32 const * Knots,
4312 granny_real32 t);
4313 GRANNY_DYNLINK(granny_int32x) GrannyFindCloseKnot(granny_int32x KnotCount,
4314 granny_real32 const * Knots,
4315 granny_real32 t,
4316 granny_int32x StartingIndex);
4317
4318 /* granny_fixed_allocator.h bindings: */
4319 GRANNY_DYNLINK(void *) GrannyAllocateFixed(granny_fixed_allocator * Allocator);
4320 GRANNY_DYNLINK(void) GrannyDeallocateFixed(granny_fixed_allocator * Allocator,
4321 void * Memory);
4322 GRANNY_DYNLINK(void) GrannyDeallocateAllFixed(granny_fixed_allocator * Allocator);
4323 GRANNY_DYNLINK(void) GrannyInitializeFixedAllocator(granny_fixed_allocator * Allocator,
4324 granny_int32x UnitSize);
4325
4326 /* granny_float16.h bindings: */
4327 GRANNY_DYNLINK(granny_real16) GrannyReal32ToReal16(granny_real32 Value);
4328 GRANNY_DYNLINK(void) GrannyReal16ToReal32(granny_real16 Value,
4329 granny_real32 * Output);
4330
4331 /* granny_ik.h bindings: */
4332 GRANNY_DYNLINK(void) GrannyIKUpdate(granny_int32x LinkCount,
4333 granny_int32x EEBoneIndex,
4334 granny_real32 const * DesiredPosition3,
4335 granny_int32x IterationCount,
4336 granny_skeleton const * Skeleton,
4337 granny_real32 const * ModelRoot4x4,
4338 granny_local_pose * LocalPose,
4339 granny_world_pose * WorldPose);
4340 GRANNY_DYNLINK(bool) GrannyIKUpdate2Bone(granny_int32x EEBoneIndex,
4341 granny_real32 const * DesiredPosition3,
4342 granny_real32 const * RestrictedMovementPlaneNormal3,
4343 granny_skeleton const * Skeleton,
4344 granny_real32 const * ModelRootTransform,
4345 granny_local_pose * LocalPose,
4346 granny_world_pose * WorldPose,
4347 granny_real32 HyperExtensionStart,
4348 granny_real32 HyperExtensionScale);
4349
4350 /* granny_image_operations.h bindings: */
4351 GRANNY_DYNLINK(void) GrannyScaleImage(granny_pixel_filter_type FilterType,
4352 granny_int32x SourceWidth,
4353 granny_int32x SourceHeight,
4354 granny_int32x SourceStride,
4355 granny_uint8 const * SourcePixels,
4356 granny_int32x DestWidth,
4357 granny_int32x DestHeight,
4358 granny_int32x DestStride,
4359 granny_uint8 * DestPixels);
4360
4361 /* granny_intersection.h bindings: */
4362 GRANNY_DYNLINK(granny_int32x) GrannyRayIntersectsPlaneAt(granny_real32 const * PlaneNormal,
4363 granny_real32 PlaneD,
4364 granny_real32 const * RayOrigin,
4365 granny_real32 const * RayNormal,
4366 granny_real32 * T);
4367 GRANNY_DYNLINK(bool) GrannyRayIntersectsSphere(granny_real32 const * Center,
4368 granny_real32 Radius,
4369 granny_real32 const * RayOrigin,
4370 granny_real32 const * RayNormal);
4371 GRANNY_DYNLINK(granny_int32x) GrannyRayIntersectsSphereAt(granny_real32 const * Center,
4372 granny_real32 Radius,
4373 granny_real32 const * RayOrigin,
4374 granny_real32 const * RayNormal,
4375 granny_real32 * InT,
4376 granny_real32 * OutT);
4377 GRANNY_DYNLINK(granny_int32x) GrannyRayIntersectsBox(granny_real32 const * Transform4x4,
4378 granny_real32 const * Min3,
4379 granny_real32 const * Max3,
4380 granny_real32 const * RayOrigin,
4381 granny_real32 const * RayNormal);
4382 GRANNY_DYNLINK(granny_int32x) GrannyRayIntersectsBoxAt(granny_real32 const * Transform4x4,
4383 granny_real32 const * Min3,
4384 granny_real32 const * Max3,
4385 granny_real32 const * RayOrigin,
4386 granny_real32 const * RayNormal,
4387 granny_box_intersection * Intersection);
4388 GRANNY_DYNLINK(granny_int32x) GrannyRayIntersectsTriangleAt(granny_real32 const * P0,
4389 granny_real32 const * P1,
4390 granny_real32 const * P2,
4391 granny_real32 const * RayOrigin,
4392 granny_real32 const * RayNormal,
4393 granny_triangle_intersection * Intersection);
4394
4395 /* granny_local_pose.h bindings: */
4396 GRANNY_DYNLINK(granny_local_pose *) GrannyNewLocalPose(granny_int32x BoneCount);
4397 GRANNY_DYNLINK(void) GrannyFreeLocalPose(granny_local_pose * LocalPose);
4398 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingLocalPoseSize(granny_int32x BoneCount);
4399 GRANNY_DYNLINK(granny_local_pose *) GrannyNewLocalPoseInPlace(granny_int32x BoneCount,
4400 void * Memory);
4401 GRANNY_DYNLINK(granny_int32x) GrannyGetLocalPoseBoneCount(granny_local_pose const * LocalPose);
4402 GRANNY_DYNLINK(granny_transform *) GrannyGetLocalPoseTransform(granny_local_pose const * LocalPose,
4403 granny_int32x BoneIndex);
4404 GRANNY_DYNLINK(void * ) GrannyGetLocalPoseOpaqueTransformArray(granny_local_pose const* LocalPose);
4405 GRANNY_DYNLINK(void) GrannyBuildRestLocalPose(granny_skeleton const * Skeleton,
4406 granny_int32x FirstBone,
4407 granny_int32x BoneCount,
4408 granny_local_pose * LocalPose);
4409 GRANNY_DYNLINK(void) GrannyBeginLocalPoseAccumulation(granny_local_pose * LocalPose,
4410 granny_int32x FirstBone,
4411 granny_int32x BoneCount,
4412 granny_int32x const * SparseBoneArray);
4413 GRANNY_DYNLINK(void) GrannyAccumulateLocalTransform(granny_local_pose * LocalPose,
4414 granny_int32x LocalPoseBoneIndex,
4415 granny_int32x SkeletonBoneIndex,
4416 granny_real32 Weight,
4417 granny_skeleton const * ReferenceSkeleton,
4418 granny_quaternion_mode Mode,
4419 granny_transform const * Transform);
4420 GRANNY_DYNLINK(void) GrannyEndLocalPoseAccumulation(granny_local_pose * LocalPose,
4421 granny_int32x FirstBone,
4422 granny_int32x BoneCount,
4423 granny_skeleton const * ReferenceSkeleton,
4424 granny_int32x const * SparseBoneArray);
4425 GRANNY_DYNLINK(void) GrannyEndLocalPoseAccumulationLOD(granny_local_pose * LocalPose,
4426 granny_int32x FirstBone,
4427 granny_int32x BoneCount,
4428 granny_skeleton const * ReferenceSkeleton,
4429 granny_real32 AllowedError,
4430 granny_int32x const * SparseBoneArray);
4431 GRANNY_DYNLINK(granny_real32) GrannyGetLocalPoseFillThreshold(granny_local_pose const * LocalPose);
4432 GRANNY_DYNLINK(void) GrannySetLocalPoseFillThreshold(granny_local_pose * LocalPose,
4433 granny_real32 FillThreshold);
4434 GRANNY_DYNLINK(void) GrannyGetWorldMatrixFromLocalPose(granny_skeleton const * Skeleton,
4435 granny_int32x BoneIndex,
4436 granny_local_pose const * LocalPose,
4437 granny_real32 const * Offset4x4,
4438 granny_real32 * Result4x4,
4439 granny_int32x const * SparseBoneArray,
4440 granny_int32x const * SparseBoneArrayReverse);
4441 GRANNY_DYNLINK(void) GrannyGetAttachmentOffset(granny_skeleton const * Skeleton,
4442 granny_int32x BoneIndex,
4443 granny_local_pose const * LocalPose,
4444 granny_real32 const * Offset4x4,
4445 granny_real32 * Result4x4,
4446 granny_int32x const * SparseBoneArray,
4447 granny_int32x const * SparseBoneArrayReverse);
4448 GRANNY_DYNLINK(void) GrannyModulationCompositeLocalPoseSparse(granny_local_pose * BasePose,
4449 granny_real32 WeightNone,
4450 granny_real32 WeightAll,
4451 granny_track_mask * Mask,
4452 granny_local_pose const * CompositePose,
4453 granny_int32x const * SparseBoneArray);
4454 GRANNY_DYNLINK(void) GrannyLocalPoseFromWorldPose(granny_skeleton const* Skeleton,
4455 granny_local_pose * Result,
4456 granny_world_pose const * WorldPose,
4457 granny_real32 const * Offset4x4,
4458 granny_int32x FirstBone,
4459 granny_int32x BoneCount);
4460 GRANNY_DYNLINK(void) GrannyLocalPoseFromWorldPoseNoScale(granny_skeleton const* Skeleton,
4461 granny_local_pose * Result,
4462 granny_world_pose const * WorldPose,
4463 granny_real32 const * Offset4x4,
4464 granny_int32x FirstBone,
4465 granny_int32x BoneCount);
4466 GRANNY_DYNLINK(void) GrannyModulationCompositeLocalPose(granny_local_pose * BasePose,
4467 granny_real32 WeightNone,
4468 granny_real32 WeightAll,
4469 granny_track_mask * Mask,
4470 granny_local_pose const * CompositePose);
4471 GRANNY_DYNLINK(void) GrannyCopyLocalPose(granny_local_pose const * Src,
4472 granny_local_pose * Dst);
4473 GRANNY_DYNLINK(granny_int32x) GrannySparseBoneArrayCreateSingleBone(granny_skeleton const * Skeleton,
4474 granny_int32x FirstBoneRequired,
4475 granny_int32x * ResultSparseBoneArray,
4476 granny_int32x * ResultSparseBoneArrayReverse);
4477 GRANNY_DYNLINK(granny_int32x) GrannySparseBoneArrayAddBone(granny_skeleton const * Skeleton,
4478 granny_int32x BoneToAdd,
4479 granny_int32x InitialBoneCount,
4480 granny_int32x * SparseBoneArray,
4481 granny_int32x * SparseBoneArrayReverse);
4482 GRANNY_DYNLINK(void) GrannySparseBoneArrayExpand(granny_skeleton const * Skeleton,
4483 granny_local_pose const * SourceSparseLocalPose,
4484 granny_int32x SparseBoneCount,
4485 granny_int32x const * SparseBoneArray,
4486 granny_int32x const * SparseBoneArrayReverse,
4487 granny_int32x BoneCount,
4488 granny_local_pose * DestLocalPose);
4489 GRANNY_DYNLINK(bool) GrannySparseBoneArrayIsValid(granny_int32x SkeletonBoneCount,
4490 granny_int32x SparseBoneCount,
4491 granny_int32x const * SparseBoneArray,
4492 granny_int32x const * SparseBoneArrayReverse);
4493 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyLocalPoseTransformType;
4494 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyLocalPoseType;
4495
4496 /* granny_log.h bindings: */
4497 GRANNY_DYNLINK(bool) GrannySetLogFileName(char const * FileName,
4498 bool Clear);
4499 GRANNY_DYNLINK(void) GrannyGetLogCallback(granny_log_callback * Result);
4500 GRANNY_DYNLINK(void) GrannySetLogCallback(granny_log_callback const * LogCallback);
4501 GRANNY_DYNLINK(char const* ) GrannyGetLogMessageTypeString(granny_log_message_type Type);
4502 GRANNY_DYNLINK(char const* ) GrannyGetLogMessageOriginString(granny_log_message_origin Origin);
4503 GRANNY_DYNLINK(bool) GrannyLogging(void);
4504 GRANNY_DYNLINK(void) GrannyFilterMessage(granny_log_message_origin Origin,
4505 bool Enabled);
4506 GRANNY_DYNLINK(void) GrannyFilterAllMessages(bool Enabled);
4507 GRANNY_DYNLINK(granny_log_message_type) GrannyGetMostSeriousMessageType(void);
4508 GRANNY_DYNLINK(char const *) GrannyGetMostSeriousMessage(void);
4509 GRANNY_DYNLINK(void) GrannyClearMostSeriousMessage(void);
4510
4511 /* granny_math.h bindings: */
4512 GRANNY_DYNLINK(void) GrannyEnsureQuaternionContinuity(granny_int32x QuaternionCount,
4513 granny_real32 * Quaternions);
4514 GRANNY_DYNLINK(bool) GrannyPolarDecompose(granny_real32 const * Source3x3,
4515 granny_real32 Tolerance,
4516 granny_real32 * Q3x3,
4517 granny_real32 * S3x3);
4518 GRANNY_DYNLINK(void) GrannyColumnMatrixMultiply4x3(granny_real32 * IntoMatrix4x4,
4519 granny_real32 const * Matrix4x4,
4520 granny_real32 const * ByMatrix4x4);
4521 GRANNY_DYNLINK(void) GrannyColumnMatrixMultiply4x3Transpose(granny_real32 * IntoMatrix4x3,
4522 granny_real32 const * Matrix4x4,
4523 granny_real32 const * ByMatrix4x4);
4524 GRANNY_DYNLINK(void) GrannyColumnMatrixMultiply4x4(granny_real32 * IntoMatrix4x4,
4525 granny_real32 const * Matrix4x4,
4526 granny_real32 const * ByMatrix4x4);
4527 GRANNY_DYNLINK(void) GrannyMatrixEqualsQuaternion3x3(granny_real32 * Dest,
4528 granny_real32 const * Quaternion);
4529 GRANNY_DYNLINK(void) GrannyQuaternionEqualsMatrix3x3(granny_real32 * Quaternion,
4530 granny_real32 const * Matrix);
4531 GRANNY_DYNLINK(void) GrannyInPlaceSimilarityTransformPosition(granny_real32 const * Affine3,
4532 granny_real32 const * Linear3x3,
4533 granny_real32 * Position3);
4534 GRANNY_DYNLINK(void) GrannyInPlaceSimilarityTransformOrientation(granny_real32 const * Linear3x3,
4535 granny_real32 const * InverseLinear3x3,
4536 granny_real32 * Orientation4);
4537 GRANNY_DYNLINK(void) GrannyInPlaceSimilarityTransformScaleShear(granny_real32 const * Linear3x3,
4538 granny_real32 const * InverseLinear3x3,
4539 granny_real32 * ScaleShear3x3);
4540 GRANNY_DYNLINK(void) GrannyInPlaceSimilarityTransform(granny_real32 const * Affine3,
4541 granny_real32 const * Linear3x3,
4542 granny_real32 const * InverseLinear3x3,
4543 granny_real32 * Position3,
4544 granny_real32 * Orientation4,
4545 granny_real32 * ScaleShear3x3);
4546 GRANNY_DYNLINK(void) GrannyInPlaceSimilarityTransform4x3(granny_real32 const * Affine3,
4547 granny_real32 const * Linear3x3,
4548 granny_real32 const * InverseLinear3x3,
4549 granny_real32 * Result4x4);
4550
4551 /* granny_memory.h bindings: */
4552 GRANNY_DYNLINK(granny_allocation_header *) GrannyAllocationsBegin(void);
4553 GRANNY_DYNLINK(granny_allocation_header *) GrannyNextAllocation(granny_allocation_header * Current);
4554 GRANNY_DYNLINK(granny_allocation_header *) GrannyAllocationsEnd(void);
4555 GRANNY_DYNLINK(void) GrannyGetAllocationInformation(granny_allocation_header const * Header,
4556 granny_allocation_information * Information);
4557 GRANNY_DYNLINK(void *) GrannyBeginAllocationCheck(void);
4558 GRANNY_DYNLINK(granny_allocation_header *) GrannyCheckedAllocationsEnd(void * CheckIdentifier);
4559 GRANNY_DYNLINK(bool) GrannyEndAllocationCheck(void * CheckIdentifier);
4560 GRANNY_DYNLINK(void) GrannyGetAllocator(granny_allocate_callback ** AllocateCallback,
4561 granny_deallocate_callback ** DeallocateCallback);
4562 GRANNY_DYNLINK(void) GrannySetAllocator(granny_allocate_callback * AllocateCallback,
4563 granny_deallocate_callback * DeallocateCallback);
4564 GRANNY_DYNLINK(void) GrannyFreeBuilderResult(void * Result);
4565 GRANNY_DYNLINK(void) GrannyAcquireMemorySpinlock(void);
4566 GRANNY_DYNLINK(void) GrannyReleaseMemorySpinlock(void);
4567
4568 /* granny_memory_arena.h bindings: */
4569 GRANNY_DYNLINK(granny_memory_arena *) GrannyNewMemoryArena(void);
4570 GRANNY_DYNLINK(void) GrannySetArenaAlignment(granny_memory_arena * Arena,
4571 granny_int32x Align);
4572 GRANNY_DYNLINK(void) GrannyClearArena(granny_memory_arena * Arena);
4573 GRANNY_DYNLINK(void) GrannyFreeMemoryArena(granny_memory_arena * Arena);
4574 GRANNY_DYNLINK(void *) GrannyMemoryArenaPush(granny_memory_arena * Arena,
4575 granny_int32x Size);
4576
4577 /* granny_memory_file_reader.h bindings: */
4578 GRANNY_DYNLINK(granny_file_reader *) GrannyCreateMemoryFileReader(char const * SourceFileName,
4579 granny_int32x SourceLineNumber,
4580 granny_int32x Offset,
4581 granny_int32x MemorySize,
4582 void * Memory);
4583
4584 /* granny_memory_file_writer.h bindings: */
4585 GRANNY_DYNLINK(granny_file_writer *) GrannyCreateMemoryFileWriter(char const * SourceFileName,
4586 granny_int32x SourceLineNumber,
4587 granny_int32x BlockSize);
4588 GRANNY_DYNLINK(bool) GrannyStealMemoryWriterBuffer(granny_file_writer * Writer,
4589 granny_uint8 ** BufferPtr,
4590 granny_int32x * BufferSize);
4591 GRANNY_DYNLINK(void) GrannyFreeMemoryWriterBuffer(granny_uint8 * Buffer);
4592
4593 /* granny_mesh.h bindings: */
4594 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshMorphTargetCount(granny_mesh const * Mesh);
4595 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshTriangleGroupCount(granny_mesh const * Mesh);
4596 GRANNY_DYNLINK(granny_tri_material_group *) GrannyGetMeshTriangleGroups(granny_mesh const * Mesh);
4597 GRANNY_DYNLINK(granny_data_type_definition *) GrannyGetMeshVertexType(granny_mesh const * Mesh);
4598 GRANNY_DYNLINK(granny_data_type_definition *) GrannyGetMeshMorphVertexType(granny_mesh const * Mesh,
4599 granny_int32x MorphTargetIndex);
4600 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshVertexCount(granny_mesh const * Mesh);
4601 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshMorphVertexCount(granny_mesh const * Mesh,
4602 granny_int32x MorphTargetIndex);
4603 GRANNY_DYNLINK(void) GrannyCopyMeshVertices(granny_mesh const * Mesh,
4604 granny_data_type_definition const * VertexType,
4605 void * DestVertices);
4606 GRANNY_DYNLINK(void) GrannyCopyMeshMorphVertices(granny_mesh const * Mesh,
4607 granny_int32x MorphTargetIndex,
4608 granny_data_type_definition const * VertexType,
4609 void * DestVertices);
4610 GRANNY_DYNLINK(void *) GrannyGetMeshVertices(granny_mesh const * Mesh);
4611 GRANNY_DYNLINK(void *) GrannyGetMeshMorphVertices(granny_mesh const * Mesh,
4612 granny_int32x MorphTargetIndex);
4613 GRANNY_DYNLINK(bool) GrannyMeshIsRigid(granny_mesh const * Mesh);
4614 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshIndexCount(granny_mesh const * Mesh);
4615 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshTriangleCount(granny_mesh const * Mesh);
4616 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshBytesPerIndex(granny_mesh const * Mesh);
4617 GRANNY_DYNLINK(void *) GrannyGetMeshIndices(granny_mesh const * Mesh);
4618 GRANNY_DYNLINK(void) GrannyCopyMeshIndices(granny_mesh const * Mesh,
4619 granny_int32x BytesPerIndex,
4620 void * DestIndices);
4621 GRANNY_DYNLINK(void) GrannyTransformBoundingBox(granny_real32 const * Affine3,
4622 granny_real32 const * Linear3x3,
4623 granny_real32 * OBBMin,
4624 granny_real32 * OBBMax);
4625 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyBoneBindingType;
4626 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyMaterialBindingType;
4627 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyMorphTargetType;
4628 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyMeshType;
4629
4630 /* granny_mesh_binding.h bindings: */
4631 GRANNY_DYNLINK(granny_mesh_binding *) GrannyNewMeshBinding(granny_mesh const * Mesh,
4632 granny_skeleton const * FromSkeleton,
4633 granny_skeleton const * ToSkeleton);
4634 GRANNY_DYNLINK(void) GrannyFreeMeshBinding(granny_mesh_binding * Binding);
4635 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingMeshBindingSize(granny_mesh const * Mesh,
4636 granny_skeleton const * FromSkeleton,
4637 granny_skeleton const * ToSkeleton);
4638 GRANNY_DYNLINK(granny_mesh_binding *) GrannyNewMeshBindingInPlace(granny_mesh const * Mesh,
4639 granny_skeleton const * FromSkeleton,
4640 granny_skeleton const * ToSkeleton,
4641 void * Memory);
4642 GRANNY_DYNLINK(bool) GrannyMeshBindingIsTransferred(granny_mesh_binding const * Binding);
4643 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshBinding4x4ArraySize(granny_mesh_binding const * Binding,
4644 granny_int32x BoneCount);
4645 GRANNY_DYNLINK(void) GrannyBuildMeshBinding4x4Array(granny_mesh_binding const * Binding,
4646 granny_world_pose const * WorldPose,
4647 granny_int32x FirstBoneIndex,
4648 granny_int32x BoneCount,
4649 granny_real32 * Matrix4x4Array);
4650 GRANNY_DYNLINK(granny_int32x) GrannyGetMeshBindingBoneCount(granny_mesh_binding const * Binding);
4651 GRANNY_DYNLINK(granny_int32x const *) GrannyGetMeshBindingFromBoneIndices(granny_mesh_binding const * Binding);
4652 GRANNY_DYNLINK(granny_skeleton *) GrannyGetMeshBindingFromSkeleton(granny_mesh_binding const * Binding);
4653 GRANNY_DYNLINK(granny_int32x const *) GrannyGetMeshBindingToBoneIndices(granny_mesh_binding const * Binding);
4654 GRANNY_DYNLINK(granny_skeleton *) GrannyGetMeshBindingToSkeleton(granny_mesh_binding const * Binding);
4655 GRANNY_DYNLINK(granny_mesh *) GrannyGetMeshBindingSourceMesh(granny_mesh_binding const * Binding);
4656
4657 /* granny_mesh_builder.h bindings: */
4658 GRANNY_DYNLINK(granny_mesh_builder *) GrannyBeginMesh(granny_int32x VertexCount,
4659 granny_int32x TriangleCount,
4660 granny_int32x MaterialCount,
4661 granny_int32x BoneCount,
4662 granny_data_type_definition const * VertexType);
4663 GRANNY_DYNLINK(void) GrannyGenerateTangentSpaceFromUVs(granny_mesh_builder * Builder);
4664 GRANNY_DYNLINK(bool) GrannyEndMesh(granny_mesh_builder * Builder,
4665 granny_vertex_data ** VertexData,
4666 granny_tri_topology ** Topology);
4667 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingVertexCount(granny_mesh_builder const * Builder);
4668 GRANNY_DYNLINK(void) GrannySerializeResultingCoincidentVertexMap(granny_mesh_builder const * Builder,
4669 granny_int32 * Dest);
4670 GRANNY_DYNLINK(void) GrannySerializeResultingVertexToTriangleMap(granny_mesh_builder const * Builder,
4671 granny_int32 * Dest);
4672 GRANNY_DYNLINK(void) GrannySerializeResultingVertices(granny_mesh_builder const * Builder,
4673 void * Destination);
4674 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingVertexDataSize(granny_mesh_builder const * Builder);
4675 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingTopologySize(granny_mesh_builder const * Builder);
4676 GRANNY_DYNLINK(void) GrannyEndMeshInPlace(granny_mesh_builder * Builder,
4677 void * VertexDataMemory,
4678 granny_vertex_data ** VertexData,
4679 void * TopologyMemory,
4680 granny_tri_topology ** Topology);
4681 GRANNY_DYNLINK(void) GrannySetNormalTolerance(granny_mesh_builder * Builder,
4682 granny_real32 Tolerance);
4683 GRANNY_DYNLINK(void) GrannySetTangentTolerance(granny_mesh_builder * Builder,
4684 granny_real32 Tolerance);
4685 GRANNY_DYNLINK(void) GrannySetBinormalTolerance(granny_mesh_builder * Builder,
4686 granny_real32 Tolerance);
4687 GRANNY_DYNLINK(void) GrannySetTangentBinormalCrossTolerance(granny_mesh_builder * Builder,
4688 granny_real32 Tolerance);
4689 GRANNY_DYNLINK(void) GrannySetTangentMergingTolerance(granny_mesh_builder * Builder,
4690 granny_real32 MinCosine);
4691 GRANNY_DYNLINK(void) GrannySetChannelTolerance(granny_mesh_builder * Builder,
4692 granny_int32x Channel,
4693 granny_real32 Tolerance);
4694 GRANNY_DYNLINK(void) GrannySetVertexChannelComponentNames(granny_mesh_builder * Builder,
4695 granny_int32x ChannelCount,
4696 char const ** ChannelNames);
4697 GRANNY_DYNLINK(void) GrannySetPosition(granny_mesh_builder * Builder,
4698 granny_real32 Px,
4699 granny_real32 Py,
4700 granny_real32 Pz);
4701 GRANNY_DYNLINK(void) GrannyAddWeight(granny_mesh_builder * Builder,
4702 granny_int32x BoneIndex,
4703 granny_real32 Weight);
4704 GRANNY_DYNLINK(void) GrannyPushVertex(granny_mesh_builder * Builder);
4705 GRANNY_DYNLINK(void) GrannySetVertexIndex(granny_mesh_builder * Builder,
4706 granny_int32x Edge,
4707 granny_int32x Index);
4708 GRANNY_DYNLINK(void) GrannySetNormal(granny_mesh_builder * Builder,
4709 granny_int32x Edge,
4710 granny_real32 Nx,
4711 granny_real32 Ny,
4712 granny_real32 Nz);
4713 GRANNY_DYNLINK(void) GrannySetTangent(granny_mesh_builder * Builder,
4714 granny_int32x Edge,
4715 granny_real32 Tx,
4716 granny_real32 Ty,
4717 granny_real32 Tz);
4718 GRANNY_DYNLINK(void) GrannySetBinormal(granny_mesh_builder * Builder,
4719 granny_int32x Edge,
4720 granny_real32 Bx,
4721 granny_real32 By,
4722 granny_real32 Bz);
4723 GRANNY_DYNLINK(void) GrannySetTangentBinormalCross(granny_mesh_builder * Builder,
4724 granny_int32x Edge,
4725 granny_real32 TBCx,
4726 granny_real32 TBCy,
4727 granny_real32 TBCz);
4728 GRANNY_DYNLINK(granny_int32x) GrannyGetChannelComponentCount(granny_mesh_builder * Builder,
4729 granny_int32x ChannelIndex);
4730 GRANNY_DYNLINK(void) GrannySetChannel(granny_mesh_builder * Builder,
4731 granny_int32x Edge,
4732 granny_int32x Channel,
4733 granny_real32 const * Value);
4734 GRANNY_DYNLINK(void) GrannySetMaterial(granny_mesh_builder * Builder,
4735 granny_int32x MaterialIndex);
4736 GRANNY_DYNLINK(void) GrannyPushTriangle(granny_mesh_builder * Builder);
4737 GRANNY_DYNLINK(granny_int32x) GrannyGetOriginalVertex(granny_mesh_builder * Builder,
4738 granny_int32x V);
4739
4740 /* granny_mesh_deformer.h bindings: */
4741 GRANNY_DYNLINK(granny_mesh_deformer *) GrannyNewMeshDeformer(granny_data_type_definition const * InputVertexLayout,
4742 granny_data_type_definition const * OutputVertexLayout,
4743 granny_deformation_type DeformationType,
4744 granny_deformer_tail_flags TailFlag);
4745 GRANNY_DYNLINK(void) GrannyFreeMeshDeformer(granny_mesh_deformer * Deformer);
4746 GRANNY_DYNLINK(void) GrannyDeformVertices(granny_mesh_deformer const * Deformer,
4747 granny_int32x const * MatrixIndices,
4748 granny_real32 const * MatrixBuffer4x4,
4749 granny_int32x VertexCount,
4750 void const * SourceVertices,
4751 void * DestVertices);
4752
4753 /* granny_oodle1_compression.h bindings: */
4754 GRANNY_DYNLINK(granny_oodle1_state *) GrannyOodle1BeginSimple(granny_uint32x ExpandedDataSize,
4755 granny_int32x BufferCount);
4756 GRANNY_DYNLINK(granny_int32x) GrannyGetOodle1CompressBufferPaddingSize(void);
4757 GRANNY_DYNLINK(void) GrannyOodle1Compress(granny_oodle1_state * Oodle1State,
4758 granny_int32x BufferSize,
4759 void const * Buffer);
4760 GRANNY_DYNLINK(granny_int32x) GrannyOodle1End(granny_oodle1_state * Oodle1State,
4761 void ** Buffer,
4762 bool WritingForReversedPlatform);
4763 GRANNY_DYNLINK(void) GrannyOodle1FreeSimple(granny_oodle1_state * Oodle1State);
4764 GRANNY_DYNLINK(granny_int32x) GrannyGetOodle1DecompressBufferPaddingSize(void);
4765 GRANNY_DYNLINK(bool) GrannyOodle1Decompress(bool FileIsByteReversed,
4766 granny_int32x CompressedBytesSize,
4767 void const * CompressedBytes,
4768 granny_int32x DecompressedSize,
4769 void * DecompressedBytes);
4770
4771 /* granny_periodic_loop.h bindings: */
4772 GRANNY_DYNLINK(void) GrannyZeroPeriodicLoop(granny_periodic_loop * Loop);
4773 GRANNY_DYNLINK(void) GrannyFitPeriodicLoop(granny_real32 const * StartPosition3,
4774 granny_real32 const * StartOrientation4,
4775 granny_real32 const * EndPosition3,
4776 granny_real32 const * EndOrientation4,
4777 granny_real32 Seconds,
4778 granny_periodic_loop * Loop);
4779 GRANNY_DYNLINK(void) GrannyComputePeriodicLoopVector(granny_periodic_loop const * Loop,
4780 granny_real32 Seconds,
4781 granny_real32 * Result3);
4782 GRANNY_DYNLINK(void) GrannyComputePeriodicLoopLog(granny_periodic_loop const * Loop,
4783 granny_real32 Seconds,
4784 granny_real32 * Result4);
4785 GRANNY_DYNLINK(void) GrannyStepPeriodicLoop(granny_periodic_loop const * Loop,
4786 granny_real32 Seconds,
4787 granny_real32 * Position3,
4788 granny_real32 * Orientation4);
4789 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyPeriodicLoopType;
4790
4791 /* granny_pointer_hash.h bindings: */
4792 GRANNY_DYNLINK(granny_pointer_hash *) GrannyNewPointerHash(void);
4793 GRANNY_DYNLINK(void) GrannyDeletePointerHash(granny_pointer_hash * Hash);
4794 GRANNY_DYNLINK(void) GrannyAddPointerToHash(granny_pointer_hash * Hash,
4795 void const * Key,
4796 void * Data);
4797 GRANNY_DYNLINK(bool) GrannySetHashedPointerData(granny_pointer_hash * Hash,
4798 void const * Key,
4799 void * Data);
4800 GRANNY_DYNLINK(bool) GrannyGetHashedPointerData(granny_pointer_hash * Hash,
4801 void const * Key,
4802 void ** Data);
4803 GRANNY_DYNLINK(bool) GrannyHashedPointerKeyExists(granny_pointer_hash * Hash,
4804 void const * Key);
4805
4806 /* granny_s3tc.h bindings: */
4807 GRANNY_DYNLINK(granny_pixel_layout const *) GrannyGetS3TCPixelLayout(granny_s3tc_texture_format Format);
4808 GRANNY_DYNLINK(char const *) GrannyGetS3TCTextureFormatName(granny_int32x Format);
4809
4810 /* granny_skeleton.h bindings: */
4811 GRANNY_DYNLINK(void) GrannyBuildSkeletonRelativeTransform(granny_int32x SourceTransformStride,
4812 granny_transform const * SourceTransforms,
4813 granny_int32x SourceParentStride,
4814 granny_int32 const * SourceParents,
4815 granny_int32x BoneIndex,
4816 granny_transform * Result);
4817 GRANNY_DYNLINK(void) GrannyBuildSkeletonRelativeTransforms(granny_int32x SourceTransformStride,
4818 granny_transform const * SourceTransforms,
4819 granny_int32x SourceParentStride,
4820 granny_int32 const * SourceParents,
4821 granny_int32x Count,
4822 granny_int32x ResultStride,
4823 granny_transform * Results);
4824 GRANNY_DYNLINK(bool) GrannyFindBoneByName(granny_skeleton const * Skeleton,
4825 char const * BoneName,
4826 granny_int32x * BoneIndex);
4827 GRANNY_DYNLINK(bool) GrannyFindBoneByNameLowercase(granny_skeleton const * Skeleton,
4828 char const * BoneName,
4829 granny_int32x * BoneIndex);
4830 GRANNY_DYNLINK(bool) GrannyFindBoneByRule(granny_skeleton const* Skeleton,
4831 char const * ProcessedBoneName,
4832 char const * BonePattern,
4833 granny_int32x * BoneIndex);
4834 GRANNY_DYNLINK(int) GrannyGetBoneCountForLOD(granny_skeleton const* Skeleton,
4835 granny_real32 AllowedError);
4836 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyBoneType;
4837 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannySkeletonType;
4838
4839 /* granny_skeleton_builder.h bindings: */
4840 GRANNY_DYNLINK(granny_skeleton_builder *) GrannyBeginSkeleton(granny_int32x BoneCount);
4841 GRANNY_DYNLINK(granny_skeleton *) GrannyEndSkeleton(granny_skeleton_builder * Builder,
4842 granny_int32x * RemappingTable);
4843 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingSkeletonSize(granny_skeleton_builder const * Builder);
4844 GRANNY_DYNLINK(granny_skeleton *) GrannyEndSkeletonInPlace(granny_skeleton_builder * Builder,
4845 void * InMemory,
4846 granny_int32x * RemappingTable);
4847 GRANNY_DYNLINK(void) GrannyAddBone(granny_skeleton_builder * Builder,
4848 granny_real32 const * LocalPosition3,
4849 granny_real32 const * LocalOrientation4,
4850 granny_real32 const * LocalScaleShear3x3,
4851 granny_real32 const * WorldPosition3,
4852 granny_real32 const * WorldOrientation4,
4853 granny_real32 const * WorldScaleShear3x3);
4854 GRANNY_DYNLINK(void) GrannyAddBoneWithInverse(granny_skeleton_builder * Builder,
4855 granny_real32 const * LocalPosition3,
4856 granny_real32 const * LocalOrientation4,
4857 granny_real32 const * LocalScaleShear3x3,
4858 granny_matrix_4x4 const* InverseWorld4x4);
4859 GRANNY_DYNLINK(void) GrannySetBoneParent(granny_skeleton_builder * Builder,
4860 granny_int32x BoneIndex,
4861 granny_int32x ParentIndex);
4862 GRANNY_DYNLINK(void) GrannySetBoneLODError(granny_skeleton_builder * Builder,
4863 granny_int32x BoneIndex,
4864 granny_real32 LODError);
4865
4866 /* granny_spu_animation.h bindings: */
4867 GRANNY_DYNLINK(bool) GrannyFindSPUTrackGroupForModel(granny_spu_animation const* Animation,
4868 char const * ModelName,
4869 granny_int32x * TrackGroupIndex);
4870 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannySPUAnimationType;
4871
4872 /* granny_spu_animation_binding.h bindings: */
4873 GRANNY_DYNLINK(void) GrannyMakeDefaultSPUAnimationBindingID(granny_spu_animation_binding_id * ID,
4874 granny_spu_animation const* Animation,
4875 granny_int32x TrackGroupIndex,
4876 granny_model const* Model);
4877 GRANNY_DYNLINK(granny_spu_animation_binding *) GrannyAcquireSPUAnimationBindingFromID(granny_spu_animation_binding_id * ID);
4878 GRANNY_DYNLINK(granny_spu_animation_binding *) GrannyAcquireSPUAnimationBinding(granny_spu_animation_binding * Binding);
4879 GRANNY_DYNLINK(void) GrannyReleaseSPUAnimationBinding(granny_spu_animation_binding * Binding);
4880 GRANNY_DYNLINK(granny_int32x) GrannyGetMaximumSPUAnimationBindingCount(void);
4881 GRANNY_DYNLINK(void) GrannySetMaximumSPUAnimationBindingCount(granny_int32x BindingCountMax);
4882
4883 /* granny_spu_animation_info.h bindings: */
4884 GRANNY_DYNLINK(granny_spu_animation_info * ) GrannyGetSPUAnimationInfo(granny_file * File);
4885 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannySPUAnimationInfoType;
4886
4887 /* granny_spu_controlled_animation.h bindings: */
4888 GRANNY_DYNLINK(granny_control *) GrannyPlayControlledSPUAnimation(granny_real32 StartTime,
4889 granny_spu_animation const * Animation,
4890 granny_model_instance * Model);
4891
4892 /* granny_spu_track_group.h bindings: */
4893 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannySPUTransformTrackType;
4894 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannySPUTrackGroupType;
4895
4896 /* granny_stack_allocator.h bindings: */
4897 GRANNY_DYNLINK(void) GrannyStackInitialize(granny_stack_allocator * Allocator,
4898 granny_int32x UnitSize,
4899 granny_int32x UnitsPerBlock);
4900 GRANNY_DYNLINK(void) GrannyStackInitializeWithDirectory(granny_stack_allocator * Allocator,
4901 granny_int32x UnitSize,
4902 granny_int32x UnitsPerBlock,
4903 granny_int32x MaxUnits);
4904 GRANNY_DYNLINK(void) GrannyStackCleanUp(granny_stack_allocator * Allocator);
4905 GRANNY_DYNLINK(granny_int32x) GrannyGetStackUnitCount(granny_stack_allocator const * Allocator);
4906 GRANNY_DYNLINK(void * ) GrannyNewStackUnit(granny_stack_allocator * Allocator,
4907 granny_int32x * Result);
4908 GRANNY_DYNLINK(void *) GrannyGetStackUnit(granny_stack_allocator * Allocator,
4909 granny_int32x Index);
4910 GRANNY_DYNLINK(void) GrannyPopStackUnits(granny_stack_allocator * Allocator,
4911 granny_int32x UnitCount);
4912 GRANNY_DYNLINK(bool) GrannyMultipleNewStackUnits(granny_stack_allocator * Allocator,
4913 granny_int32x NumNewIndices,
4914 granny_int32x * NewIndicesStart,
4915 void const* InitialValue);
4916 GRANNY_DYNLINK(void) GrannySerializeStack(granny_stack_allocator const * Allocator,
4917 void * Dest);
4918
4919 /* granny_statistics.h bindings: */
4920 GRANNY_DYNLINK(granny_int32x) GrannyGetCounterCount(void);
4921 GRANNY_DYNLINK(granny_real64x) GrannyGetCounterTicksPerSecond(void);
4922 GRANNY_DYNLINK(void) GrannyResetCounters(void);
4923 GRANNY_DYNLINK(void) GrannyResetCounterPeaks(void);
4924 GRANNY_DYNLINK(void) GrannyGetCounterResults(granny_int32x CounterIndex,
4925 granny_counter_results * Results);
4926
4927 /* granny_stat_hud.h bindings: */
4928 GRANNY_DYNLINK(granny_stat_hud *) GrannyCaptureCurrentStats(granny_int32x FramesSinceLastCapture);
4929 GRANNY_DYNLINK(void) GrannyFreeStats(granny_stat_hud * StatHUD);
4930 GRANNY_DYNLINK(char **) GrannyDumpStatHUD(granny_stat_hud * StatHUD);
4931 GRANNY_DYNLINK(void) GrannyFreeStatHUDDump(char ** StatHUDDump);
4932
4933 /* granny_string.h bindings: */
4934 GRANNY_DYNLINK(granny_int32x) GrannyStringDifference(char const * StringA,
4935 char const * StringB);
4936 GRANNY_DYNLINK(void) GrannySetStringComparisonCallback(granny_string_comparison_callback * Callback);
4937
4938 /* granny_string_database.h bindings: */
4939 GRANNY_DYNLINK(granny_string_database *) GrannyGetStringDatabase(granny_file * File);
4940 GRANNY_DYNLINK(bool) GrannyRemapFileStrings(granny_file * File,
4941 granny_string_database * StringDatabase);
4942 GRANNY_DYNLINK(char *) GrannyRebaseToStringDatabase(void * Data,
4943 granny_uint32 Identifier);
4944 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyStringDatabaseType;
4945
4946 /* granny_string_table.h bindings: */
4947 GRANNY_DYNLINK(granny_string_table *) GrannyNewStringTable(void);
4948 GRANNY_DYNLINK(void) GrannyFreeStringTable(granny_string_table * Table);
4949 GRANNY_DYNLINK(char const *) GrannyMapString(granny_string_table * Table,
4950 char const * String);
4951
4952 /* granny_system_clock.h bindings: */
4953 GRANNY_DYNLINK(void) GrannyGetSystemSeconds(granny_system_clock * Result);
4954 GRANNY_DYNLINK(granny_real32) GrannyGetSecondsElapsed(granny_system_clock const * StartClock,
4955 granny_system_clock const * EndClock);
4956 GRANNY_DYNLINK(void) GrannySleepForSeconds(granny_real32 Seconds);
4957
4958 /* granny_tangent_frame.h bindings: */
4959 GRANNY_DYNLINK(bool) GrannyBuildTangentSpace(granny_mesh_builder * Builder);
4960 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyGBX333VertexType;
4961
4962 /* granny_texture.h bindings: */
4963 GRANNY_DYNLINK(char const *) GrannyGetTextureTypeName(granny_int32x TextureType);
4964 GRANNY_DYNLINK(char const *) GrannyGetTextureEncodingName(granny_int32x Encoding);
4965 GRANNY_DYNLINK(granny_int32x) GrannyGetRawImageSize(granny_pixel_layout const * Layout,
4966 granny_int32x Stride,
4967 granny_int32x Width,
4968 granny_int32x Height);
4969 GRANNY_DYNLINK(granny_int32x) GrannyGetS3TCImageSize(granny_s3tc_texture_format Format,
4970 granny_int32x Width,
4971 granny_int32x Height);
4972 GRANNY_DYNLINK(bool) GrannyGetRecommendedPixelLayout(granny_texture const * Texture,
4973 granny_pixel_layout * Layout);
4974 GRANNY_DYNLINK(bool) GrannyCopyTextureImage(granny_texture const * Texture,
4975 granny_int32x ImageIndex,
4976 granny_int32x MIPIndex,
4977 granny_pixel_layout const * Layout,
4978 granny_int32x DestWidth,
4979 granny_int32x DestHeight,
4980 granny_int32x DestStride,
4981 void * Pixels);
4982 GRANNY_DYNLINK(bool) GrannyTextureHasAlpha(granny_texture const * Texture);
4983 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTextureMIPLevelType;
4984 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTextureImageType;
4985 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTextureType;
4986
4987 /* granny_texture_builder.h bindings: */
4988 GRANNY_DYNLINK(granny_texture_builder *) GrannyBeginRawTexture(granny_int32x Width,
4989 granny_int32x Height,
4990 granny_pixel_layout const * ResultingLayout,
4991 granny_int32x StrideAlignment);
4992 GRANNY_DYNLINK(granny_texture_builder *) GrannyBeginS3TCTexture(granny_int32x Width,
4993 granny_int32x Height,
4994 granny_s3tc_texture_format Format);
4995 GRANNY_DYNLINK(granny_texture_builder *) GrannyBeginBestMatchS3TCTexture(granny_int32x Width,
4996 granny_int32x Height);
4997 GRANNY_DYNLINK(granny_texture_builder *) GrannyBeginBinkTexture(granny_int32x Width,
4998 granny_int32x Height,
4999 granny_int32x Compression,
5000 granny_uint32x Flags);
5001 GRANNY_DYNLINK(granny_texture *) GrannyEndTexture(granny_texture_builder * Builder);
5002 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingTextureSize(granny_texture_builder const * Builder);
5003 GRANNY_DYNLINK(granny_texture *) GrannyEndTextureInPlace(granny_texture_builder * Builder,
5004 void * Memory);
5005 GRANNY_DYNLINK(void) GrannySetImageScalingFilter(granny_texture_builder * Builder,
5006 granny_pixel_filter_type UpsamplingFilter,
5007 granny_pixel_filter_type DownsamplingFilter);
5008 GRANNY_DYNLINK(void) GrannyEncodeImage(granny_texture_builder * Builder,
5009 granny_int32x Width,
5010 granny_int32x Height,
5011 granny_int32x Stride,
5012 granny_int32x MIPLevelCount,
5013 void const * RGBAData);
5014
5015 /* granny_thread_safety.h bindings: */
5016 GRANNY_DYNLINK(void) GrannySetAllowGlobalStateChanges(bool Allowed);
5017 GRANNY_DYNLINK(bool) GrannyGetAllowGlobalStateChanges(void);
5018 GRANNY_DYNLINK(granny_thread_id_callback *) GrannySetThreadIDCallback(granny_thread_id_callback * Callback);
5019 GRANNY_DYNLINK(bool) GrannyThreadAllowedToCallGranny(void);
5020
5021 /* granny_track_group.h bindings: */
5022 GRANNY_DYNLINK(void) GrannyGetTrackGroupInitialPlacement4x4(granny_track_group * TrackGroup,
5023 granny_real32 * Placement4x4);
5024 GRANNY_DYNLINK(void) GrannyTransformCurve3(granny_transform const * Transform,
5025 granny_int32x Count,
5026 granny_real32 * Curve3);
5027 GRANNY_DYNLINK(void) GrannyTransformCurve4(granny_transform const * Transform,
5028 granny_int32x Count,
5029 granny_real32 * Curve4);
5030 GRANNY_DYNLINK(void) GrannyTransformCurve3x3(granny_transform const * Transform,
5031 granny_int32x Count,
5032 granny_real32 * Curve3x3);
5033 GRANNY_DYNLINK(void) GrannyGetTrackInitialTransform(granny_transform_track const * Track,
5034 granny_transform * Transform);
5035 GRANNY_DYNLINK(void) GrannyRemoveTrackInitialTransform(granny_transform_track * Track);
5036 GRANNY_DYNLINK(bool) GrannyBasisConversionRequiresCurveDecompression(granny_real32 * Affine3,
5037 granny_real32 * Linear3x3,
5038 granny_real32 * InverseLinear3x3,
5039 granny_real32 AffineTolerance,
5040 granny_real32 LinearTolerance,
5041 bool RoundToTolerance);
5042 GRANNY_DYNLINK(void) GrannyTransformCurveVec3(granny_real32 const * Affine3,
5043 granny_real32 const * Linear3x3,
5044 granny_real32 AffineTolerance,
5045 granny_real32 LinearTolerance,
5046 granny_curve2 * Curve);
5047 GRANNY_DYNLINK(void) GrannySimilarityTransformCurvePosition(granny_real32 const * Affine3,
5048 granny_real32 const * Linear3x3,
5049 granny_real32 const * InverseLinear3x3,
5050 granny_real32 AffineTolerance,
5051 granny_real32 LinearTolerance,
5052 granny_curve2 * Curve);
5053 GRANNY_DYNLINK(void) GrannySimilarityTransformCurveQuaternion(granny_real32 const * Affine3,
5054 granny_real32 const * Linear3x3,
5055 granny_real32 const * InverseLinear3x3,
5056 granny_real32 AffineTolerance,
5057 granny_real32 LinearTolerance,
5058 granny_curve2 * Curve);
5059 GRANNY_DYNLINK(void) GrannySimilarityTransformCurveScaleShear(granny_real32 const * Affine3,
5060 granny_real32 const * Linear3x3,
5061 granny_real32 const * InverseLinear3x3,
5062 granny_real32 AffineTolerance,
5063 granny_real32 LinearTolerance,
5064 granny_curve2 * Curve);
5065 GRANNY_DYNLINK(void) GrannySimilarityTransformTrackGroup(granny_track_group * TrackGroup,
5066 granny_real32 const * Affine3,
5067 granny_real32 const * Linear3x3,
5068 granny_real32 const * InverseLinear3x3,
5069 granny_real32 AffineTolerance,
5070 granny_real32 LinearTolerance);
5071 GRANNY_DYNLINK(void) GrannyGetVectorDifferences(granny_int32x VectorDimension,
5072 granny_int32x VectorCount,
5073 granny_real32 const * Vectors,
5074 granny_real32 const * Identity,
5075 granny_vector_diff_mode DiffMode,
5076 granny_real32 * IdentityDifference,
5077 granny_real32 * ConstantDifference);
5078 GRANNY_DYNLINK(bool) GrannyKnotsAreReducible(granny_int32x Degree,
5079 granny_int32x Dimension,
5080 granny_int32x KnotCount,
5081 granny_real32 const * Knots,
5082 granny_real32 const * Controls,
5083 granny_real32 const * Identity,
5084 granny_real32 Epsilon,
5085 granny_vector_diff_mode DiffMode,
5086 granny_int32x * RequiredDegree,
5087 granny_int32x * RequiredKnotCount);
5088 GRANNY_DYNLINK(bool) GrannyCurveIsReducible(granny_curve2 const * Curve,
5089 granny_real32 const * Identity,
5090 granny_real32 Epsilon,
5091 granny_vector_diff_mode DiffMode,
5092 granny_int32x * RequiredDegree,
5093 granny_int32x * RequiredKnotCount);
5094 GRANNY_DYNLINK(bool) GrannyTransformTrackHasKeyframedCurves(granny_transform_track const * Track);
5095 GRANNY_DYNLINK(bool) GrannyTransformTrackIsAnimated(granny_transform_track const * Track);
5096 GRANNY_DYNLINK(bool) GrannyTransformTrackIsIdentity(granny_transform_track const * Track);
5097 GRANNY_DYNLINK(bool) GrannyFindTrackByName(granny_track_group const * TrackGroup,
5098 char const * TrackName,
5099 granny_int32x * TrackIndex);
5100 GRANNY_DYNLINK(bool) GrannyFindTrackByRule(granny_track_group const * TrackGroup,
5101 char const * ProcessedTrackName,
5102 char const * TrackPattern,
5103 granny_int32x * TrackIndex);
5104 GRANNY_DYNLINK(bool) GrannyFindVectorTrackByName(granny_track_group const * TrackGroup,
5105 char const * TrackName,
5106 granny_int32x * VectorTrackIndex);
5107 GRANNY_DYNLINK(bool) GrannyFindVectorTrackByRule(granny_track_group const * TrackGroup,
5108 char const * ProcessedTrackName,
5109 char const * TrackPattern,
5110 granny_int32x * VectorTrackIndex);
5111 GRANNY_DYNLINK(void) GrannyGetTrackGroupFlags(granny_track_group const * TrackGroup,
5112 granny_uint32 * Flags,
5113 granny_uint32 * VDADOFs);
5114 GRANNY_DYNLINK(void) GrannySetTrackGroupFlags(granny_track_group * TrackGroup,
5115 granny_uint32 Flags,
5116 granny_uint32 VDADOFs);
5117 GRANNY_DYNLINK(granny_uint32) GrannyVectorTrackKeyForBone(granny_skeleton * Skeleton,
5118 granny_int32x BoneIndex,
5119 char const* TrackName);
5120 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyVectorTrackType;
5121 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTransformTrackType;
5122 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTextTrackEntryType;
5123 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTextTrackType;
5124 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTrackGroupType;
5125
5126 /* granny_track_group_builder.h bindings: */
5127 GRANNY_DYNLINK(granny_track_group_builder *) GrannyBeginTrackGroup(char const * Name,
5128 granny_int32x VectorTrackCount,
5129 granny_int32x TransformTrackCount,
5130 granny_int32x TextTrackCount,
5131 bool IncludeLODErrorSpace);
5132 GRANNY_DYNLINK(granny_track_group *) GrannyEndTrackGroup(granny_track_group_builder * Builder);
5133 GRANNY_DYNLINK(granny_int32x) GrannyGetResultingTrackGroupSize(granny_track_group_builder const * Builder);
5134 GRANNY_DYNLINK(granny_track_group *) GrannyEndTrackGroupInPlace(granny_track_group_builder * Builder,
5135 void * Memory);
5136 GRANNY_DYNLINK(void) GrannyPushVectorTrackCurve(granny_track_group_builder * Builder,
5137 char const * Name,
5138 granny_uint32 TrackKey,
5139 granny_curve2 const * SourceCurve);
5140 GRANNY_DYNLINK(void) GrannyBeginTransformTrack(granny_track_group_builder * Builder,
5141 char const * Name,
5142 granny_int32x Flags);
5143 GRANNY_DYNLINK(void) GrannySetTransformTrackPositionCurve(granny_track_group_builder * Builder,
5144 granny_curve2 const * SourceCurve);
5145 GRANNY_DYNLINK(void) GrannySetTransformTrackOrientationCurve(granny_track_group_builder * Builder,
5146 granny_curve2 const * SourceCurve);
5147 GRANNY_DYNLINK(void) GrannySetTransformTrackScaleShearCurve(granny_track_group_builder * Builder,
5148 granny_curve2 const * SourceCurve);
5149 GRANNY_DYNLINK(void) GrannyEndTransformTrack(granny_track_group_builder * Builder);
5150 GRANNY_DYNLINK(void) GrannyBeginTextTrack(granny_track_group_builder * Builder,
5151 char const * Name);
5152 GRANNY_DYNLINK(void) GrannyAddTextEntry(granny_track_group_builder * Builder,
5153 granny_real32 TimeStamp,
5154 char const * Text);
5155 GRANNY_DYNLINK(void) GrannyEndTextTrack(granny_track_group_builder * Builder);
5156 GRANNY_DYNLINK(void) GrannyResortTrackGroup(granny_track_group * Group);
5157 GRANNY_DYNLINK(void) GrannyAllocateLODErrorSpace(granny_track_group * Group);
5158 GRANNY_DYNLINK(void) GrannyFreeLODErrorSpace(granny_track_group * Group);
5159 GRANNY_DYNLINK(void) GrannySetAllLODErrorSpace(granny_track_group * Group,
5160 granny_real32 Value);
5161 GRANNY_DYNLINK(void) GrannyResetLODErrorSpace(granny_track_group * Group);
5162
5163 /* granny_track_group_sampler.h bindings: */
5164 GRANNY_DYNLINK(granny_track_group_sampler *) GrannyBeginSampledAnimation(granny_int32x TransformCurveCount,
5165 granny_int32x SampleCount);
5166 GRANNY_DYNLINK(void) GrannyEndSampledAnimation(granny_track_group_sampler * Sampler);
5167 GRANNY_DYNLINK(granny_track_group_sampler *) GrannyBeginSampledAnimationNonBlocked(granny_int32x TransformCurveCount,
5168 granny_int32x SampleCount);
5169 GRANNY_DYNLINK(granny_real32 *) GrannyGetPositionSamples(granny_track_group_sampler * Sampler,
5170 granny_int32x TrackIndex);
5171 GRANNY_DYNLINK(granny_real32 *) GrannyGetOrientationSamples(granny_track_group_sampler * Sampler,
5172 granny_int32x TrackIndex);
5173 GRANNY_DYNLINK(granny_real32 *) GrannyGetScaleShearSamples(granny_track_group_sampler * Sampler,
5174 granny_int32x TrackIndex);
5175 GRANNY_DYNLINK(void) GrannySetTransformSample(granny_track_group_sampler * Sampler,
5176 granny_int32x TrackIndex,
5177 granny_real32 const * Position3,
5178 granny_real32 const * Orientation4,
5179 granny_real32 const * ScaleShear3x3);
5180 GRANNY_DYNLINK(void) GrannyPushSampledFrame(granny_track_group_sampler * Sampler);
5181
5182 /* granny_track_mask.h bindings: */
5183 GRANNY_DYNLINK(granny_track_mask *) GrannyNewTrackMask(granny_real32 DefaultWeight,
5184 granny_int32x BoneCount);
5185 GRANNY_DYNLINK(granny_extract_track_mask_result) GrannyExtractTrackMask(granny_track_mask * TrackMask,
5186 granny_int32x BoneCount,
5187 granny_skeleton const * Skeleton,
5188 char * MaskName,
5189 granny_real32 DefaultWeight,
5190 bool UseParentForDefault);
5191 GRANNY_DYNLINK(granny_real32) GrannyGetTrackMaskBoneWeight(granny_track_mask const * Mask,
5192 granny_int32x BoneIndex);
5193 GRANNY_DYNLINK(void) GrannySetTrackMaskBoneWeight(granny_track_mask * Mask,
5194 granny_int32x BoneIndex,
5195 granny_real32 Weight);
5196 GRANNY_DYNLINK(void) GrannyFreeTrackMask(granny_track_mask * Mask);
5197 GRANNY_DYNLINK(granny_track_mask *) GrannyCopyTrackMask(granny_track_mask const * Mask);
5198 GRANNY_DYNLINK(void) GrannyInvertTrackMask(granny_track_mask * Mask);
5199 GRANNY_DYNLINK(void) GrannySetSkeletonTrackMaskFromTrackGroup(granny_track_mask * Mask,
5200 granny_skeleton const * Skeleton,
5201 granny_track_group const * TrackGroup,
5202 granny_real32 IdentityValue,
5203 granny_real32 ConstantValue,
5204 granny_real32 AnimatedValue);
5205 GRANNY_DYNLINK(void) GrannySetSkeletonTrackMaskChainUpwards(granny_track_mask * Mask,
5206 granny_skeleton const * Skeleton,
5207 granny_int32x ChainLeafBoneIndex,
5208 granny_real32 Weight);
5209 GRANNY_DYNLINK(void) GrannySetSkeletonTrackMaskChainDownwards(granny_track_mask * Mask,
5210 granny_skeleton const * Skeleton,
5211 granny_int32x ChainRootBoneIndex,
5212 granny_real32 Weight);
5213 GRANNY_DYNLINK(granny_int32x) GrannyFindMaskIndexForName(granny_unbound_track_mask * UnboundMask,
5214 char const* Name);
5215 GRANNY_DYNLINK(void) GrannyBindTrackmaskToModel(granny_unbound_track_mask * UnboundMask,
5216 granny_model * Model,
5217 granny_track_mask * Mask);
5218 GRANNY_DYNLINK(void) GrannyBindTrackmaskToTrackGroup(granny_unbound_track_mask * UnboundMask,
5219 granny_track_group * Model,
5220 granny_track_mask * Mask);
5221 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyTrackMaskType;
5222 extern GRANNY_DYNLINKDATA(granny_data_type_definition *) GrannyUnboundTrackMaskType;
5223 extern GRANNY_DYNLINKDATA(granny_track_mask *) GrannyIdentityTrackMask;