示例#1
0
 /// <summary>Build both meshes</summary>
 public static void createMesh(this iPolylinePath path, iTriangleMesh result, eBuildFilledMesh filledMesh, float pixel, sStrokeInfo strokeInfo)
 {
     unsafe
     {
         sStrokeInfo *si = &strokeInfo;
         path.createMesh(result, filledMesh, pixel, ( IntPtr)si);
     }
 }
示例#2
0
 /// <summary>Copy transparent triangle indices of the mesh, downcasting values to 16-bit integers</summary>
 public static void copyTransparentTriangles(this iTriangleMesh mesh, Span <ushort> span, int baseVertex)
 {
     unsafe
     {
         fixed(ushort *pointer = span)
         {
             mesh.copyTransparentTriangles((IntPtr)pointer, baseVertex, 2);
         }
     }
 }
示例#3
0
 /// <summary>Copy opaque triangle indices of the mesh</summary>
 public static void copyOpaqueTriangles(this iTriangleMesh mesh, Span <uint> span, int baseVertex)
 {
     unsafe
     {
         fixed(uint *pointer = span)
         {
             mesh.copyOpaqueTriangles((IntPtr)pointer, baseVertex, 4);
         }
     }
 }
示例#4
0
 public void transparent(iTriangleMesh mesh, Span <uint> span, int baseVertex) =>
 mesh.copyTransparentTriangles(span, baseVertex);
示例#5
0
 // Yep, exact copy-paste of the above. Sometimes C++ templates are just better.
 public void opaque(iTriangleMesh mesh, Span <uint> span, int baseVertex) =>
 mesh.copyOpaqueTriangles(span, baseVertex);
示例#6
0
 /// <summary>Copy vertices out of the mesh</summary>
 public static void copyVertices(this iTriangleMesh mesh, Span <sVertexWithId> span, uint id)
 {
     mesh.copyVertices(ref span.GetPinnableReference(), id);
 }
示例#7
0
 /// <summary>Build just the filled mesh</summary>
 public static void createMesh(this iPolylinePath path, iTriangleMesh result, eBuildFilledMesh filledMesh, float pixel)
 {
     Debug.Assert(filledMesh != eBuildFilledMesh.None);
     path.createMesh(result, filledMesh, pixel, IntPtr.Zero);
 }
示例#8
0
文件: Meshes.cs 项目: zeta1999/Vrmac
 public Meshes(iPathGeometry path, iVrmacDraw factory)
 {
     this.path   = path;
     frontBuffer = factory.createTriangleMesh();
     backBuffer  = factory.createTriangleMesh();
 }