Added means by which to create a blank scene model.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@662 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SceneModel.java,v 1.1 2001/11/12 20:56:55 mdb Exp $
|
// $Id: SceneModel.java,v 1.2 2001/11/29 00:15:48 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.data;
|
package com.threerings.whirled.data;
|
||||||
|
|
||||||
@@ -60,4 +60,24 @@ public class SceneModel implements Streamable
|
|||||||
neighborIds[i] = in.readInt();
|
neighborIds[i] = in.readInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns a blank scene model.
|
||||||
|
*/
|
||||||
|
public static SceneModel blankSceneModel ()
|
||||||
|
{
|
||||||
|
SceneModel model = new SceneModel();
|
||||||
|
populateBlankSceneModel(model);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates a blank scene model with blank values.
|
||||||
|
*/
|
||||||
|
protected static void populateBlankSceneModel (SceneModel model)
|
||||||
|
{
|
||||||
|
model.sceneId = -1;
|
||||||
|
model.version = 0;
|
||||||
|
model.neighborIds = new int[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user