From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Graphics/TriStripper.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Runtime/Graphics/TriStripper.h (limited to 'Runtime/Graphics/TriStripper.h') 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 +#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 +void EXPORT_COREMODULE Destripify(const Tin* strip, int length, Tout* trilist, int capacity); + +template +int EXPORT_COREMODULE CountTrianglesInStrip (const T* strip, int length); + +#endif -- cgit v1.1-26-g67d0