public void Alloc(uint numSurface) { fSurface = null; if (numSurface > 0) { fSurface = new BxCmSeparatePatch_Surface[numSurface]; for (uint i = 0; i < numSurface; i++) { fSurface[i] = new BxCmSeparatePatch_Surface(); } } }
public BxCmSeparatePatch_Surface(BxCmSeparatePatch_Surface src) { Vertex = new BxCmSeparatePatch_Vertex[4]; for (byte i = 0; i < 4; i++) { Vertex[i] = src.Vertex[i].Copy; } SurfaceEdge = new BxCmSeparatePatch_SurfaceEdge[2][]; for (byte i = 0; i < 2; i++) { SurfaceEdge[i] = new BxCmSeparatePatch_SurfaceEdge[2]; for (byte j = 0; j < 2; j++) { SurfaceEdge[i][j] = src.SurfaceEdge[i][j].Copy; } } OrgSurfaceNo = src.OrgSurfaceNo; OrgEdgeNo = new uint?[2][]; for (byte i = 0; i < 2; i++) { OrgEdgeNo[i] = new uint?[2]; for (byte j = 0; j < 2; j++) { OrgEdgeNo[i][j] = src.OrgEdgeNo[i][j]; } } TNodeType = new BxTNodeType[2][]; for (byte i = 0; i < 2; i++) { TNodeType[i] = new BxTNodeType[2]; for (byte j = 0; j < 2; j++) { TNodeType[i][j] = src.TNodeType[i][j]; } } OrgVertexNo = new uint?[4]; for (byte i = 0; i < 4; i++) { OrgVertexNo[i] = src.OrgVertexNo[i]; } PreDivided = src.PreDivided; }
public void Set(uint index, BxCmSeparatePatch_Surface data) { for (byte i = 0; i < 4; i++) { fSurface[index].SetVertex(i, data.Vertex[i]); } for (byte hvId = 0; hvId < 2; hvId++) { for (byte hvOfs = 0; hvOfs < 2; hvOfs++) { fSurface[index].SetSurfaceEdge(hvId, hvOfs, data.SurfaceEdge[hvId][hvOfs]); } } }