Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public unsafe Point3[][] Contours
- {
- set
- {
- //Point3*[] ps = new Point3*[value.Length];
- //uint[] lengths = new uint[value.Length];
- //GCHandle[] handles = new GCHandle[value.Length];
- float[] identityMatrix = new float[16];
- identityMatrix[0] = identityMatrix[5] = identityMatrix[10] = identityMatrix[15] = 1;
- SetContours(value, identityMatrix);
- /*
- for (int i = 0; i < value.Length; i++)
- {
- // Don't do this at home...
- handles[i] = GCHandle.Alloc(value[i]);
- fixed (Point3* p = value[i])
- {
- ps[i] = p;
- lengths[i] = (uint)value[i].Length;
- }
- }
- fixed (Point3** psp = ps)
- {
- NativeMethods.SetContours(context.ptr, id, psp, lengths, (uint)value.Length, identityMatrix, ref err);
- }
- foreach (var handle in handles)
- {
- handle.Free();
- }
- NativeMethods.check(err);
- */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement