Revision ada90d33
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/DistortedNode.java | ||
---|---|---|
299 | 299 |
public DistortedNode(DistortedNode node, int flags) |
300 | 300 |
{ |
301 | 301 |
mParent = null; |
302 |
|
|
303 |
if( node.mObject instanceof DistortedBitmap) |
|
304 |
mObject = new DistortedBitmap( (DistortedBitmap)node.mObject, flags); |
|
305 |
else if( node.mObject instanceof DistortedCubes) |
|
306 |
mObject = new DistortedCubes( (DistortedCubes)node.mObject, flags); |
|
307 |
else |
|
308 |
throw new RuntimeException("unsupported type of object!"); |
|
302 |
mObject = node.mObject.deepCopy(flags); |
|
309 | 303 |
|
310 | 304 |
if( (flags & Distorted.CLONE_CHILDREN) != 0 ) |
311 | 305 |
{ |
Also available in: Unified diff
Make deep copying DistortedObjects (needed in DistortedNode) standard.