Rev 18 | 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 | |||
20 | pmbaty | 4 | #include "brender/br_types.h" |
1 | pmbaty | 5 | #include "dr_types.h" |
6 | |||
7 | extern br_matrix34 gPick_model_to_view__raycast; // suffix added to avoid duplicate symbol |
||
8 | extern int gBelow_face_index; |
||
9 | extern br_scalar gCurrent_y; |
||
10 | extern int gAbove_face_index; |
||
11 | extern br_model* gAbove_model; |
||
12 | extern br_model* gBelow_model; |
||
13 | extern br_scalar gHighest_y_below; |
||
14 | extern br_actor* gY_picking_camera; |
||
15 | extern br_scalar gLowest_y_above; |
||
16 | |||
17 | // Added, probably can be replaced with NULL |
||
18 | extern br_model* model_unk1; |
||
19 | extern br_material* material_unk1; |
||
20 | |||
21 | int DRActorToRoot(br_actor* a, br_actor* world, br_matrix34* m); |
||
22 | |||
23 | void InitRayCasting(void); |
||
24 | |||
25 | // Suffix added to avoid duplicate symbol |
||
26 | int BadDiv__raycast(br_scalar a, br_scalar b); |
||
27 | |||
28 | // Suffix added to avoid duplicate symbol |
||
29 | void DRVector2AccumulateScale__raycast(br_vector2* a, br_vector2* b, br_scalar s); |
||
30 | |||
31 | // Suffix added to avoid duplicate symbol |
||
32 | 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); |
||
33 | |||
34 | int ActorPick2D(br_actor* ap, br_model* model, br_material* material, dr_pick2d_cbfn* callback, void* arg); |
||
35 | |||
36 | int DRScenePick2DXY(br_actor* world, br_actor* camera, br_pixelmap* viewport, int pick_x, int pick_y, dr_pick2d_cbfn* callback, void* arg); |
||
37 | |||
38 | int DRScenePick2D(br_actor* world, br_actor* camera, dr_pick2d_cbfn* callback, void* arg); |
||
39 | |||
40 | 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); |
||
41 | |||
42 | // Suffix added to avoid duplicate symbol |
||
43 | 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); |
||
44 | |||
45 | // Suffix added to avoid duplicate symbol |
||
46 | 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); |
||
47 | |||
48 | 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); |
||
49 | |||
50 | 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); |
||
51 | |||
52 | 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); |
||
53 | |||
54 | br_scalar FindYVerticallyBelow(br_vector3* pPosition); |
||
55 | |||
56 | br_scalar FindYVerticallyBelow2(br_vector3* pCast_point); |
||
57 | |||
58 | #endif |