added mesh rendering
This commit is contained in:
13
rapier/px.rs
13
rapier/px.rs
@@ -49,9 +49,9 @@ pub unsafe extern "C" fn px_frame(px_world: *mut funnyphysics, delta:f32) {
|
||||
let gravity = vector![0.0, 0.0, -9.81];
|
||||
let mut integration_parameters = IntegrationParameters::default();
|
||||
integration_parameters.dt=delta;
|
||||
integration_parameters.min_island_size=1;
|
||||
integration_parameters.num_solver_iterations=NonZeroUsize::new(4).unwrap();
|
||||
integration_parameters.num_internal_stabilization_iterations=2;
|
||||
integration_parameters.min_island_size=256;
|
||||
integration_parameters.num_solver_iterations=NonZeroUsize::new(8).unwrap();
|
||||
integration_parameters.num_internal_stabilization_iterations=4;
|
||||
let physics_hooks = ();
|
||||
let event_handler = ();
|
||||
if let Some(px) = px_world.as_mut() {
|
||||
@@ -107,6 +107,13 @@ pub unsafe extern "C" fn px_staticbody(px_world: *mut funnyphysics, collider: *m
|
||||
Box::into_raw(Box::new(body))
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn px_fixedbody(px_world: *mut funnyphysics, collider: *mut Collider) {
|
||||
let c = &mut *collider;
|
||||
let px = px_world.as_mut().unwrap();
|
||||
px.collider_set.insert(c.clone());
|
||||
}
|
||||
|
||||
|
||||
#[repr(C)]
|
||||
pub struct px_matrix {
|
||||
|
||||
Reference in New Issue
Block a user