diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/DispShore.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/DispShore.h')
| -rw-r--r-- | hammer/DispShore.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/hammer/DispShore.h b/hammer/DispShore.h new file mode 100644 index 0000000..4169176 --- /dev/null +++ b/hammer/DispShore.h @@ -0,0 +1,79 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// +//============================================================================= + +#ifndef DISPSHORE_H +#define DISPSHORE_H +#pragma once + +#include "MapHelper.h" +#include "MapFace.h" +#include "MapOverlay.h" +#include "MapOverlayTrans.h" + +class CHelperInfo; +class CMapEntity; + +struct ShoreFaceData_t +{ + CMapFace *m_pFaces[4]; // The hammer faces the points reside on. + Vector m_vecPoints[4]; // The shore face points. + Vector2D m_vecTexCoords[4]; // The shore texture coordinates. + bool m_bAdjWinding; +}; + +struct ShoreSegment_t +{ + Vector m_vecPoints[2]; // Shore segment points. + Vector m_vecNormals[2]; // Shore segment normals. + Vector2D m_vecTexCoords[4]; // Shore segment texture coordinates. + + EditDispHandle_t m_hDisp; // Displacement the shore segment was created from. + float m_flWaterZ; + + ShoreFaceData_t m_WorldFace; + ShoreFaceData_t m_WaterFace; + + // ? + Vector m_vecCenter; + unsigned int m_iStartPoint; + bool m_bTouch; + bool m_bCreated; +}; + +struct Shoreline_t +{ + int m_nShorelineId; + CUtlVector<ShoreSegment_t> m_aSegments; // List of shore segments making up the shore line. + CUtlVector<int> m_aSortedSegments; // List of shore segments sorted (for connectivity). + CUtlVector<CMapOverlay> m_aOverlays; + float m_flLength; // Total length of the shore line. + ShoreEntityData_t m_ShoreData; + + Shoreline_t(); + ~Shoreline_t(); + void AddSegment( Vector &vecPoint0, Vector &vecPoint1, Vector &vecNormal, float flWaterZ, CMapFace *pWaterFace, EditDispHandle_t hDisp ); +}; + +class IDispShoreManager +{ +public: + + virtual bool Init( void ) = 0; + virtual void Shutdown( void ) = 0; + + // Shoreline management. + virtual int GetShorelineCount( void ) = 0; + virtual Shoreline_t *GetShoreline( int nShorelineId ) = 0; + virtual void AddShoreline( int nShorelineId ) = 0; + virtual void RemoveShoreline( int nShorelineId ) = 0; + virtual void BuildShoreline( int nShorelineId, CUtlVector<CMapFace*> &aFaces, CUtlVector<CMapFace*> &aWaterFaces ) = 0; + + virtual void Draw( CRender3D *pRender ) = 0; + virtual void DebugDraw( CRender3D *pRender ) = 0; +}; + +IDispShoreManager *GetShoreManager( void ); + +#endif // DISPSHORE_H
\ No newline at end of file |