Package com.threerings.whirled.data

Examples of com.threerings.whirled.data.SceneModel


                protected Location createLocation () {
                    return new StageLocation(); // breaks package, but ok
                }
            });
            String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
            SceneModel scene = parser.parseScene(tspath);
            System.out.println("Parsed " + scene + ".");

        } catch (Exception e) {
            e.printStackTrace();
            fail("Test threw exception");
View Full Code Here


    // documentation inherited
    public SceneModel loadSceneModel (int sceneId)
        throws IOException, NoSuchSceneException
    {
        log.info("Creating dummy scene model [id=" + sceneId + "].");
        return new SceneModel();
    }
View Full Code Here

    public void runTest ()
    {
        try {
            SceneParser parser = new SceneParser("scene");
            String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
            SceneModel scene = parser.parseScene(tspath);
            System.out.println("Parsed " + scene + ".");

        } catch (Exception e) {
            e.printStackTrace();
            fail("Test threw exception");
View Full Code Here

        }

        // check the version of our cached copy of the scene to which we're requesting to move; if
        // we were unable to load it, assume a cached version of zero
        int sceneVer = 0;
        SceneModel pendingModel = _scdir.getPendingModel();
        if (pendingModel != null) {
            sceneVer = pendingModel.version;
        }

        // issue a traversePortal request
View Full Code Here

    public void moveSucceededWithUpdates (int placeId, PlaceConfig config, SceneUpdate[] updates)
    {
        log.info("Got updates", "placeId", placeId, "config", config, "updates", updates);

        // apply the updates to our cached scene
        SceneModel model = loadSceneModel(_pendingSceneId);
        boolean failure = false;
        for (SceneUpdate element : updates) {
            try {
                element.validate(model);
            } catch (IllegalStateException ise) {
View Full Code Here

     */
    protected SceneModel loadSceneModel (int sceneId)
    {
        // first look in the model cache
        Integer key = Integer.valueOf(sceneId);
        SceneModel model = _scache.get(key);

        // load from the repository if it's not cached
        if (model == null) {
            try {
                model = _screp.loadSceneModel(sceneId);
View Full Code Here

        // now that we've moved, we can update the user object with the new zone id
        ((ZonedBodyObject)_body).setZoneId(_summary.zoneId);

        // check to see if they need a newer version of the scene data
        ZoneService.ZoneMoveListener listener = (ZoneService.ZoneMoveListener)_listener;
        SceneModel model = scmgr.getScene().getSceneModel();
        if (_version != model.version) {
            SceneUpdate[] updates = null;
            if (_version < model.version) {
                updates = scmgr.getUpdates(_version);
            }
View Full Code Here

        int ploid = scmgr.getPlaceObject().getOid();
        PlaceConfig config = _locman.moveTo(_body, ploid);

        // check to see if they need a newer version of the scene data
        SceneService.SceneMoveListener listener = (SceneService.SceneMoveListener)_listener;
        SceneModel model = scmgr.getScene().getSceneModel();
        if (_version != model.version) {
            SceneUpdate[] updates = null;
            if (_version < model.version) {
                updates = scmgr.getUpdates(_version);
            }
View Full Code Here

        // check the version of our cached copy of the scene to which we're requesting to move; if
        // we were unable to load it, assume a cached version of zero
        int sceneVers = 0;
        int sceneId = _scdir.getPendingSceneId();
        SceneModel pendingModel = _scdir.getPendingModel();
        if (pendingModel != null) {
            sceneVers = pendingModel.version;
        }

        // issue a moveTo request
View Full Code Here

TOP

Related Classes of com.threerings.whirled.data.SceneModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.