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/mapline.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/mapline.h')
| -rw-r--r-- | hammer/mapline.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/hammer/mapline.h b/hammer/mapline.h new file mode 100644 index 0000000..c140e1c --- /dev/null +++ b/hammer/mapline.h @@ -0,0 +1,86 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef MAPLINE_H +#define MAPLINE_H +#pragma once + + +#include "MapHelper.h" + + +class CRender3D; + + +#define MAX_KEYNAME_SIZE 32 + + +class CMapLine : public CMapHelper +{ + public: + + DECLARE_MAPCLASS(CMapLine,CMapHelper) + + // + // Factory for building from a list of string parameters. + // + static CMapClass *Create(CHelperInfo *pInfo, CMapEntity *pParent); + + // + // Construction/destruction: + // + CMapLine(void); + CMapLine(const char *pszStartValueKey, const char *pszStartKey, const char *pszEndValueKey, const char *pszEndKey); + ~CMapLine(void); + + void Initialize(void); + + void BuildLine(void); + void CalcBounds(BOOL bFullUpdate = FALSE); + + virtual CMapClass *Copy(bool bUpdateDependencies); + virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies); + + void Render3D(CRender3D *pRender); + void Render2D(CRender2D *pRender); + + int SerializeRMF(std::fstream &File, BOOL bRMF); + int SerializeMAP(std::fstream &File, BOOL bRMF); + + bool IsVisualElement(void) { return(true); } + bool IsCulledByCordon(const Vector &vecMins, const Vector &vecMaxs) { return false; } // We don't hide unless our parent hides. + + virtual CMapClass *PrepareSelection(SelectMode_t eSelectMode); + + const char* GetDescription() { return("Line helper"); } + + void OnAddToWorld(CMapWorld *pWorld); + void OnNotifyDependent(CMapClass *pObject, Notify_Dependent_t eNotifyType); + void OnParentKeyChanged( const char* key, const char* value ); + void OnRemoveFromWorld(CMapWorld *pWorld, bool bNotifyChildren); + + virtual void UpdateDependencies(CMapWorld *pWorld, CMapClass *pObject); + + protected: + + // + // Implements CMapAtom transformation functions. + // + void DoTransform(const VMatrix &matrix); + + char m_szStartValueKey[80]; // The key in our parent entity to look at for our start target. + char m_szStartKey[80]; // The value in our parent entity to look at for our start target. + + char m_szEndValueKey[80]; // + char m_szEndKey[80]; // + + CMapEntity *m_pStartEntity; // Our start target. + CMapEntity *m_pEndEntity; // Our end target. +}; + + +#endif // MAPLINE_H |