diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/vphysics/virtualmesh.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/vphysics/virtualmesh.h')
| -rw-r--r-- | sp/src/public/vphysics/virtualmesh.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sp/src/public/vphysics/virtualmesh.h b/sp/src/public/vphysics/virtualmesh.h new file mode 100644 index 00000000..3300d02d --- /dev/null +++ b/sp/src/public/vphysics/virtualmesh.h @@ -0,0 +1,46 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef VIRTUALMESH_H
+#define VIRTUALMESH_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+// NOTE: These are fixed length to make it easy to fill these out without memory allocation or storage
+const int MAX_VIRTUAL_TRIANGLES = 1024;
+struct virtualmeshlist_t
+{
+ Vector *pVerts;
+ int indexCount;
+ int triangleCount;
+ int vertexCount;
+ int surfacePropsIndex;
+ byte *pHull;
+ unsigned short indices[MAX_VIRTUAL_TRIANGLES*3];
+};
+
+struct virtualmeshtrianglelist_t
+{
+ int triangleCount;
+ unsigned short triangleIndices[MAX_VIRTUAL_TRIANGLES*3];
+};
+
+class IVirtualMeshEvent
+{
+public:
+ virtual void GetVirtualMesh( void *userData, virtualmeshlist_t *pList ) = 0;
+ virtual void GetWorldspaceBounds( void *userData, Vector *pMins, Vector *pMaxs ) = 0;
+ virtual void GetTrianglesInSphere( void *userData, const Vector ¢er, float radius, virtualmeshtrianglelist_t *pList ) = 0;
+};
+struct virtualmeshparams_t
+{
+ IVirtualMeshEvent *pMeshEventHandler;
+ void *userData;
+ bool buildOuterHull;
+};
+
+#endif // VIRTUALMESH_H
|