Rev 1 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | #ifndef _RAYCAST_H_ |
2 | #define _RAYCAST_H_ |
||
3 | |||
4 | #include "dr_types.h" |
||
5 | |||
6 | extern br_matrix34 gPick_model_to_view__raycast; // suffix added to avoid duplicate symbol |
||
7 | extern int gBelow_face_index; |
||
8 | extern br_scalar gCurrent_y; |
||
9 | extern int gAbove_face_index; |
||
10 | extern br_model* gAbove_model; |
||
11 | extern br_model* gBelow_model; |
||
12 | extern br_scalar gHighest_y_below; |
||
13 | extern br_actor* gY_picking_camera; |
||
14 | extern br_scalar gLowest_y_above; |
||
15 | |||
16 | // Added, probably can be replaced with NULL |
||
17 | extern br_model* model_unk1; |
||
18 | extern br_material* material_unk1; |
||
19 | |||
20 | int DRActorToRoot(br_actor* a, br_actor* world, br_matrix34* m); |
||
21 | |||
22 | void InitRayCasting(void); |
||
23 | |||
24 | // Suffix added to avoid duplicate symbol |
||
25 | int BadDiv__raycast(br_scalar a, br_scalar b); |
||
26 | |||
27 | // Suffix added to avoid duplicate symbol |
||
28 | void DRVector2AccumulateScale__raycast(br_vector2* a, br_vector2* b, br_scalar s); |
||
29 | |||
30 | // Suffix added to avoid duplicate symbol |
||
31 | int PickBoundsTestRay__raycast(br_bounds* b, br_vector3* rp, br_vector3* rd, br_scalar t_near, br_scalar t_far, br_scalar* new_t_near, br_scalar* new_t_far); |
||
32 | |||
33 | int ActorPick2D(br_actor* ap, br_model* model, br_material* material, dr_pick2d_cbfn* callback, void* arg); |
||
34 | |||
35 | int DRScenePick2DXY(br_actor* world, br_actor* camera, br_pixelmap* viewport, int pick_x, int pick_y, dr_pick2d_cbfn* callback, void* arg); |
||
36 | |||
37 | int DRScenePick2D(br_actor* world, br_actor* camera, dr_pick2d_cbfn* callback, void* arg); |
||
38 | |||
39 | int DRModelPick2D__raycast(br_model* model, br_material* material, br_vector3* ray_pos, br_vector3* ray_dir, br_scalar t_near, br_scalar t_far, dr_modelpick2d_cbfn* callback, void* arg); |
||
40 | |||
41 | // Suffix added to avoid duplicate symbol |
||
42 | int FindHighestPolyCallBack__raycast(br_model* pModel, br_material* pMaterial, br_vector3* pRay_pos, br_vector3* pRay_dir, br_scalar pT, int pF, int pE, int pV, br_vector3* pPoint, br_vector2* pMap, void* pArg); |
||
43 | |||
44 | // Suffix added to avoid duplicate symbol |
||
45 | int FindHighestCallBack__raycast(br_actor* pActor, br_model* pModel, br_material* pMaterial, br_vector3* pRay_pos, br_vector3* pRay_dir, br_scalar pT_near, br_scalar pT_far, void* pArg); |
||
46 | |||
47 | void FindBestY(br_vector3* pPosition, br_actor* gWorld, br_scalar pStarting_height, br_scalar* pNearest_y_above, br_scalar* pNearest_y_below, br_model** pNearest_above_model, br_model** pNearest_below_model, int* pNearest_above_face_index, int* pNearest_below_face_index); |
||
48 | |||
49 | int FindYVerticallyBelowPolyCallBack(br_model* pModel, br_material* pMaterial, br_vector3* pRay_pos, br_vector3* pRay_dir, br_scalar pT, int pF, int pE, int pV, br_vector3* pPoint, br_vector2* pMap, void* pArg); |
||
50 | |||
51 | int FindYVerticallyBelowCallBack(br_actor* pActor, br_model* pModel, br_material* pMaterial, br_vector3* pRay_pos, br_vector3* pRay_dir, br_scalar pT_near, br_scalar pT_far, void* pArg); |
||
52 | |||
53 | br_scalar FindYVerticallyBelow(br_vector3* pPosition); |
||
54 | |||
55 | br_scalar FindYVerticallyBelow2(br_vector3* pCast_point); |
||
56 | |||
57 | #endif |