Subversion Repositories Games.Carmageddon

Rev

Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
#ifndef _FINTERAY_H_
2
#define _FINTERAY_H_
3
 
20 pmbaty 4
#include "brender/br_types.h"
1 pmbaty 5
#include "dr_types.h"
6
 
7
extern int gPling_materials;
8
extern br_material* gSub_material;
9
extern br_material* gReal_material;
10
extern int gNfaces;
11
extern br_matrix34 gPick_model_to_view__finteray; // suffix added to avoid duplicate symbol
12
extern int gTemp_group;
13
extern br_model* gNearest_model;
14
extern br_model* gSelected_model;
15
extern int gNearest_face_group;
16
extern int gNearest_face;
17
extern br_scalar gNearest_T;
18
extern tFace_ref* gPling_face;
19
 
20
// Suffix added to avoid duplicate symbol
21
int BadDiv__finteray(br_scalar a, br_scalar b);
22
 
23
// Suffix added to avoid duplicate symbol
24
void DRVector2AccumulateScale__finteray(br_vector2* a, br_vector2* b, br_scalar s);
25
 
26
// Suffix added to avoid duplicate symbol
27
int PickBoundsTestRay__finteray(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);
28
 
29
int ActorRayPick2D(br_actor* ap, br_vector3* pPosition, br_vector3* pDir, br_model* model, br_material* material, dr_pick2d_cbfn* callback);
30
 
31
int DRSceneRayPick2D(br_actor* world, br_vector3* pPosition, br_vector3* pDir, dr_pick2d_cbfn* callback);
32
 
33
// Suffix added to avoid duplicate symbol
34
int DRModelPick2D__finteray(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);
35
 
36
// Suffix added to avoid duplicate symbol
37
int FindHighestPolyCallBack__finteray(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);
38
 
39
// Suffix added to avoid duplicate symbol
40
int FindHighestCallBack__finteray(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);
41
 
42
void FindFace(br_vector3* pPosition, br_vector3* pDir, br_vector3* nor, br_scalar* t, br_material** material);
43
 
44
void EnablePlingMaterials(void);
45
 
46
void DisablePlingMaterials(void);
47
 
48
void CheckSingleFace(tFace_ref* pFace, br_vector3* ray_pos, br_vector3* ray_dir, br_vector3* normal, br_scalar* rt);
49
 
50
void MultiRayCheckSingleFace(int pNum_rays, tFace_ref* pFace, br_vector3* ray_pos, br_vector3* ray_dir, br_vector3* normal, br_scalar* rt);
51
 
52
void GetNewBoundingBox(br_bounds* b2, br_bounds* b1, br_matrix34* m);
53
 
54
int FindFacesInBox(tBounds* bnds, tFace_ref* face_list, int max_face);
55
 
56
int FindFacesInBox2(tBounds* bnds, tFace_ref* face_list, int max_face);
57
 
58
int ActorBoxPick(tBounds* bnds, br_actor* ap, br_model* model, br_material* material, tFace_ref* face_list, int max_face, br_matrix34* pMat);
59
 
60
int ModelPickBox(br_actor* actor, tBounds* bnds, br_model* model, br_material* model_material, tFace_ref* face_list, int max_face, br_matrix34* pMat);
61
 
62
void ClipToPlaneGE(br_vector3* p, int* nv, int i, br_scalar limit);
63
 
64
void ClipToPlaneLE(br_vector3* p, int* nv, int i, br_scalar limit);
65
 
66
// Suffix added to avoid duplicate symbol
67
int BoundsOverlapTest__finteray(br_bounds* b1, br_bounds* b2);
68
 
69
int BoundsTransformTest(br_bounds* b1, br_bounds* b2, br_matrix34* M);
70
 
71
int LineBoxColl(br_vector3* o, br_vector3* p, br_bounds* pB, br_vector3* pHit_point);
72
 
73
int SphereBoxIntersection(br_bounds* pB, br_vector3* pC, br_scalar pR_squared, br_vector3* pHit_point);
74
 
75
int LineBoxCollWithSphere(br_vector3* o, br_vector3* p, br_bounds* pB, br_vector3* pHit_point);
76
 
77
int CompVert(int v1, int v2);
78
 
79
void SetFacesGroup(int pFace);
80
 
81
void SelectFace(br_vector3* pDir);
82
 
83
void GetTilingLimits(br_vector2* min, br_vector2* max);
84
 
85
void Scale(int pD, int factor);
86
 
87
void ScaleUpX(void);
88
 
89
void ScaleDnX(void);
90
 
91
void ScaleUpY(void);
92
 
93
void ScaleDnY(void);
94
 
95
void SelectFaceForward(void);
96
 
97
void SelectFaceDown(void);
98
 
99
#endif