//Constructor called when a cell is created in the begining of the program
 public ForwardInternals(float x, float z, float v, float dT, float angle, ICellRegulation regulator, int iterations) :
     this(v, dT, angle, regulator, iterations)
 {
     //add the initial values to the arrays
     positions[0] = new Vector3Adapter(x, z);
     AddState(0);
     birthDate = 0;
 }
    public AbstractInternals(float v, float dT, float angle, ICellRegulation regulator)
    {
        this.v     = v;
        this.dT    = dT;
        this.angle = angle;

        model          = Model.GetInstance();
        this.regulator = regulator;
    }
    private Cell parentObject; //TODO replce this with something smarter

    private ForwardInternals(float v, float dT, float angle, ICellRegulation regulation, int iterations) : base(v, dT, angle, regulation)
    {
        initalAngel     = angle;
        this.iterations = iterations;
        deathDate       = iterations + 1;

        lifeRegulator = BacteriaFactory.GetInstance().GetLifeRegulator();

        //crete the arrays
        positions          = new IPointAdapter[iterations + 1];
        states             = new State[iterations + 1];
        cellDeathListeners = new List <ICellDeathListener>();
    }
 //Constructure that is used when a cell is created as the result of a cell division
 public ForwardInternals(IPointAdapter[] locations, State[] states, float v, float dT, float angle, ICellRegulation regulator, int iterations, int iteration) :
     this(v, dT, angle, regulator, iterations)
 {
     //Fix the states so that there are no null pointers this should maybe
     for (int i = 0; i <= iteration; i++)
     {
         positions[i]   = locations[i].Copy();
         this.states[i] = states[i];
     }
     this.positions[iteration + 1] = locations[iteration].Copy();
     this.states[iteration + 1]    = GetInternalState();
     currentIteration = iteration;
     birthDate        = iteration;
 }
Exemple #5
0
 public Internals(float x, float z, float v, float dT, float angle, ICellRegulation regulator) : base(v, dT, angle, regulator)
 {
     location = new Vector3Adapter(x, z);
 }