|
||||||||||
| 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.Tri
The class Tri represents the cells of the discrete domain which have 3 nodes. This class is derived from Cell2D.
Cell,
Quad,
Macro,
Serialized Form| Field Summary |
| 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 | |
Tri()
Empty constructor. |
|
Tri(Edge e1,
Edge e2,
Edge e3)
|
|
Tri(int i,
Edge e1,
Edge e2,
Edge e3)
Calls one constructor of Cell, and defines the array of nodes of the cell. |
|
| Method Summary | |
java.lang.Object |
clone()
clones this Tri element shallowly, which means no nodes are recursivly cloned as well. |
void |
draw(java.awt.Graphics g)
Draws the perimeter of the Tri. |
void |
fill(java.awt.Graphics g)
Draws the Tri 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 Tri element, that is the smallest bounding box completely containing the Tri |
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 WORLD COORDINATES |
boolean |
isInside(int[] topleft,
int[] bottomright)
Is the tri completely inside a given rectangular area? All in WORLD COORDINATES!!! |
void |
performMirror(double nx,
double ny,
double px,
double py)
mirrors the Tri element by changing all nodes |
void |
performTransformation(GridTransformation trafo)
transforms the Tri element by changing all nodes |
void |
setCell(Edge e1,
Edge e2,
Edge e3)
Defines the array of nodes 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 |
| Constructor Detail |
public Tri()
Cell
public Tri(Edge e1,
Edge e2,
Edge e3)
public Tri(int i,
Edge e1,
Edge e2,
Edge e3)
Cell| 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)
Nodepublic Edge getEdge(int i)
getEdge in class Cell2DEdgepublic void updateInnerData()
updateInnerData in class Cell2Dpublic void draw(java.awt.Graphics g)
draw in class Cell2Dpublic void fill(java.awt.Graphics g)
fill in class CellCell
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 | |||||||||