forked from StrafesNET/strafe-client
lol idk #1
@ -137,22 +137,22 @@ impl PhysicsMesh{
|
|||||||
//go go gadget debug print mesh
|
//go go gadget debug print mesh
|
||||||
let data=PhysicsMeshData{
|
let data=PhysicsMeshData{
|
||||||
faces:vec![
|
faces:vec![
|
||||||
Face{normal:Planar64Vec3::raw( 4294967296, 0, 0),dot:Planar64::raw(4294967296)},
|
Face{normal:Planar64Vec3::raw_xyz( 4294967296, 0, 0),dot:Planar64::raw(4294967296)},
|
||||||
Face{normal:Planar64Vec3::raw( 0, 4294967296, 0),dot:Planar64::raw(4294967296)},
|
Face{normal:Planar64Vec3::raw_xyz( 0, 4294967296, 0),dot:Planar64::raw(4294967296)},
|
||||||
Face{normal:Planar64Vec3::raw( 0, 0, 4294967296),dot:Planar64::raw(4294967296)},
|
Face{normal:Planar64Vec3::raw_xyz( 0, 0, 4294967296),dot:Planar64::raw(4294967296)},
|
||||||
Face{normal:Planar64Vec3::raw(-4294967296, 0, 0),dot:Planar64::raw(4294967296)},
|
Face{normal:Planar64Vec3::raw_xyz(-4294967296, 0, 0),dot:Planar64::raw(4294967296)},
|
||||||
Face{normal:Planar64Vec3::raw( 0,-4294967296, 0),dot:Planar64::raw(4294967296)},
|
Face{normal:Planar64Vec3::raw_xyz( 0,-4294967296, 0),dot:Planar64::raw(4294967296)},
|
||||||
Face{normal:Planar64Vec3::raw( 0, 0,-4294967296),dot:Planar64::raw(4294967296)}
|
Face{normal:Planar64Vec3::raw_xyz( 0, 0,-4294967296),dot:Planar64::raw(4294967296)}
|
||||||
],
|
],
|
||||||
verts:vec![
|
verts:vec![
|
||||||
Vert(Planar64Vec3::raw( 4294967296,-4294967296,-4294967296)),
|
Vert(Planar64Vec3::raw_xyz( 4294967296,-4294967296,-4294967296)),
|
||||||
Vert(Planar64Vec3::raw( 4294967296, 4294967296,-4294967296)),
|
Vert(Planar64Vec3::raw_xyz( 4294967296, 4294967296,-4294967296)),
|
||||||
Vert(Planar64Vec3::raw( 4294967296, 4294967296, 4294967296)),
|
Vert(Planar64Vec3::raw_xyz( 4294967296, 4294967296, 4294967296)),
|
||||||
Vert(Planar64Vec3::raw( 4294967296,-4294967296, 4294967296)),
|
Vert(Planar64Vec3::raw_xyz( 4294967296,-4294967296, 4294967296)),
|
||||||
Vert(Planar64Vec3::raw(-4294967296, 4294967296,-4294967296)),
|
Vert(Planar64Vec3::raw_xyz(-4294967296, 4294967296,-4294967296)),
|
||||||
Vert(Planar64Vec3::raw(-4294967296, 4294967296, 4294967296)),
|
Vert(Planar64Vec3::raw_xyz(-4294967296, 4294967296, 4294967296)),
|
||||||
Vert(Planar64Vec3::raw(-4294967296,-4294967296, 4294967296)),
|
Vert(Planar64Vec3::raw_xyz(-4294967296,-4294967296, 4294967296)),
|
||||||
Vert(Planar64Vec3::raw(-4294967296,-4294967296,-4294967296))
|
Vert(Planar64Vec3::raw_xyz(-4294967296,-4294967296,-4294967296))
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let mesh_topology=PhysicsMeshTopology{
|
let mesh_topology=PhysicsMeshTopology{
|
||||||
|
@ -1161,7 +1161,7 @@ impl PhysicsContext{
|
|||||||
aabb.inflate(data.hitbox_mesh.halfsize);
|
aabb.inflate(data.hitbox_mesh.halfsize);
|
||||||
//common body
|
//common body
|
||||||
let relative_body=VirtualBody::relative(&Body::default(),&state.body).body(state.time);
|
let relative_body=VirtualBody::relative(&Body::default(),&state.body).body(state.time);
|
||||||
data.bvh.the_tester(&aabb,&mut |convex_mesh_id|{
|
data.bvh.the_tester(&aabb,&mut |&convex_mesh_id|{
|
||||||
//no checks are needed because of the time limits.
|
//no checks are needed because of the time limits.
|
||||||
let model_mesh=data.models.mesh(convex_mesh_id);
|
let model_mesh=data.models.mesh(convex_mesh_id);
|
||||||
let minkowski=model_physics::MinkowskiMesh::minkowski_sum(model_mesh,data.hitbox_mesh.transformed_mesh());
|
let minkowski=model_physics::MinkowskiMesh::minkowski_sum(model_mesh,data.hitbox_mesh.transformed_mesh());
|
||||||
|
Loading…
Reference in New Issue
Block a user