summaryrefslogtreecommitdiff
path: root/hammer/mappoint.cpp
blob: d821172720fe015b1f9f88b79e506980eba1e9b6 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#include "stdafx.h"
#include "Box3D.h"
#include "MapDefs.h" // for COORD_NOTINIT
#include "MapPoint.h"
#include "hammer_mathlib.h"

// memdbgon must be the last include file in a .cpp file!!!
#include <tier0/memdbgon.h>


//-----------------------------------------------------------------------------
// Purpose: Constructor. Initializes the origin point to all zeros.
//-----------------------------------------------------------------------------
CMapPoint::CMapPoint(void)
{
	m_Origin.Init();
}


//-----------------------------------------------------------------------------
// Purpose: Returns this point's X, Y, Z coordinates.
//-----------------------------------------------------------------------------
void CMapPoint::GetOrigin(Vector &Origin)
{
	Origin = m_Origin;
}


//-----------------------------------------------------------------------------
// Purpose: Sets this point's X, Y, Z coordinates.
//-----------------------------------------------------------------------------
void CMapPoint::SetOrigin(Vector &Origin)
{
	m_Origin = Origin;
}


//-----------------------------------------------------------------------------
// Purpose: 
// Input  : pTransBox - 
//-----------------------------------------------------------------------------
void CMapPoint::DoTransform(const VMatrix &matrix)
{
	TransformPoint( matrix, m_Origin );
}