|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.sscc.spline.base.SimpleMesh
The description of the simple 1D mesh. The user's mesh nodes are usually affain transformed while construction of an internal mesh by the formula x'=(x-x0)*s, where x0 is a new origin point (usually the first point in the mesh) and s is a scale factor. The class provides testing of a point to find a mesh cell it belongs to.
| Field Summary | |
double |
origin
An affine transform origin. |
double |
scale
An affine fransform scaling factor. |
int |
size
A number of mesh nodes. |
| Constructor Summary | |
SimpleMesh()
|
|
| Method Summary | |
abstract double |
distance(int i,
int j)
Returns a distance between i-th and j-th nodes of transformed mesh, e.g. |
abstract void |
findCell(SimpleMeshWorkspace workspace,
double x)
Finds a mesh cell to which a point belongs. |
static void |
findCell(SimpleMeshWorkspace workspace,
double t,
double[] nodes,
int firstIndex,
int lastIndex)
Finds a mesh cell to which a point belongs. |
static void |
findCell(SimpleMeshWorkspace workspace,
double t,
float[] nodes,
int firstIndex,
int lastIndex)
Finds a mesh cell to which a point belongs. |
abstract double |
get(int i)
Returns a value of i-th mesh node in the original coordinate system. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public double origin
public double scale
public int size
| Constructor Detail |
public SimpleMesh()
| Method Detail |
public abstract void findCell(SimpleMeshWorkspace workspace,
double x)
workspace - a mesh workspacex - a point (in original coordinates) to searchpublic abstract double get(int i)
public abstract double distance(int i,
int j)
public static void findCell(SimpleMeshWorkspace workspace,
double t,
double[] nodes,
int firstIndex,
int lastIndex)
The nodes[firstIndex],...,nodes[lastIndex-1] entries are
used in the algorithm. The resulting cell index is an integer value
belonging to the range [firstIndex..lastIndex].
If cellIndex==firstIndex, the point is to the left
from the nodes[firstIndex]. In this case, the position will be
negative and equal to (t-nodes[firstIndex]). In other cases,
the point position is equal to (t-nodes[cellIndex-1]).
workspace - the mesh workspacet - the point (in mesh coordinates) to searchnodes - the array containing mesh nodesfirstIndex - the first index in the array to searchlastIndex - the index after the last array's entry
public static void findCell(SimpleMeshWorkspace workspace,
double t,
float[] nodes,
int firstIndex,
int lastIndex)
The nodes[firstIndex],...,nodes[lastIndex-1] entries are
used in the algorithm. The resulting cell index is an integer value
belonging to the range [firstIndex..lastIndex].
If cellIndex==firstIndex, the point is to the left
from the nodes[firstIndex]. In this case, the position will be
negative and equal to (t-nodes[firstIndex]). In other cases,
the point position is equal to (t-nodes[cellIndex-1]).
workspace - the mesh workspacet - the point (in mesh coordinates) to searchnodes - the array containing mesh nodesfirstIndex - the first index in the array to searchlastIndex - the index after the last array's entry
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||