Beispiel #1
0
 public Polyhedron(string s)
 {
     string[] strings = s.Split(' ');
     PointList = GenericMarshal.StringTo <Point3FVector>(string.Join(' ', strings.Skip(0).Take(3)));
     PlaneList = GenericMarshal.StringTo <PlaneFVector>(string.Join(' ', strings.Skip(3).Take(3)));
     EdgeList  = GenericMarshal.StringTo <EdgeVector>(string.Join(' ', strings.Skip(6).Take(3)));
 }
Beispiel #2
0
        public void Free()
        {
            PointList?.Free();
            PointList = new Point3FVector(internalStruct.pointList);

            PlaneList?.Free();
            PlaneList = new PlaneFVector(internalStruct.planeList);

            EdgeList?.Free();
            EdgeList = new EdgeVector(internalStruct.edgeList);

            if (internalStructPtr != IntPtr.Zero)
            {
                StructMarshal.FreeStructPtr <InternalStruct>(internalStructPtr);
            }
            internalStructPtr = IntPtr.Zero;
        }