aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/cplane.h
blob: 98d5b45852f205b9f6f79f7f5ed6731836fab5de (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//
//=============================================================================//
#pragma once

#ifndef CPLANE_H
#define CPLANE_H

//=========================================================
// Plane
//=========================================================
class CPlane 
{
public:
	CPlane ( void );

	//=========================================================
	// InitializePlane - Takes a normal for the plane and a
	// point on the plane and 
	//=========================================================
	void InitializePlane ( const Vector &vecNormal, const Vector &vecPoint );

	//=========================================================
	// PointInFront - determines whether the given vector is 
	// in front of the plane. 
	//=========================================================
	bool PointInFront ( const Vector &vecPoint );

	//=========================================================
	// How far off the plane is this point?
	//=========================================================
	float PointDist( const Vector &vecPoint );

private:
	Vector	m_vecNormal;
	float	m_flDist;
	bool	m_fInitialized;
};

#endif //CPLANE_H