Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members | Public Member Functions
FiberLocus Class Reference

## Detailed Description

FiberLocus is used to refer to the entire segment of a Fiber.

It is used to calculate the distance to this segment, or the intersection of the segment with a plane.

The only mysterious thing is the name: why Locus?

## Public Member Functions
| FiberLocus ()
| construct without initialization
| FiberLocus (Fiber const *f, int r)
| constructor
Fiber const * | fiber () const
| the Fiber
unsigned int | point () const
| index of segment
real | len () const
| the length of the segment
Vector | pos1 () const
| position of first point in space
Vector | pos2 () const
| position of second point in space
Vector | diff () const
| that is pos2() - pos1()
Vector | dir () const
| that is ( pos2() - pos1() ).normalized()
Vector | center () const
| that is [ pos2() + pos1() ] / 2
PointExact | exact1 () const
| PointExact corresponding to first point.
PointExact | exact2 () const
| PointExact corresponding to second point.
bool | isFirst () const
| true if the segment is the first of the Fiber
bool | notFirst () const
| true if the segment is not the first of the Fiber
bool | isLast () const
| true if the segment is the last of the fiber
bool | notLast () const
| true if the segment is not the last of the fiber
void | projectPoint0 (Vector const &w, real &abs, real &dist) const
| calculate the projection of `w` on the line supporting the segment More...
void | projectPoint (Vector const &w, real &abs, real &dist) const
| calculate the projection of `w` on the line supporting the segment More...
void | projectPointF (const real[], real &abs, real &dist) const
| faster projectionPoint, but incompatible with periodic boundary conditions More...
int | intersectPlane (Vector const &n, real a, real &abs) const
| find the intersection with the plane defined by n.x + a = 0 More...
bool | projectSegment (FiberLocus const &that, real &a, real &b, real &dist) const
| calculates the closest distance between the two lines supporting the segments More...

## Member Function Documentation

int intersectPlane | ( | Vector const & | n,
|  | real | a,
|  | real & | abs
| ) |  | const

Returns
  0, +1 or -1:
  - 0 if the segment does not interects the plane (in this case, abs is not set)
  - +1 if the segment interect and fiber->dir().n > 0
  - -1 if the segement intersects, and fiber->dir().n < 0
  Intersection with the MINUS_END point is counted, but not with the PLUS_END point (return = 0).

void projectPoint | ( | Vector const & | w,
|  | real & | abs,
|  | real & | dis
| ) |  | const

W is projected on the line that supports this FiberLocus The function calculates:

- abs <- the signed distance from pos1() to the projection of W
- dist <- the distance between W and its projection

It is assumed here that len() returns the distance between the two points of the FiberLocus Attention: `dis` may not be set if ( abs < 0 ) or ( abs > len() )

void projectPoint0 | ( | Vector const & | w,
|  | real & | abs,
|  | real & | dis
| ) |  | const

W is projected on the line that supports this FiberLocus The function calculates:

- abs <- the signed distance from pos1() to the projection of W
- dist <- the distance between W and its projection

It is assumed here that len() returns the distance between the two points of the FiberLocus Attention: `dis` is not set if ( abs < 0 ) or ( abs > len() )

void projectPointF | ( | const real | w[],
|  | real & | abs,
|  | real & | dis
| ) |  | const

This is a faster version of projectPoint(), but it does not work with periodic boundaries

bool projectSegment | ( | FiberLocus const & | that,
|  | real & | abs1,
|  | real & | abs2,
|  | real & | dist
| ) |  | const

Set dis to be the square of the minimum distance between the two lines. In 2D, the distance should be zero unless the two lines are parallel.

Abscissa abs1 and abs1 are set to indicate the points realizing this distance. The return value is true if both projections fall inside the segments.