Download include/motionbricks/motionbricks.h from chibifire/motion-bricks.cpp: direct link, hf CLI and curl.
- Browser
- Download file 10.8 kB
-
https://huggingface.co/chibifire/motion-bricks.cpp/resolve/main/include/motionbricks/motionbricks.h
- Command line
-
hf download hf://chibifire/motion-bricks.cpp/include/motionbricks/motionbricks.h
-
curl -L -o motionbricks.h https://huggingface.co/chibifire/motion-bricks.cpp/resolve/main/include/motionbricks/motionbricks.h
10.8 kB
| extern "C" { | |
| typedef uint32_t mb_status; | |
| typedef uint32_t mb_device; | |
| typedef struct mb_runtime_options mb_runtime_options; | |
| typedef struct mb_model mb_model; | |
| typedef struct mb_style mb_style; | |
| typedef struct mb_command mb_command; | |
| typedef struct mb_agent mb_agent; | |
| typedef struct mb_motion mb_motion; | |
| MB_API uint32_t mb_abi_version(void); | |
| MB_API const char * mb_status_string(mb_status status); | |
| /* Runtime options are opaque so FFI callers never reproduce a struct layout. */ | |
| MB_API mb_status mb_runtime_options_create(mb_runtime_options ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API void mb_runtime_options_free(mb_runtime_options * value); | |
| MB_API mb_status mb_runtime_options_set_device(mb_runtime_options * value, mb_device device, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_runtime_options_get_device(const mb_runtime_options * value, mb_device * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_runtime_options_set_threads(mb_runtime_options * value, uint32_t threads, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_runtime_options_get_threads(const mb_runtime_options * value, uint32_t * output, | |
| char * error, uint64_t error_capacity); | |
| /* Passing NULL clears the override. The returned string is borrowed. */ | |
| MB_API mb_status mb_runtime_options_set_backend_directory(mb_runtime_options * value, | |
| const char * directory, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_runtime_options_get_backend_directory(const mb_runtime_options * value, | |
| const char ** output, | |
| char * error, uint64_t error_capacity); | |
| /* A command is independent of compiler layout and may be reused between plans. */ | |
| MB_API mb_status mb_command_create(mb_command ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API void mb_command_free(mb_command * value); | |
| MB_API mb_status mb_command_set_style(mb_command * value, const mb_style * style, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_style(const mb_command * value, const mb_style ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_set_movement_direction(mb_command * value, float x, float y, float z, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_movement_direction(const mb_command * value, | |
| float * x, float * y, float * z, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_set_facing_direction(mb_command * value, float x, float y, float z, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_facing_direction(const mb_command * value, | |
| float * x, float * y, float * z, | |
| char * error, uint64_t error_capacity); | |
| /* A negative speed selects the style's configured speed. */ | |
| MB_API mb_status mb_command_set_target_speed(mb_command * value, float metres_per_second, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_target_speed(const mb_command * value, float * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_set_world_target(mb_command * value, | |
| float x, float y, float z, | |
| float heading_radians, uint32_t enabled, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_world_target(const mb_command * value, | |
| float * x, float * y, float * z, | |
| float * heading_radians, uint32_t * enabled, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_set_seed(mb_command * value, uint64_t seed, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_command_get_seed(const mb_command * value, uint64_t * output, | |
| char * error, uint64_t error_capacity); | |
| /* Neural model, style, and stateful animation planner. */ | |
| MB_API mb_status mb_model_load(const char * bundle_directory, | |
| const mb_runtime_options * options, mb_model ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API void mb_model_free(mb_model * value); | |
| MB_API mb_status mb_model_get_parameter_count(const mb_model * value, uint64_t * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_model_get_joint_count(const mb_model * value, uint32_t * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_model_get_joint_name(const mb_model * value, uint32_t joint, | |
| const char ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_model_get_joint_parent(const mb_model * value, uint32_t joint, | |
| int32_t * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_model_get_neutral_joint_position(const mb_model * value, uint32_t joint, | |
| float * x, float * y, float * z, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_style_load(const mb_model * model, const char * style_path, | |
| mb_style ** output, char * error, uint64_t error_capacity); | |
| MB_API void mb_style_free(mb_style * value); | |
| MB_API mb_status mb_style_get_name(const mb_style * value, const char ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_style_set_speed(mb_style * value, float metres_per_second, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_style_get_speed(const mb_style * value, float * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_agent_create(const mb_model * model, mb_agent ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API void mb_agent_free(mb_agent * value); | |
| MB_API mb_status mb_agent_reset(mb_agent * value, const mb_style * initial_style, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_agent_set_context(mb_agent * value, | |
| const float * root_xyz, | |
| const float * local_rotation_xyzw, | |
| uint64_t frames, uint64_t joints, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_agent_plan(mb_agent * value, const mb_command * command, | |
| mb_motion ** output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_agent_advance(mb_agent * value, uint32_t frames, | |
| char * error, uint64_t error_capacity); | |
| MB_API void mb_motion_free(mb_motion * value); | |
| MB_API mb_status mb_motion_get_frame_count(const mb_motion * value, uint64_t * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_motion_get_joint_count(const mb_motion * value, uint64_t * output, | |
| char * error, uint64_t error_capacity); | |
| /* Borrowed row-major F32 buffers valid until mb_motion_free. */ | |
| MB_API mb_status mb_motion_get_root_translations(const mb_motion * value, | |
| const float ** output, uint64_t * values, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_motion_get_local_rotations_xyzw(const mb_motion * value, | |
| const float ** output, uint64_t * values, | |
| char * error, uint64_t error_capacity); | |
| /* The four placed style-pose constraints actually supplied to the planner. */ | |
| MB_API mb_status mb_motion_get_target_frame_count(const mb_motion * value, uint64_t * output, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_motion_get_target_root_translations(const mb_motion * value, | |
| const float ** output, uint64_t * values, | |
| char * error, uint64_t error_capacity); | |
| MB_API mb_status mb_motion_get_target_local_rotations_xyzw(const mb_motion * value, | |
| const float ** output, uint64_t * values, | |
| char * error, uint64_t error_capacity); | |
| } | |