summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/TriStripper.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/TriStripper.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Graphics/TriStripper.h')
-rw-r--r--Runtime/Graphics/TriStripper.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Runtime/Graphics/TriStripper.h b/Runtime/Graphics/TriStripper.h
new file mode 100644
index 0000000..63d02fe
--- /dev/null
+++ b/Runtime/Graphics/TriStripper.h
@@ -0,0 +1,22 @@
+#ifndef TRISTRIPPER_H
+#define TRISTRIPPER_H
+
+#include <vector>
+#include "Runtime/Allocator/MemoryMacros.h"
+#include "Runtime/Modules/ExportModules.h"
+
+bool EXPORT_COREMODULE Stripify (const UInt32* faces, int count, UNITY_TEMP_VECTOR(UInt32)& strip);
+
+/// Destrips a triangle strip into a face list.
+/// Adds the triangles from the strip into the trilist
+void EXPORT_COREMODULE Destripify (const UInt32* strip, int length, UNITY_TEMP_VECTOR(UInt32)& trilist);
+void EXPORT_COREMODULE Destripify (const UInt16* strip, int length, UNITY_TEMP_VECTOR(UInt32)& trilist);
+void EXPORT_COREMODULE Destripify (const UInt16* strip, int length, UNITY_TEMP_VECTOR(UInt16)& trilist);
+
+template<typename Tin, typename Tout>
+void EXPORT_COREMODULE Destripify(const Tin* strip, int length, Tout* trilist, int capacity);
+
+template<typename T>
+int EXPORT_COREMODULE CountTrianglesInStrip (const T* strip, int length);
+
+#endif