introduces ios support? still needs metal
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
#include "god/build.h"
|
||||
#include "god/c.h"
|
||||
#include "god/ld.h"
|
||||
#include "god/utils.h"
|
||||
|
||||
char *rapierLib = NULL;
|
||||
void rapier_build(struct build_data b)
|
||||
{
|
||||
struct run_project cargo_build = run_new("cargo");
|
||||
cargo_build.wd = "rapier";
|
||||
run_add_arg(&cargo_build, "build");
|
||||
run_add_arg(&cargo_build, "--release");
|
||||
if (b.kernel == BUILD_KERNEL_LINUX)
|
||||
{
|
||||
run_add_arg(&cargo_build, "--target");
|
||||
run_add_arg(&cargo_build, "x86_64-unknown-linux-gnu");
|
||||
rapierLib = "rapier/target/x86_64-unknown-linux-gnu/release/librapier_rtt.a";
|
||||
}
|
||||
run_run(&cargo_build);
|
||||
struct run_project cbindgen = run_new("cbindgen");
|
||||
cbindgen.wd = "rapier";
|
||||
run_add_arg(&cbindgen, "--config");
|
||||
run_add_arg(&cbindgen, "cbindgen.toml");
|
||||
run_add_arg(&cbindgen, "--crate");
|
||||
run_add_arg(&cbindgen, "rapier_rtt");
|
||||
run_add_arg(&cbindgen, "--output");
|
||||
run_add_arg(&cbindgen, "../public/physics_gen.h");
|
||||
run_run(&cbindgen);
|
||||
}
|
||||
@@ -7,11 +7,13 @@
|
||||
CUtlString rapier_lib;
|
||||
int rapier_build()
|
||||
{
|
||||
rapier_lib = CUtlString("rapier/target/%s/release/librapier_rtt.a",szTarget.GetString());
|
||||
V_printf("%s\n",rapier_lib.GetString());
|
||||
CUtlVector<CUtlString> cargo_args = {
|
||||
"build",
|
||||
"--release",
|
||||
"--target",
|
||||
"x86_64-unknown-linux-gnu"
|
||||
szTarget
|
||||
};
|
||||
IRunner::Run("cargo", "rapier", cargo_args);
|
||||
|
||||
@@ -24,7 +26,6 @@ int rapier_build()
|
||||
"../public/physics_gen.h",
|
||||
};
|
||||
IRunner::Run("cbindgen", "rapier", cbindgen_args);
|
||||
rapier_lib = "rapier/target/x86_64-unknown-linux-gnu/release/librapier_rtt.a";
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -161,6 +161,7 @@ pub unsafe extern "C" fn px_kinematic_position_body(px_world: *mut funnyphysics,
|
||||
.dominance_group(params.dominance)
|
||||
.linear_damping(0.0)
|
||||
.angular_damping(0.0)
|
||||
.ccd_enabled(params.continous == 1)
|
||||
.build();
|
||||
let body = px.rigid_body_set.insert(rigid_body);
|
||||
px.collider_set.insert_with_parent(c.clone(),body,&mut px.rigid_body_set);
|
||||
@@ -284,7 +285,12 @@ pub unsafe extern "C" fn px_box_cast(px_world: *mut funnyphysics, x:f32,y:f32,z:
|
||||
&px.rigid_body_set, &px.collider_set, &shape_pos, &shape_vel, &c, options, filter
|
||||
) {
|
||||
res.time=hit.time_of_impact;
|
||||
res.normal1.m[0] = hit.normal1.x;
|
||||
res.normal1.m[1] = hit.normal1.y;
|
||||
res.normal1.m[2] = hit.normal1.z;
|
||||
res.hit = 1;
|
||||
} else {
|
||||
res.time = time;
|
||||
}
|
||||
res
|
||||
res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user