Can now copy brushes.

Implement SetBrush's copyWithZone:
This commit is contained in:
Bill Currie 2010-10-11 09:19:09 +09:00
parent 708c8743af
commit 1945da99d9
1 changed files with 22 additions and 0 deletions

View File

@ -603,6 +603,28 @@ initOwner:::
}
}
- (id) copyWithZone: (NSZone *) zone
{
SetBrush *new;
[self freeWindings];
new = [[SetBrush allocWithZone: zone] init];
new->regioned = regioned;
new->selected = selected;
new->invalid = invalid;
new->parent = parent;
VectorCopy (bmins, new->bmins);
VectorCopy (bmaxs, new->bmaxs);
VectorCopy (entitycolor, new->entitycolor);
new->numfaces = numfaces;
memcpy (new->faces, faces, sizeof (new->faces));
[self calcWindings];
[new calcWindings];
return new;
}
- (void) dealloc
{
[self freeWindings];