|
||||||||||
| 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
devisor2.foundation.elements.Cell2D
devisor2.foundation.elements.Quad
The class Quad represents the cells of the discrete domain which have 4 nodes. This class is derived from Cell2D.
Cell,
Tri,
Line,
Macro,
Serialized Form| Field Summary | |
double |
middlez
|
| Fields inherited from class devisor2.foundation.elements.Cell2D |
edges, poly_world |
| Fields inherited from class devisor2.foundation.elements.Cell |
children, level, marker, material_number, matrixblock, neighbours, nodes, number, parallelblock, parameters, parent, values |
| Fields inherited from class devisor2.foundation.GridItem |
cc, marked, transformed, xmax, xmin, ymax, ymin |
| Constructor Summary | |
Quad()
Empty constructor. |
|
Quad(int i)
|
|
Quad(int i,
Edge e1,
Edge e2,
Edge e3,
Edge e4)
Calls one constructor of Cell, and defines the array of nodes of the cell. |
|
| Method Summary | |
java.lang.Object |
clone()
clones this Quad element shallowly, which means no nodes are recursivly cloned as well. |
void |
draw(java.awt.Graphics g)
Draws the perimeter of the Quad. |
void |
fill(java.awt.Graphics g)
Draws the Quad filled with its color. |
double |
getArea()
calculates and returns the area (size) of the element |
double |
getAspectRatio()
calculates the aspect ratio of the element, that is the quotient of the shortest and the longest edge |
Edge |
getEdge(int i)
Returns the ith edge of the cell modulo NPT, i.e. |
int |
getNPT()
|
double[] |
getParameters()
returns all parameters of the griditem in an int array |
java.awt.Rectangle |
getPerimeter()
returns the perimeter of the Quad element, that is the smallest bounding box completely containing the Quad |
double |
getSmallestInnerAngle()
calculates and returns the smallest inner angle of the element. |
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 |
boolean |
isInside(int[] topleft,
int[] bottomright)
Is the item inside a given rectangular area? All in WORLD COORDINATES!!! |
void |
performMirror(double nx,
double ny,
double px,
double py)
mirrors the Quad element by changing all nodes |
void |
performTransformation(GridTransformation trafo)
transforms the Quad element by changing all nodes |
void |
setCell(Edge e1,
Edge e2,
Edge e3,
Edge e4)
Defines the array of edges of the cell. |
void |
setParameters(double[] params)
sets all parameters of the GridItem according to the given int array |
java.lang.String |
toString()
|
void |
updateInnerData()
updates the inner variables xmin, xmax, ymin, ymax and the polygonal representation of the tri object |
| Methods inherited from class devisor2.foundation.elements.Cell2D |
getEdges, getNode, getNodes, setCell, setCell, setEdge, setNode, updateCellNeighbours, updateCellNodes |
| Methods inherited from class devisor2.foundation.elements.Cell |
defValue, getChildren, getLevel, getMarker, getMatrixBlock, getNeighbours, getNodeAverageValue, getNumber, getParallelBlock, getParent, getValue, isRect, setLevel, setMarker, setMatrixBlock, setNumber, setParallelBlock, setValue |
| Methods inherited from class devisor2.foundation.GridItem |
clearTransformedFlag, isMarked, setMarker, setMarker, unsetMarker |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double middlez
| Constructor Detail |
public Quad()
Cellpublic Quad(int i)
public Quad(int i,
Edge e1,
Edge e2,
Edge e3,
Edge e4)
Cell,
Edge| Method Detail |
public double[] getParameters()
GridItem
getParameters in class GridItempublic void setParameters(double[] params)
GridItem
setParameters in class GridItempublic int getNPT()
getNPT in class Cell
public void setCell(Edge e1,
Edge e2,
Edge e3,
Edge e4)
Edgepublic Edge getEdge(int i)
getEdge in class Cell2DEdgepublic void draw(java.awt.Graphics g)
draw in class Cell2Dpublic void fill(java.awt.Graphics g)
fill in class CellCellpublic void updateInnerData()
updateInnerData in class Cell2D
public boolean isInside(int[] topleft,
int[] bottomright)
isInside in class Cell2Dtopleft - - the topleft corner of the rectanglebottomright - - the bottom right corner of the rectangle
public boolean isHit(int x,
int y)
isHit in class Cell2Dpublic java.awt.Rectangle getPerimeter()
getPerimeter in class Cell2Dpublic void performTransformation(GridTransformation trafo)
performTransformation in class Cell2D
public void performMirror(double nx,
double ny,
double px,
double py)
performMirror in class GridItempublic java.lang.Object clone()
clone in class Cell2Dpublic java.lang.String toString()
public double getSmallestInnerAngle()
getSmallestInnerAngle in class Cell2Dpublic double getAspectRatio()
getAspectRatio in class Cell2Dpublic double getArea()
getArea in class Cell2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||