convert line ends
[canaan.git] / prj / cam / src / physics / phmodbsp.h
blob28d5440e28a979ad6bb7fb9f020271ff061b0855
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 ///////////////////////////////////////////////////////////////////////////////
7 // $Header: r:/t2repos/thief2/src/physics/phmodbsp.h,v 1.9 2000/01/29 13:32:53 adurant Exp $
8 //
9 //
11 #pragma once
13 #ifndef __PHMODBSP_H
14 #define __PHMODBSP_H
16 #include <phmod.h>
18 #pragma pack(4)
20 ///////////////////////////////////////////////////////////////////////////////
22 // CLASS: cPhysBSPModel
24 // A BSP model
27 class cPhysBSPModel : public cPhysModel
29 public:
30 ////////////////////////////////////
32 // Constructors
34 cPhysBSPModel(ObjID objID, tPhysSubModId numSubModels, unsigned flags);
35 cPhysBSPModel(PhysReadWrite func);
37 ////////////////////////////////////
39 // I/O
41 void Write(PhysReadWrite func) const;
43 ////////////////////////////////////
45 // Check for a terrain collision in the specified time
47 // this just warns, since we can't move BSP models yet
49 BOOL CheckTerrainCollision(tPhysSubModId subModId, mxs_real t0, mxs_real dt, cPhysClsn ** ppClsn);
51 ////////////////////////////////////
53 // Distance from given polygon
55 // TODO: actually write this, it just warns currently
57 mxs_real TerrainDistance(tPhysSubModId subModId, cFaceContact *pFaceContact) const;
58 mxs_real TerrainDistance(tPhysSubModId subModId, cEdgeContact *pEdgeContact) const;
59 mxs_real TerrainDistance(tPhysSubModId subModId, cVertexContact *pVertexContact) const;
61 ////////////////////////////////////
63 // It would be nice to have these actually test for intersection, etc.
65 ePhysIntersectResult TestLocationVec(int subModId, const mxs_vector & LocationVec) const;
66 ePhysIntersectResult TestRotation(int subModId, const mxs_vector & Rotation) const;
68 ////////////////////////////////////
70 // Update physics refs from stationary position
72 void UpdateRefs();
74 ////////////////////////////////////
76 // Get overall model size
78 mxs_real GetSize() const;
80 ////////////////////////////////////
82 // Access BSP model
84 mds_model * GetMDSModel();
88 ///////////////////////////////////////////////////////////////////////////////
90 // CLASS: cPhysBSPModel, inline functions
92 inline mxs_real cPhysBSPModel::GetSize() const
94 CriticalMsg("cPhysBSPModel::GetSize: not yet implemented\n");
95 return 0;
98 #pragma pack()
100 #endif /* defined(_MSC_VER) */