public TextureData getWaterTextureData() { String keyStr = textureLibraryStorageService.getKey(TextureLibraryKey.WATER, (String) null); return textureLibraryStorageService.getTextureDefault(keyStr); }
String keyStr = this.textureLibraryStorageService.getKey(key, pTextureFindCriteria.getTypeName()/*, pTextureFindCriteria.getSubTypeName()*/); List<TextureData> textureSet = this.textureLibraryStorageService.findTextureData(keyStr); boolean findColorable = false; if (colorable) {
public void draw(GL2 gl, Point3d cameraPosition) { gl.glEnable(GL2.GL_LIGHTING); gl.glEnable(GL2.GL_TEXTURE_2D); TextureData td = this.textureLibraryStorageService.getTextureDefault("ground.unknown"); Texture texture = this.textureCacheService.getTexture(gl, td.getTex0()); texture.enable(gl); texture.bind(gl); gl.glBegin(GL2.GL_POLYGON); gl.glColor3f((float) 123 / 256, (float) 111 / 256, (float) 100 / 255); double groundSize = 1500.0; Point3d c = cameraPosition; // gl.glTexCoord2d(tc.left(), tc.bottom()); double xRight = c.x + groundSize; double xLeft = c.x - groundSize; double zButtom = c.z + groundSize; double zTop = c.z - groundSize; gl.glNormal3d(0, 1, 0); gl.glTexCoord2d(xRight * td.getWidth(), zButtom * td.getHeight()); gl.glVertex3d(xRight, -0.01, zButtom); gl.glTexCoord2d(xLeft * td.getWidth(), zButtom * td.getHeight()); gl.glVertex3d(xLeft, -0.01, zButtom); gl.glTexCoord2d(xLeft * td.getWidth(), zTop * td.getHeight()); gl.glVertex3d(xLeft, -0.01, zTop); gl.glTexCoord2d(xRight * td.getWidth(), zTop * td.getHeight()); gl.glVertex3d(xRight, -0.01, zTop); gl.glEnd(); texture.disable(gl); gl.glDisable(GL2.GL_TEXTURE_2D); }
@Override public void actionPerformed(ActionEvent pE) { modelsLibraryService.clear(); textureLibraryStorageService.reload(); textureCacheService.clear(); modelCacheService.clear(); modelsLibraryLayer.cleanUp(); } }
this.textureLibraryStorageService.loadUserFile(urlTextureLibrary); } else { log.info("Open command cancelled by user." );
this.textureLibraryStorageService.reload();
/** * Gets facade texture. * * @param facadeMaterialName facade material name * @param textureLibraryStorageService texture library storage service * @return facade texture data */ public static TextureData parseFacadeTexture(String facadeMaterialName, TextureLibraryStorageService textureLibraryStorageService) { String facadeMaterial = facadeMaterialName; if (!StringUtil.isBlankOrNull(facadeMaterial)) { String textureKey = textureLibraryStorageService.getKey(TextureLibraryKey.BUILDING_FACADE, facadeMaterial); return textureLibraryStorageService.getTextureDefault(textureKey); } return null; }
/** * Gets wall texture data. * * @param wallType * wall type * @param wallColor * wall color * @param osmPrimitive * primitive * @param TextureLibraryStorageService * texture library service * @return texture data */ public static TextureData takeWallTexture(String wallType, Color wallColor, OsmPrimitive osmPrimitive, TextureLibraryStorageService TextureLibraryStorageService) { String textureKey = TextureLibraryStorageService.getKey(TextureLibraryKey.BARRIER_WALL, wallType); TextureData textureData = TextureLibraryStorageService.getTextureDefault(textureKey); if (!Boolean.FALSE.equals(textureData.isColorable()) && wallColor != null) { return OsmBuildingElementsTextureMenager.colorableTextureData(textureData); } return textureData; }
String textureKey = TextureLibraryStorageService.getKey(TextureLibraryKey.BARRIER_FENCE, fenceType); return TextureLibraryStorageService.getTextureDefault(textureKey);