/** * @param first * @param coordinate2 * @return */ private RenderableGeometry createVerticalGeometry( Coordinate first, Coordinate second, float minz, float maxz ) { float[] geom = new float[] { (float) first.x, (float) first.y, minz, (float) first.x, (float) first.y, maxz, (float) second.x, (float) second.y, maxz, (float) second.x, (float) second.y, minz }; float[] normal = new float[3]; float[] normals = new float[geom.length]; Vectors3f.normalizedNormal( geom, 0, normal ); normals[0] = normals[3] = normals[6] = normals[9] = normal[0]; normals[1] = normals[4] = normals[7] = normals[10] = normal[1]; normals[2] = normals[5] = normals[8] = normals[11] = normal[2]; return new RenderableGeometry( geom, GL.GL_QUADS, normals, false ); }
/** * Calculate the normals for the tesselated geometry and return a renderable geometry created from the given * {@link SimpleAccessGeometry} * * @param useDirectBuffers * to use direct buffers instead of heap buffers. * * @return the tesselated {@link SimpleAccessGeometry} as a {@link RenderableGeometry} */ public RenderableGeometry createRenderableGeometry( boolean useDirectBuffers ) { return new RenderableGeometry( getTesselatedCoordinates(), getOpenGLType(), calculateNormals(), geom.getStyle(), useDirectBuffers ); }
result = new RenderableGeometry( coordPositions[0], ( coordPositions[1] / 3 ), glType, normalPositions[0], style ); } else { result = new RenderableGeometry( coordBuffer, glType, normalBuffer, style );
if ( bb == null ) { if ( texCoordID == null ) { geometries.add( new RenderableGeometry( coords, glType, normals, style, false ) ); } else { geometries.add( new RenderableTexturedGeometry( coords, glType, normals, style,