From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- tool_src/BspLib/LineSeg2.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tool_src/BspLib/LineSeg2.h (limited to 'tool_src/BspLib/LineSeg2.h') diff --git a/tool_src/BspLib/LineSeg2.h b/tool_src/BspLib/LineSeg2.h new file mode 100644 index 0000000..96cdbb8 --- /dev/null +++ b/tool_src/BspLib/LineSeg2.h @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// BSPLIB HEADER: LineSeg2.h +// +// Copyright (c) 1997 by Markus Hadwiger +// All Rights Reserved. +//----------------------------------------------------------------------------- + +#ifndef _LINESEG2_H_ +#define _LINESEG2_H_ + +// bsplib header files +#include "BspLibDefs.h" +#include "Vector2.h" + + +BSPLIB_NAMESPACE_BEGIN + + +// line segment in 2-space ---------------------------------------------------- +// +class LineSeg2 { + +public: + LineSeg2( const Vertex2& basevtx, const Vector2& dirvec ); + ~LineSeg2() { } + + int PointOnLineSeg( const Vertex2& vertex ) const; + +private: + Vertex2 m_basevtx; + Vector2 m_dirvec; +}; + +// construct a LineSeg2 using a basevertex and a direction vector ------------- +inline LineSeg2::LineSeg2( const Vertex2& basevtx, const Vector2& dirvec ) +{ + m_basevtx = basevtx; + m_dirvec = dirvec; +} + + +BSPLIB_NAMESPACE_END + + +#endif // _LINESEG2_H_ + -- cgit v1.2.3