public class SquashyCylinder extends BasicCylinder
Modifier and Type | Class and Description |
---|---|
class |
SquashyCylinder.Chord
little class containing the chord
|
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<SquashyCylinder.Chord> |
chords
array of Chords and lengths
|
Parr, ProtArr
Constructor and Description |
---|
SquashyCylinder(double[] V,
double[] P,
double r,
double p) |
SquashyCylinder(double[] P,
double r,
double p)
instantiates a cylinder with no squishes parallel to z-axis
|
Modifier and Type | Method and Description |
---|---|
boolean |
abutts(SquashyCylinder that)
checks if this cylinder abuts another
|
void |
addIntersectionWith(SquashyCylinder cylinder)
adds a new intersection with the given cylinder
|
void |
addToMyClones(SquashyCylinder clone)
add a clone to the list.
|
void |
cloneHasStopped()
a stop instruction from a clone.
|
boolean |
crosses(double[] walkerPos,
double[] step,
double[] normal,
double[] d,
boolean skipCurrent,
double origLength,
double[] intDist,
boolean[] in,
double[] p)
checks if a given step crosses this cylinder, taking account
of all current chords where the cylinder abutts others
|
void |
drawCrossSection(java.io.BufferedWriter out)
outputs coords around the circumference of the cross-section
(chords not included).
|
boolean |
hasIntersectionWith(SquashyCylinder otherCylinder)
checks if the current cylinder already has an intersection with
the given cylinder
|
boolean |
isExpanding()
checks if cylinder is expanding or not
|
static void |
main(java.lang.String[] args) |
void |
propagateCloneRelationships()
before this is called, the orginal cylinder knows about its clones
but the clones don't know about each other, or about the original.
|
void |
stopExpanding()
stops this cylinder and all clones expanding due to pressure
from another one.
|
boundingBoxIntersects, getAxis, getBoundingBox, getDiffusivityAt, getDistanceFrom, getPosition, getRadius, inside, intersectsCubicRegion, testAnnoyingCase, testArbOrientation, toFile
public java.util.ArrayList<SquashyCylinder.Chord> chords
public SquashyCylinder(double[] P, double r, double p)
P
- position of cylinderr
- radius of cylinderpublic SquashyCylinder(double[] V, double[] P, double r, double p)
public boolean abutts(SquashyCylinder that)
that
- the other cylinderpublic final boolean isExpanding()
public final void stopExpanding()
public final void cloneHasStopped()
public final boolean crosses(double[] walkerPos, double[] step, double[] normal, double[] d, boolean skipCurrent, double origLength, double[] intDist, boolean[] in, double[] p)
crosses
in interface SubstrateObject
crosses
in class BasicCylinder
walkerPos
- the position of the walker making the stepstep
- the step vectornormal
- space to store intersection normald
- space to stor distance from origin in normal directionskipCurrent
- should we skip the barrier the walker is currently sitting on?origLength
- the length of the original stepintDist
- space to store arclength to intersection pointin
- space to store if walker was initially in or out of cylinderp
- space to store permeability fo cylinder if intersectionpublic void addIntersectionWith(SquashyCylinder cylinder)
cylinder
- the cylinder to intersect withpublic final boolean hasIntersectionWith(SquashyCylinder otherCylinder)
otherCylinder
- public final void drawCrossSection(java.io.BufferedWriter out) throws java.io.IOException
out
- file to write tojava.io.IOException
- if something goes wrong with the filepublic final void addToMyClones(SquashyCylinder clone)
clone
- public final void propagateCloneRelationships()
public static void main(java.lang.String[] args)
args
-