diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /tool_src/BspLib/LineSeg3.h | |
| download | openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.tar.xz openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.zip | |
Diffstat (limited to 'tool_src/BspLib/LineSeg3.h')
| -rw-r--r-- | tool_src/BspLib/LineSeg3.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tool_src/BspLib/LineSeg3.h b/tool_src/BspLib/LineSeg3.h new file mode 100644 index 0000000..0f436f3 --- /dev/null +++ b/tool_src/BspLib/LineSeg3.h @@ -0,0 +1,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_ + |
