Can now copy brushes.

Implement SetBrush's copyWithZone:
This commit is contained in:
Bill Currie 2010-10-11 09:19:09 +09:00
parent 74d959ec64
commit cb970bddce

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];