aboutsummaryrefslogtreecommitdiff
path: root/tool_src/BspLib/LineSeg3.h
blob: 0f436f392ef129a5d795a95a7d8dcdd43e8b8ae3 (plain)
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
//-----------------------------------------------------------------------------
//	BSPLIB HEADER: LineSeg3.h
//
//  Copyright (c) 1997 by Markus Hadwiger
//  All Rights Reserved.
//-----------------------------------------------------------------------------

#ifndef _LINESEG3_H_
#define _LINESEG3_H_

// bsplib header files
#include "BspLibDefs.h"
#include "Vector3.h"


BSPLIB_NAMESPACE_BEGIN


// line segment in 3-space ----------------------------------------------------
//
class LineSeg3 {

public:
	LineSeg3( const Vertex3& basevtx, const Vector3& dirvec );
	~LineSeg3() { }

	int PointOnLineSeg( const Vertex3& vertex ) const;

private:
	Vertex3	m_basevtx;
	Vector3 m_dirvec;
};

// construct a LineSeg3 using a basevertex and a direction vector -------------
inline LineSeg3::LineSeg3( const Vertex3& basevtx, const Vector3& dirvec )
{
	m_basevtx = basevtx;
	m_dirvec  = dirvec;
}


BSPLIB_NAMESPACE_END


#endif // _LINESEG3_H_