List of usage examples for javax.media.j3d ColoringAttributes FASTEST
int FASTEST
To view the source code for javax.media.j3d ColoringAttributes FASTEST.
Click Source Link
From source file:SplineInterpolatorTest.java
public Group createLand(Group g) { Land land = new Land(this, g, ComplexObject.GEOMETRY | ComplexObject.TEXTURE); Group hiResGroup = land.createObject(new Appearance(), new Vector3d(), new Vector3d(LAND_WIDTH, 1, LAND_LENGTH), "boston.gif", null, null); Appearance app = new Appearance(); app.setColoringAttributes(new ColoringAttributes(WATER_COLOR_RED / 255f, WATER_COLOR_GREEN / 255f, WATER_COLOR_BLUE / 255f, ColoringAttributes.FASTEST)); Land base = new Land(this, hiResGroup, ComplexObject.GEOMETRY); base.createObject(app, new Vector3d(0, -5, 0), new Vector3d(4 * LAND_WIDTH, 1, 4 * LAND_LENGTH), null, null, null);/*from ww w. j a v a 2 s. c om*/ return hiResGroup; }
From source file:KeyNavigateTest.java
void createExternalWall(Group mapGroup) { Vector3d squareSize = getMapSquareSize(); Appearance app = new Appearance(); app.setColoringAttributes(/* www .j a v a2 s .co m*/ new ColoringAttributes(new Color3f(132f / 255f, 0, 66f / 255f), ColoringAttributes.FASTEST)); int imageWidth = m_MapImage.getWidth(); int imageHeight = m_MapImage.getHeight(); Point3d topLeft = convertToWorldCoordinatesPixelCenter(0, 0); Point3d bottomRight = convertToWorldCoordinatesPixelCenter(imageWidth - 1, imageHeight - 1); // top Cuboid wall = new Cuboid(this, mapGroup, ComplexObject.GEOMETRY); wall.createObject(app, new Vector3d(0, m_kFloorLevel, topLeft.z), new Vector3d(squareSize.x * imageWidth / 2, m_kCeilingHeight / 2, squareSize.z / 2), null, null, null); // bottom wall = new Cuboid(this, mapGroup, ComplexObject.GEOMETRY); wall.createObject(app, new Vector3d(0, m_kFloorLevel, bottomRight.z), new Vector3d(squareSize.x * imageWidth / 2, m_kCeilingHeight / 2, squareSize.z / 2), null, null, null); // left wall = new Cuboid(this, mapGroup, ComplexObject.GEOMETRY); wall.createObject(app, new Vector3d(topLeft.x, m_kFloorLevel, 0), new Vector3d(squareSize.x / 2, m_kCeilingHeight / 2, squareSize.z * imageHeight / 2), null, null, null); // right wall = new Cuboid(this, mapGroup, ComplexObject.GEOMETRY); wall.createObject(app, new Vector3d(bottomRight.x, m_kFloorLevel, 0), new Vector3d(squareSize.x / 2, m_kCeilingHeight / 2, squareSize.z * imageHeight / 2), null, null, null); }
From source file:AppearanceTest.java
public void onFastest() { getColoringAttributes().setShadeModel(ColoringAttributes.FASTEST); }
From source file:AppearanceExplorer.java
public ColoringAttributesEditor(ColoringAttributes init) { super(BoxLayout.Y_AXIS); coloringAttr = init;/* w w w. jav a 2 s .c o m*/ coloringAttr.getColor(color); coloringShadeModel = coloringAttr.getShadeModel(); String[] shadeNames = { "SHADE_FLAT", "SHADE_GOURAUD", "NICEST", "FASTEST" }; int[] shadeValues = { ColoringAttributes.SHADE_FLAT, ColoringAttributes.SHADE_GOURAUD, ColoringAttributes.NICEST, ColoringAttributes.FASTEST }; IntChooser shadeChooser = new IntChooser("Shade model:", shadeNames, shadeValues, coloringShadeModel); shadeChooser.addIntListener(new IntListener() { public void intChanged(IntEvent event) { int value = event.getValue(); coloringAttr.setShadeModel(value); } }); add(shadeChooser); Color3fEditor colorEditor = new Color3fEditor("Color", color); colorEditor.addColor3fListener(new Color3fListener() { public void colorChanged(Color3fEvent event) { event.getValue(color); coloringAttr.setColor(color); } }); add(colorEditor); }