

Public Member Functions | |
| SurfaceLineDrawerGL () | |
| void | setSurfaceType (int typeOfSurface) |
| void | drawSurface (double[] xCoords, double[] yCoords, double[] zCoords, int nbVertices) |
| void | drawSurface () |
Private Attributes | |
| SurfaceDecomposer | decomposer |
| int | nbVertices |
Definition at line 29 of file SurfaceLineDrawerGL.java.
| org::scilab::modules::renderer::surfaceDrawing::SurfaceLineDrawerGL::SurfaceLineDrawerGL | ( | ) | [inline] |
| void org::scilab::modules::renderer::surfaceDrawing::SurfaceLineDrawerGL::setSurfaceType | ( | int | typeOfSurface | ) | [inline] |
Specify the kind of surface to use
| typeOfSurface | type of surface (ie Plot3d or Fac3d) |
Definition at line 48 of file SurfaceLineDrawerGL.java.
References org::scilab::modules::renderer::surfaceDrawing::SurfaceDecomposer::create(), and decomposer.
00048 { 00049 decomposer = SurfaceDecomposer.create(typeOfSurface); 00050 }

| void org::scilab::modules::renderer::surfaceDrawing::SurfaceLineDrawerGL::drawSurface | ( | double[] | xCoords, | |
| double[] | yCoords, | |||
| double[] | zCoords, | |||
| int | nbVertices | |||
| ) | [inline] |
Specify the positions of each vertices and raw the surface
| xCoords | array of size nbFacet * nbVertices | |
| yCoords | array of size nbFacet * nbVertices | |
| zCoords | array of size nbFacet * nbVertices | |
| nbVertices | number of vertices for each facet |
Definition at line 59 of file SurfaceLineDrawerGL.java.
References decomposer, drawSurface(), and org::scilab::modules::renderer::surfaceDrawing::SurfaceDecomposer::setFacetsPositions().
00059 { 00060 00061 decomposer.setFacetsPositions(xCoords, yCoords, zCoords, nbVertices); 00062 this.nbVertices = nbVertices; 00063 drawSurface(); 00064 decomposer = null; 00065 }

| void org::scilab::modules::renderer::surfaceDrawing::SurfaceLineDrawerGL::drawSurface | ( | void | ) | [inline] |
Draw the lines of the surface
Definition at line 70 of file SurfaceLineDrawerGL.java.
References decomposer, org::scilab::modules::renderer::ObjectGL::getGL(), org::scilab::modules::renderer::drawers::LineDrawerGL::getLineColor(), org::scilab::modules::renderer::drawers::LineDrawerGL::getLineStyle(), org::scilab::modules::renderer::drawers::LineDrawerGL::getThickness(), i, and nbVertices.
Referenced by drawSurface().
00070 { 00071 GL gl = getGL(); 00072 00073 double[] color = getLineColor(); 00074 gl.glColor3d(color[0], color[1], color[2]); 00075 00076 GLTools.beginDashMode(gl, getLineStyle(), getThickness()); 00077 00078 gl.glBegin(GL.GL_LINES); 00079 while (decomposer.hasNext()) { 00080 00081 // find position of the facet 00082 Vector3D[] curFacetPos = decomposer.next(); 00083 00084 // draw the lines composing the facet 00085 if (curFacetPos != null) { 00086 for (int i = 0; i < nbVertices - 1; i++) { 00087 gl.glVertex3d(curFacetPos[i].getX(), curFacetPos[i].getY(), curFacetPos[i].getZ()); 00088 gl.glVertex3d(curFacetPos[i + 1].getX(), curFacetPos[i + 1].getY(), curFacetPos[i + 1].getZ()); 00089 } 00090 00091 // last line 00092 gl.glVertex3d(curFacetPos[nbVertices - 1].getX(), 00093 curFacetPos[nbVertices - 1].getY(), 00094 curFacetPos[nbVertices - 1].getZ()); 00095 gl.glVertex3d(curFacetPos[0].getX(), curFacetPos[0].getY(), curFacetPos[0].getZ()); 00096 } 00097 00098 } 00099 00100 gl.glEnd(); 00101 00102 GLTools.endDashMode(gl); 00103 }


SurfaceDecomposer org::scilab::modules::renderer::surfaceDrawing::SurfaceLineDrawerGL::decomposer [private] |
Definition at line 32 of file SurfaceLineDrawerGL.java.
Referenced by drawSurface(), and setSurfaceType().
Number of vertice per facet
Definition at line 35 of file SurfaceLineDrawerGL.java.
Referenced by drawSurface().
1.5.5