// SAME FUNCTION FOR USE WITH SimulationManager3... void signal(simulationManager3 mngr) { signalReleased = true; mngr.totalSignal++; //Debug.Log("Signal! Biotick: " + mngr.biotick + " Sum of signal: " + mngr.totalSignal); // Report signal to cell output values /*recA.cell.outputValues.reportSignal(recA.receptorId, recA.recPosition - recA.cell.transform.position); * recB.cell.outputValues.reportSignal(recB.receptorId, recB.recPosition - recB.cell.transform.position);*/ //recA.cell.outputValues.aggregateBiotickSignal(); //recB.cell.outputValues.aggregateBiotickSignal(); if (bothRecsVisible()) { lineObject.SetColors(Color.red, Color.red); } /* particleA.Emit(1); * particleB.Emit(1);*/ // TRIGGER LOG? }
//void signal (simulationManager2 mngr) { // signalReleased = true; // mngr.totalSignal++; // //Debug.Log("Signal! Biotick: " + mngr.biotick + " Sum of signal: " + mngr.totalSignal); // // Report signal to cell output values // /*recA.cell.outputValues.reportSignal(recA.receptorId, recA.recPosition - recA.cell.transform.position); // recB.cell.outputValues.reportSignal(recB.receptorId, recB.recPosition - recB.cell.transform.position);*/ // //recA.cell.outputValues.aggregateBiotickSignal(); // //recB.cell.outputValues.aggregateBiotickSignal(); // if (bothRecsVisible()) // lineObject.SetColors(Color.red, Color.red); // /* particleA.Emit(1); // particleB.Emit(1);*/ // // TRIGGER LOG? //} // returns true if we should remove the pair from the list of bound receptors, false otherwise. //public bool runReceptorsForBiotick (simulationManager2 mngr, System.Random rand) { // //Debug.DrawLine(recA.recPosition, recB.recPosition, Color.blue); // // Should they unbind // if (signalReleased) { // if (rand.NextDouble () <= mngr.unbindingProbabilityAfterSignal) { // unbind (); // // Both receptors should endocytose (be removed from the array) after unbinding (if they released a signal) // endocytoseReceptors(); // return true; // } // } else { // if (rand.NextDouble () <= mngr.unbindingProbability) { // unbind (); // return true; // } // } // // Should they release signal? // if (rand.NextDouble () <= mngr.signalGenerationProbability) { // signal (mngr); // incBindingTime(); // return false; // } // incBindingTime (); // return false; //} // SAME FUNCTION FOR USE WITH SimulationManager3 // returns true if we should remove the pair from the list of bound receptors, false otherwise. public bool runReceptorsForBiotick(simulationManager3 mngr, System.Random rand) { //Debug.DrawLine(recA.recPosition, recB.recPosition, Color.blue); // Should they unbind if (signalReleased) { if (rand.NextDouble() <= mngr.unbindingProbabilityAfterSignal) { unbind(); // Both receptors should endocytose (be removed from the array) after unbinding (if they released a signal) endocytoseReceptors(); return(true); } } else { if (rand.NextDouble() <= mngr.unbindingProbability) { unbind(); return(true); } } // Should they release signal? if (rand.NextDouble() <= mngr.signalGenerationProbability) { signal(mngr); incBindingTime(); return(false); } incBindingTime(); return(false); }
Vector3 hardCodedCellCenter = new Vector3(-51.17f, 21.22f, 7.54f); // :_( It's the only way to find the cell body (without the filopodia) center. // Constructor public Receptor3(Cell2 icell, /*simulationManager2*/ simulationManager3 ismngr, System.Random rand, bool ivisible) //GameObject receptorMesh, // saving the cell and the sim manager objets { cell = icell; smngr = ismngr; receptorId = smngr.generateUniqueId(); // Initializing variables. nextV = -1; totalMinisteps = 0; currentMiniStep = 0; // Assign position if set to random //if (icell.randomStartingPosition) { currentV = rand.Next(0, cell.globalMeshVerts.Length); // COMMENTING OUT TO AVOID RUNNING THIS. PROBABLY NOT RELEVANT ANYWAY. /*if (icell.exocytoseOutsideInteractionRadius) { // we have to check if the random position is outside the interactions radius * while (isVertexInInteractionRadius(currentV)) { // run until you find a vertex that's outside the interaction radius * currentV = rand.Next(0, cell.globalMeshVerts.Length); * } * }*/ /*if (icell.noExocytosisInFilopodia) { // we have to check if the random position is on the main body * while (!isVertexInMainBody(currentV)) { // run until you find a vertex that's on the main body itself (not on filopodia) * currentV = rand.Next(0, cell.globalMeshVerts.Length); * } * }*/ if (icell.exocytosisMainlyInFilopodia) // we have to check if the random position is on the filopodia { float chanceOfExocytosingInFilopodia = (float)rand.NextDouble(); if (chanceOfExocytosingInFilopodia <= icell.ratioOfExocytosingReceptorsInFilopodia) { // exocytose in filopodia while (isVertexInMainBody(currentV)) // run until you find a vertex that's on the filopodia itself (not on the cell body) { currentV = rand.Next(0, cell.globalMeshVerts.Length); } } else { // exocytose in cell body while (!isVertexInMainBody(currentV)) // run until you find a vertex that's on the cell body. { currentV = rand.Next(0, cell.globalMeshVerts.Length); } } } recPosition = cell.globalMeshVerts[currentV]; // Create receptor mesh if visible if (ivisible) { visible = true; } }