예제 #1
0
Sim_Body* sim_get_next_body(Simulator* sim)
{
	if(sim->bodies_count + 1 > sim->bodies_capacity) {
		Log_Error("Ran out of bodies");
		return NULL;
	}

	Sim_Body* e = sim->bodies + sim->bodies_count++;
	init_body(e);
	e->id = sim->next_body_id++;

	return e;
}
예제 #2
0
void init_robot()
{
    init_bumper();
    init_body();
    init_wheels();
}