public class FacetCylinder extends java.lang.Object implements Cylinder, SubstrateObject
Constructor and Description |
---|
FacetCylinder(Vector3D P,
double r,
int N,
double p)
constructor with default alignment
|
FacetCylinder(Vector3D V,
Vector3D P,
double r,
int N,
double p)
constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
boundingBoxIntersects(double[] subsCoords,
double[] step)
TODO: always returns true
checks if a step will intersect the bounding box
|
boolean |
crosses(double[] walkerPos,
double[] step,
double[] normal,
double[] d,
boolean skipCurrent,
double origLength,
double[] intDist,
boolean[] in,
double[] p)
checks cylinder crossing by identifying candidate facet
and checking line-line intersection.
|
BoundingBox |
getBoundingBox()
TODO: not implement.
|
double |
getDiffusivityAt(double[] r)
returns the diffusivity at the given location.
|
double |
getDistanceFrom(double[] Q)
calculates the distance d of a given point from the central
axis of the cylinder using the formula
d = sqrt( (Q-P)^2 - [(Q-P).V]^2)
|
double[] |
getPosition() |
double |
getRadius() |
boolean |
inside(double[] pos)
checks if a position is inside or outside the
cylinder.
|
boolean |
intersectsCubicRegion(double[] bottomLeft,
double[] topRight)
checks if the object intersects a cubic region.
|
static void |
main(java.lang.String[] args) |
void |
toFile(java.io.Writer writer)
write out cross section to file
|
public FacetCylinder(Vector3D V, Vector3D P, double r, int N, double p)
V
- alignmentP
- positionr
- radiusN
- number of facetspublic FacetCylinder(Vector3D P, double r, int N, double p)
P
- positionr
- radiusN
- number of facetsp
- permeabilitypublic boolean crosses(double[] walkerPos, double[] step, double[] normal, double[] d, boolean skipCurrent, double origLength, double[] intDist, boolean[] in, double[] p)
crosses
in interface SubstrateObject
walkerPos
- position of walkerstep
- step vectornormal
- space to store normal to vectord
- space to store distance to membraneskipCurrent
- are we sitting on the membrane right now?origLength
- original length of stepintDist
- space for arclength to interaction pointin
- inside or outside?space
- to store membrane permeabilitypublic double getDistanceFrom(double[] Q)
getDistanceFrom
in interface Cylinder
Q
- position vector or pointpublic final boolean inside(double[] pos)
inside
in interface SubstrateObject
coord
- in cylinder framepublic double getDiffusivityAt(double[] r)
SubstrateObject
getDiffusivityAt
in interface SubstrateObject
r
- coords mapped onto substratepublic double[] getPosition()
getPosition
in interface Cylinder
public double getRadius()
public BoundingBox getBoundingBox()
getBoundingBox
in interface SubstrateObject
public boolean boundingBoxIntersects(double[] subsCoords, double[] step)
boundingBoxIntersects
in interface SubstrateObject
subsCoords
- walker pos on substratestep
- step vectorpublic final boolean intersectsCubicRegion(double[] bottomLeft, double[] topRight)
SubstrateObject
intersectsCubicRegion
in interface SubstrateObject
public final void toFile(java.io.Writer writer) throws java.io.IOException
public static void main(java.lang.String[] args)
args
-