

Public Member Functions | |
| ZGridDrawerGL () | |
| void | drawGrid () |
Private Member Functions | |
| Vector3D[] | getGridStartingPoints (double xCoordinate, double yCoordinate) |
| Vector3D[] | getGridMiddlePoints (double xCoordinate, double yCoordinate) |
| Vector3D[] | getGridEndPoints (double xCoordinate, double yCoordinate) |
Definition at line 24 of file ZGridDrawerGL.java.
| org::scilab::modules::renderer::subwinDrawing::ZGridDrawerGL::ZGridDrawerGL | ( | ) | [inline] |
| Vector3D [] org::scilab::modules::renderer::subwinDrawing::ZGridDrawerGL::getGridStartingPoints | ( | double | xCoordinate, | |
| double | yCoordinate | |||
| ) | [inline, private] |
Get the starting points for grid drawing
| xCoordinate | X coordinate of the Z axis | |
| yCoordinate | Y coordinate of the Z axis |
Definition at line 39 of file ZGridDrawerGL.java.
References org::scilab::modules::renderer::subwinDrawing::GridDrawerGL::getGridNbPositions(), org::scilab::modules::renderer::subwinDrawing::GridDrawerGL::getGridPosition(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::getZmax(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::getZmin(), and res.
Referenced by drawGrid(), getGridEndPoints(), and getGridMiddlePoints().
00039 { 00040 int nbGridLines = getGridNbPositions(); 00041 Vector3D[] res = new Vector3D[nbGridLines]; 00042 00043 for (int i = 0; i < nbGridLines; i++) { 00044 double zCoordinate = getGridPosition(i); 00045 if (zCoordinate < getZmin() || zCoordinate > getZmax()) { 00046 res[i] = null; 00047 } else { 00048 res[i] = new Vector3D(xCoordinate, yCoordinate, zCoordinate); 00049 } 00050 } 00051 00052 return res; 00053 00054 }


| Vector3D [] org::scilab::modules::renderer::subwinDrawing::ZGridDrawerGL::getGridMiddlePoints | ( | double | xCoordinate, | |
| double | yCoordinate | |||
| ) | [inline, private] |
Get the middle points for grid drawing, there are the points belinging to both grid lines segment
| xCoordinate | X coordinate of the Z axis | |
| yCoordinate | Y coordinate of the Z axis |
Definition at line 63 of file ZGridDrawerGL.java.
References org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findLowerZCoordinate(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findOtherXBound(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findOtherYBound(), getGridStartingPoints(), and org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::isSharingEndWithXaxis().
Referenced by drawGrid().
00063 { 00064 // middle points are on the opposite of X or Y axis 00065 double zCoordFront = findLowerZCoordinate(); 00066 00067 if (isSharingEndWithXaxis(zCoordFront, xCoordinate)) { 00068 // inverse y 00069 return getGridStartingPoints(xCoordinate, findOtherYBound(yCoordinate)); 00070 } else { 00071 return getGridStartingPoints(findOtherXBound(xCoordinate), yCoordinate); 00072 } 00073 }


| Vector3D [] org::scilab::modules::renderer::subwinDrawing::ZGridDrawerGL::getGridEndPoints | ( | double | xCoordinate, | |
| double | yCoordinate | |||
| ) | [inline, private] |
Get the last point to display on the grid line. It is on the opposed edge of the box
| xCoordinate | X coordinate of the Z axis | |
| yCoordinate | Y coordinate of the Z axis |
Definition at line 82 of file ZGridDrawerGL.java.
References org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findOtherXBound(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findOtherYBound(), and getGridStartingPoints().
Referenced by drawGrid().
00082 { 00083 00084 return getGridStartingPoints(findOtherXBound(xCoordinate), findOtherYBound(yCoordinate)); 00085 }


| void org::scilab::modules::renderer::subwinDrawing::ZGridDrawerGL::drawGrid | ( | ) | [inline, virtual] |
Draw the grid with already set positions
Implements org::scilab::modules::renderer::subwinDrawing::GridDrawerGL.
Definition at line 90 of file ZGridDrawerGL.java.
References org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findLeftMostXCoordinate(), org::scilab::modules::renderer::subwinDrawing::BoxTrimmingObjectGL::findLeftMostYCoordinate(), getGridEndPoints(), getGridMiddlePoints(), and getGridStartingPoints().
00090 { 00091 00092 double xCoordinate = findLeftMostXCoordinate(); 00093 double yCoordinate = findLeftMostYCoordinate(); 00094 00095 Vector3D[] startingPoints = getGridStartingPoints(xCoordinate, yCoordinate); 00096 Vector3D[] middlePoints = getGridMiddlePoints(xCoordinate, yCoordinate); 00097 Vector3D[] endPoints = getGridEndPoints(xCoordinate, yCoordinate); 00098 00099 drawGrid(startingPoints, middlePoints, endPoints); 00100 00101 }

1.5.4