aboutsummaryrefslogtreecommitdiff
path: root/tool_src/BspLib/LineSeg2.h
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
commitc068f22329d5cc722622a2183bbb22eef2093df7 (patch)
tree12d56c1aede67988a55e241364606bfbb4dba933 /tool_src/BspLib/LineSeg2.h
downloadopenparsec-main.tar.xz
openparsec-main.zip
initial importHEADmain
Diffstat (limited to 'tool_src/BspLib/LineSeg2.h')
-rw-r--r--tool_src/BspLib/LineSeg2.h46
1 files changed, 46 insertions, 0 deletions
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_
+