summaryrefslogtreecommitdiff
path: root/hammer/mapquadbounds.h
blob: 0ef22eab337f76fc7eb47d2efedc5e273e19c8c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: A helper that measures the extents of the only non-NODRAW face of
//			its only solid sibling. Writes the extents as four vector keyvalues:
//
//				lowerleft
//				upperleft
//				lowerright
//				upperright
//			
//			ASSUMPTIONS:
//
//			1. Only one solid sibling.
//			2. That solid only has one face with a texture other than "toolsnodraw".
//
// $NoKeywords: $
//=============================================================================//

#ifndef MAPQUADBOUNDS_H
#define MAPQUADBOUNDS_H
#pragma once

#include "MapHelper.h"


class CHelperInfo;
class CRender3D;


class CMapQuadBounds : public CMapHelper
{
	public:

		DECLARE_MAPCLASS(CMapQuadBounds,CMapHelper)

		//
		// Factory for building from a list of string parameters.
		//
		static CMapClass *CreateQuadBounds(CHelperInfo *pInfo, CMapEntity *pParent);

		//
		// Construction/destruction:
		//
		CMapQuadBounds(void);
		~CMapQuadBounds(void);

		void PresaveWorld(void);

		virtual CMapClass *Copy(bool bUpdateDependencies);
		virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);

		int SerializeRMF(std::fstream &File, BOOL bRMF) { return(0); }
		int SerializeMAP(std::fstream &File, BOOL bRMF) { return(0); }

		bool IsVisualElement(void) { return(false); } // Only visible when the parent entity is selected.
		
		const char* GetDescription() { return("Quad bounds helper"); }

	protected:
		Vector			m_vLowerLeft;
		Vector			m_vUpperLeft;
		Vector			m_vLowerRight;
		Vector			m_vUpperRight;
		int				m_nError;
};

#endif // MAPQUADBOUNDS_H