|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdevisor2.foundation.GridItem
devisor2.foundation.elements.Cell
The class Cell provides a superior ground class for the cells which defines the discrete domain. This class is abstract and must be derived. Basically, a Cell is a container for some faces (or in 2D edges) which are defined via the cornering nodes. As always, there are additional properties like numbering, material constants etc.
Quad
,
Tri
,
Line
,
Macro
,
Serialized FormField Summary | |
protected Cell[] |
children
Array for the children, should contain cells. |
protected int |
level
Number of the cell |
protected int |
marker
Marker of the cell |
protected int |
material_number
Material number of the cell (UCD) |
protected int |
matrixblock
parameters of the cell |
protected Cell[] |
neighbours
Array for the neighbourhood, updated by updateCellNeighbours() should contain cells. |
protected Node[] |
nodes
nodes of this cell, updated by updateCellNodes() |
protected int |
number
Number of the cell |
protected int |
parallelblock
parameters of the cell |
protected int[] |
parameters
parameters of the cell |
protected Cell |
parent
parent Cell |
protected double[] |
values
Values stored in the cell. |
Fields inherited from class devisor2.foundation.GridItem |
cc, marked, transformed, xmax, xmin, ymax, ymin |
Constructor Summary | |
Cell()
Empty Constructor. |
Method Summary | |
void |
defValue(int i)
Defines the length of the array of values in the cell |
abstract void |
draw(java.awt.Graphics g)
Draws the perimeter of the cell. |
abstract void |
fill(java.awt.Graphics g)
Draws the cell filled with its color. |
Cell[] |
getChildren()
|
int |
getLevel()
Returns the level of the cell. |
int |
getMarker()
Returns the marker of the cell. |
int |
getMatrixBlock()
|
Cell[] |
getNeighbours()
|
double |
getNodeAverageValue(int index)
Returns the average of the ith value of the nodes defining this cell. |
Node[] |
getNodes()
|
abstract int |
getNPT()
|
int |
getNumber()
gets the number of the cell. |
int |
getParallelBlock()
|
Cell |
getParent()
|
abstract java.awt.Rectangle |
getPerimeter()
This method returns the perimeter of the item, that is the smallest bounding rectangle the item lies is completely inside of. |
double |
getValue(int i)
Returns the ith value. |
abstract boolean |
isHit(int x,
int y)
Determines if the item has been hit by a click on the grid ALL IN SCREEN COORDINATES to avoid the snap mechanism |
abstract boolean |
isInside(int[] topleft,
int[] bottomright)
Is the item inside a given rectangular area? All in WORLD COORDINATES!!! |
boolean |
isRect()
|
abstract void |
performTransformation(GridTransformation trafo)
This method performs the given affine transformation (in homogenous world coordinates) on the grid item and updates its position and appearance |
void |
setLevel(int m)
sets the level of the cell. |
void |
setMarker(int m)
sets the marker of the cell. |
void |
setMatrixBlock(int i)
|
void |
setNumber(int i)
Sets the number of the cell to i. |
void |
setParallelBlock(int i)
|
void |
setValue(int i,
double val)
Sets the ith value to val. |
abstract Cell[] |
updateCellNeighbours()
updates the neighbours of this cell |
abstract Node[] |
updateCellNodes()
updates the Node array of this cell |
Methods inherited from class devisor2.foundation.GridItem |
clearTransformedFlag, getParameters, isMarked, performMirror, setMarker, setMarker, setParameters, unsetMarker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int number
protected int material_number
protected int level
protected int marker
protected int[] parameters
protected Cell[] neighbours
protected Cell[] children
protected Cell parent
protected double[] values
protected int parallelblock
protected int matrixblock
protected Node[] nodes
Constructor Detail |
public Cell()
Method Detail |
public void setParallelBlock(int i)
public int getParallelBlock()
public void setMatrixBlock(int i)
public int getMatrixBlock()
public void defValue(int i)
public void setValue(int i, double val)
public double getValue(int i)
public boolean isRect()
public double getNodeAverageValue(int index)
public int getMarker()
public void setMarker(int m)
m
- marker valuepublic int getLevel()
public void setLevel(int m)
m
- level valuepublic void setNumber(int i)
public Cell getParent()
public Cell[] getNeighbours()
public Cell[] getChildren()
public Node[] getNodes()
public int getNumber()
public abstract Node[] updateCellNodes()
public abstract Cell[] updateCellNeighbours()
public abstract void draw(java.awt.Graphics g)
draw
in class GridItem
public abstract int getNPT()
public abstract void fill(java.awt.Graphics g)
public abstract boolean isInside(int[] topleft, int[] bottomright)
isInside
in class GridItem
topleft
- - the topleft corner of the rectanglebottomright
- - the bottom right corner of the rectangle
public abstract boolean isHit(int x, int y)
isHit
in class GridItem
public abstract java.awt.Rectangle getPerimeter()
GridItem
getPerimeter
in class GridItem
public abstract void performTransformation(GridTransformation trafo)
GridItem
performTransformation
in class GridItem
trafo
- - a GridTransform instance representing the transformation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |