public Polyhedron(string s) { string[] strings = s.Split(' '); PointList = GenericMarshal.StringTo <Point3FVector>(strings[0]); PlaneList = GenericMarshal.StringTo <PlaneFVector>(strings[1]); EdgeList = GenericMarshal.StringTo <EdgeVector>(strings[2]); }
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; }