aboutsummaryrefslogtreecommitdiff
path: root/tool_src/BspLib/TriMapping.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/TriMapping.h
downloadopenparsec-main.tar.xz
openparsec-main.zip
initial importHEADmain
Diffstat (limited to 'tool_src/BspLib/TriMapping.h')
-rw-r--r--tool_src/BspLib/TriMapping.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/tool_src/BspLib/TriMapping.h b/tool_src/BspLib/TriMapping.h
new file mode 100644
index 0000000..896b147
--- /dev/null
+++ b/tool_src/BspLib/TriMapping.h
@@ -0,0 +1,43 @@
+//-----------------------------------------------------------------------------
+// BSPLIB HEADER: TriMapping.h
+//
+// Copyright (c) 1997 by Markus Hadwiger
+// All Rights Reserved.
+//-----------------------------------------------------------------------------
+
+#ifndef _TRIMAPPING_H_
+#define _TRIMAPPING_H_
+
+// bsplib header files
+#include "BspLibDefs.h"
+#include "SystemIO.h"
+#include "Vertex.h"
+
+
+BSPLIB_NAMESPACE_BEGIN
+
+
+// affine mapping specification for a triangle --------------------------------
+//
+class TriMapping : public virtual SystemIO {
+
+ void Error() const;
+
+public:
+ TriMapping() { }
+ ~TriMapping() { }
+
+ Vertex2& getMapXY( int indx ) { if ( indx > 2 ) Error(); return map_xy[ indx ]; }
+ Vertex2& getMapUV( int indx ) { if ( indx > 2 ) Error(); return map_uv[ indx ]; }
+
+private:
+ Vertex2 map_xy[ 3 ]; // mapping is specified via three
+ Vertex2 map_uv[ 3 ]; // point correspondences
+};
+
+
+BSPLIB_NAMESPACE_END
+
+
+#endif // _TRIMAPPING_H_
+