Added support for cloning scene models (we love doing multiple inheritance

by hand!).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@754 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-12-12 02:47:17 +00:00
parent a11f21fb02
commit 3af0d8b1ee
5 changed files with 78 additions and 6 deletions
@@ -1,5 +1,5 @@
//
// $Id: SpotSceneModel.java,v 1.5 2001/12/04 22:34:04 mdb Exp $
// $Id: SpotSceneModel.java,v 1.6 2001/12/12 02:47:17 mdb Exp $
package com.threerings.whirled.spot.data;
@@ -127,6 +127,21 @@ public class SpotSceneModel extends SceneModel
}
}
// documentation inherited
public Object clone ()
throws CloneNotSupportedException
{
SpotSceneModel model = (SpotSceneModel)super.clone();
model.locationIds = (int[])locationIds.clone();
model.locationX = (int[])locationX.clone();
model.locationY = (int[])locationY.clone();
model.locationOrients = (int[])locationOrients.clone();
model.locationClusters = (int[])locationClusters.clone();
model.portalIds = (int[])portalIds.clone();
model.targetLocIds = (int[])targetLocIds.clone();
return model;
}
/**
* Creates and returns a blank scene model.
*/