Files
armorpaint/paint/sources/util_particle.c
T

23 lines
493 B
C
Raw Normal View History

2026-03-09 13:17:15 +01:00
#include "global.h"
2026-03-06 12:56:38 +01:00
void util_particle_init_mesh() {
2026-04-05 16:41:00 +02:00
if (g_context->paint_body != NULL) {
2026-03-06 12:56:38 +01:00
return;
}
2026-04-05 16:41:00 +02:00
if (g_context->merged_object == NULL) {
2026-03-07 21:12:59 +01:00
util_mesh_merge(NULL);
2026-03-06 12:56:38 +01:00
}
2026-04-05 16:41:00 +02:00
g_context->paint_body = physics_body_create();
g_context->paint_body->shape = PHYSICS_SHAPE_MESH;
2026-05-12 13:58:45 +02:00
physics_body_init(g_context->paint_body, g_context->merged_object->base);
2026-03-06 12:56:38 +01:00
}
2026-04-04 21:38:20 +02:00
void util_particle_init_physics() {
2026-05-12 13:58:45 +02:00
if (physics_world_active == NULL) {
physics_world_create();
2026-04-04 21:38:20 +02:00
}
util_particle_init_mesh();
}