public class MyelinatedCylinder extends java.lang.Object implements Cylinder, SubstrateObject
Constructor and Description |
---|
MyelinatedCylinder(double[] V,
double[] P,
double r1,
double r2,
double d1,
double d2,
double p) |
MyelinatedCylinder(double[] P,
double r1,
double r2,
double d1,
double d2,
double p) |
Modifier and Type | Method and Description |
---|---|
boolean |
boundingBoxIntersects(double[] subsCoords,
double[] step)
checks if bounding box is intersected by a step
|
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 will cross a membrane in the object
|
BoundingBox |
getBoundingBox()
returns the oriented bounding box for this object
|
double |
getDiffusivityAt(double[] subsCoords)
returns the diffusivity at the given location.
|
double |
getDistanceFrom(double[] Q) |
double[] |
getPosition() |
double |
getRadius() |
boolean |
inside(double[] pos)
checks if a postion is inside the cylinder.
|
boolean |
intersectsCubicRegion(double[] bottomLeft,
double[] topRight)
checks if cylinder intersects axis-aligned cubic region
|
void |
toFile(java.io.Writer writer)
spits out cylinder cross section
|
public MyelinatedCylinder(double[] P, double r1, double r2, double d1, double d2, double p)
public MyelinatedCylinder(double[] V, double[] P, double r1, double r2, double d1, double d2, double p)
public boolean crosses(double[] walkerPos, double[] step, double[] normal, double[] d, boolean skipCurrent, double origLength, double[] intDist, boolean[] in, double[] p)
SubstrateObject
crosses
in interface SubstrateObject
walkerPos
- position of walker in spacestep
- step it wants to makenormal
- space to return surface normald
- space to return distance to interaction point in normal dirskipCurrent
- should we skip the barrier the walker is currently sitting on?origLength
- original length of stepintDist
- proportion of step before interaction pointin
- are we initially inside or outside the object?public final double getRadius()
public final double[] getPosition()
getPosition
in interface Cylinder
public final double getDistanceFrom(double[] Q)
getDistanceFrom
in interface Cylinder
public final boolean inside(double[] pos)
inside
in interface SubstrateObject
public BoundingBox getBoundingBox()
getBoundingBox
in interface SubstrateObject
public double getDiffusivityAt(double[] subsCoords)
SubstrateObject
getDiffusivityAt
in interface SubstrateObject
subsCoords
- coords mapped onto substratepublic final boolean boundingBoxIntersects(double[] subsCoords, double[] step)
boundingBoxIntersects
in interface SubstrateObject
subsCoords
- position mapped onto substratestep
- step vectorpublic final boolean intersectsCubicRegion(double[] bottomLeft, double[] topRight)
intersectsCubicRegion
in interface SubstrateObject
bottomLeft
- lowest corner of regiontopRight
- highest corner of region