public static AppearanceDefinition BlackMetalMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(6.0f); mat.setAmbientColor(0.16f, 0.18f, 0.2f); return mat; }
public static AppearanceDefinition FenceMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.4f, 0.4f, 0.4f); mat.setDiffuseColor(0.95f, 0.95f, 0.95f); mat.setShininess(2.0f); mat.setAmbientColor(0.45f, 0.45f, 0.45f); return mat; }
public static AppearanceDefinition AluminumMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(7.5f); mat.setAmbientColor(0.17f, 0.5f, 0.7f); return mat; }
public static AppearanceDefinition AluminumMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(7.5f); mat.setAmbientColor(0.17f, 0.5f, 0.7f); return mat; }
public static AppearanceDefinition BlackMetalMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(6.0f); mat.setAmbientColor(0.16f, 0.18f, 0.2f); return mat; }
public static AppearanceDefinition PlaneMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(7.5f); mat.setAmbientColor(0.17f, 0.5f, 0.7f); return mat; }
public static AppearanceDefinition PlaneMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.5f, 0.5f, 0.5f); mat.setDiffuseColor(0.2f, 0.4f, 0.5f); mat.setShininess(7.5f); mat.setAmbientColor(0.17f, 0.5f, 0.7f); return mat; }
public static AppearanceDefinition FenceMaterial() { YoAppearanceMaterial mat = new YoAppearanceMaterial(); mat.setSpecularColor(0.4f, 0.4f, 0.4f); mat.setDiffuseColor(0.95f, 0.95f, 0.95f); mat.setShininess(2.0f); mat.setAmbientColor(0.45f, 0.45f, 0.45f); return mat; }
public static void addRock3D(CombinedTerrainObject3D combinedTerrainObject, Vector3D normal, double centroidHeight, double[][] vertices) { // AppearanceDefinition rockAppearance = YoAppearance.DarkGray(); YoAppearanceMaterial rockAppearance = new YoAppearanceMaterial(); rockAppearance.setSpecularColor(0.5f, 0.5f, 0.5f); rockAppearance.setDiffuseColor(0.4f, 0.4f, 0.4f); // rockAppearance.setDiffuseColor(0.2f, 0.4f, 0.5f); rockAppearance.setShininess(6.0f); rockAppearance.setAmbientColor(0.16f, 0.18f, 0.2f); ArrayList<Point2D> vertexPoints = new ArrayList<Point2D>(); for (double[] point : vertices) { Point2D point2d = new Point2D(point); vertexPoints.add(point2d); } ConvexPolygon2D convexPolygon = new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(vertexPoints)); RotatableConvexPolygonTerrainObject rock = new RotatableConvexPolygonTerrainObject(normal, convexPolygon, centroidHeight, rockAppearance); combinedTerrainObject.addTerrainObject(rock); }
mat.setAmbientColor(new MutableColor(0.5f,0.5f,0.5f)); mat.setDiffuseColor(new MutableColor(0.5f,0.5f,0.5f)); mat.setSpecularColor(new MutableColor(0.5f,0.5f,0.5f)); mat.setAmbientColor(ModelFileLoaderConversionsHelper.stringToColor(tmpvis.getMaterial().getAmbient())); mat.setDiffuseColor(ModelFileLoaderConversionsHelper.stringToColor(tmpvis.getMaterial().getDiffuse())); mat.setSpecularColor(ModelFileLoaderConversionsHelper.stringToColor(tmpvis.getMaterial().getSpecular()));
mat.setAmbientColor(ModelFileLoaderConversionsHelper.stringToColor(sdfVisual.getMaterial().getAmbient())); mat.setDiffuseColor(ModelFileLoaderConversionsHelper.stringToColor(sdfVisual.getMaterial().getDiffuse())); mat.setSpecularColor(ModelFileLoaderConversionsHelper.stringToColor(sdfVisual.getMaterial().getSpecular()));