projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revision 2
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_physics.c
diff --git
a/world_physics.c
b/world_physics.c
index ebe8f89110b8b4d2a0793d48809ca502c6e91d45..03be1fc27fd7c7744bd526e6d03b5391eaa4a5d1 100644
(file)
--- a/
world_physics.c
+++ b/
world_physics.c
@@
-4,15
+4,14
@@
#include "world.h"
#include "world_physics.h"
#include "world.h"
#include "world_physics.h"
-static void ray_world_get_tri( world_instance *world,
- ray_hit *hit, v3f tri[3] )
+void ray_world_get_tri( world_instance *world, ray_hit *hit, v3f tri[3] )
{
for( int i=0; i<3; i++ )
v3_copy( world->scene_geo.arrvertices[ hit->tri[i] ].co, tri[i] );
}
{
for( int i=0; i<3; i++ )
v3_copy( world->scene_geo.arrvertices[ hit->tri[i] ].co, tri[i] );
}
-
static
int ray_world( world_instance *world,
-
v3f pos, v3f dir, ray_hit *hit, u16 ignore )
+int ray_world( world_instance *world,
+ v3f pos, v3f dir, ray_hit *hit, u16 ignore )
{
return scene_raycast( &world->scene_geo, world->geo_bh, pos, dir, hit,
ignore );
{
return scene_raycast( &world->scene_geo, world->geo_bh, pos, dir, hit,
ignore );
@@
-21,9
+20,8
@@
static int ray_world( world_instance *world,
/*
* Cast a sphere from a to b and see what time it hits
*/
/*
* Cast a sphere from a to b and see what time it hits
*/
-static int spherecast_world( world_instance *world,
- v3f pa, v3f pb, float r, float *t, v3f n,
- u16 ignore )
+int spherecast_world( world_instance *world,
+ v3f pa, v3f pb, float r, float *t, v3f n, u16 ignore )
{
boxf region;
box_init_inf( region );
{
boxf region;
box_init_inf( region );
@@
-80,9
+78,8
@@
static int spherecast_world( world_instance *world,
return hit;
}
return hit;
}
-static
struct world_surface *world_tri_index_surface( world_instance *world,
struct world_surface *world_tri_index_surface( world_instance *world,
-
u32 index )
+ u32 index )
{
for( int i=1; i<world->surface_count; i++ ){
struct world_surface *surf = &world->surfaces[i];
{
for( int i=1; i<world->surface_count; i++ ){
struct world_surface *surf = &world->surfaces[i];
@@
-97,14
+94,12
@@
struct world_surface *world_tri_index_surface( world_instance *world,
return &world->surfaces[0];
}
return &world->surfaces[0];
}
-static struct world_surface *world_contact_surface( world_instance *world,
- rb_ct *ct )
+struct world_surface *world_contact_surface( world_instance *world, rb_ct *ct )
{
return world_tri_index_surface( world, ct->element_id );
}
{
return world_tri_index_surface( world, ct->element_id );
}
-static struct world_surface *ray_hit_surface( world_instance *world,
- ray_hit *hit )
+struct world_surface *ray_hit_surface( world_instance *world, ray_hit *hit )
{
return world_tri_index_surface( world, hit->tri[0] );
}
{
return world_tri_index_surface( world, hit->tri[0] );
}