Package barsuift.simLife.process

Examples of barsuift.simLife.process.ConditionalTaskStateFactory



public class Gravity3DStateFactory {

    public Gravity3DState createGravity3DState() {
        ConditionalTaskStateFactory taskFactory = new ConditionalTaskStateFactory();
        SplitConditionalTaskState gravityTaskState = taskFactory.createSplitConditionalTaskState(GravityTask.class);
        return new Gravity3DState(gravityTaskState);
    }
View Full Code Here


        float radius = height / HEIGHT_RADIUS_RATIO;
        List<TreeBranchState> branches = new ArrayList<TreeBranchState>(nbBranches);
        for (int i = 0; i < nbBranches; i++) {
            branches.add(computeRandomBranchState(radius, height));
        }
        ConditionalTaskStateFactory taskStateFactory = new ConditionalTaskStateFactory();
        ConditionalTaskState photosynthesis = taskStateFactory.createConditionalTaskState(Photosynthesis.class);
        ConditionalTaskState aging = taskStateFactory.createConditionalTaskState(Aging.class);
        ConditionalTaskState growth = taskStateFactory.createConditionalTaskState(TreeGrowth.class);
        TreeTrunkStateFactory trunkStateFactory = new TreeTrunkStateFactory();
        TreeTrunkState trunkState = trunkStateFactory.createRandomTreeTrunkState(radius, height);

        Tree3DStateFactory tree3DStateFactory = new Tree3DStateFactory();
        Tree3DState tree3dState = tree3DStateFactory.createRandomTree3DState(new Tuple3dState(translationVector));
View Full Code Here

    @Override
    public void setFpsShowing(boolean fpsShowing) {
        if (fpsShowing) {
            fpsCounter.reset();
            ConditionalTaskStateFactory taskStateFactory = new ConditionalTaskStateFactory();
            ConditionalTaskState fpsTickerState = taskStateFactory.createConditionalTaskState(FpsTicker.class);
            fpsTicker = new FpsTicker(fpsTickerState, fpsCounter);
            universe.getSynchronizer().schedule(fpsTicker);
        } else {
            if (this.fpsShowing) {
                // only unschedule the fpsTicker if it was previously scheduled
View Full Code Here

        this.universe3D = new BasicUniverse3D(state.getUniv3DState(), this);
        this.environment = new BasicEnvironment(state.getEnvironment());
        this.physics = new BasicPhysics(this, state.getPhysics());
        this.synchronizer = new BasicSynchronizerCore(state.getSynchronizerState());
        this.dateHandler = new DateHandler(state.getDateHandler());
        ConditionalTaskStateFactory taskStateFactory = new ConditionalTaskStateFactory();
        ConditionalTaskState dateUpdaterState = taskStateFactory.createConditionalTaskState(DateUpdater.class);
        DateUpdater dateUpdater = new DateUpdater(dateUpdaterState, dateHandler.getDate());
        synchronizer.schedule(dateUpdater);
        this.trees = new HashSet<Tree>();
        Set<TreeState> treeStates = state.getTrees();
        for (TreeState treeState : treeStates) {
View Full Code Here

TOP

Related Classes of barsuift.simLife.process.ConditionalTaskStateFactory

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.