Hi all, Im new enough to java 3d and could do with any help! Anyone have any ideas bout making a wall/room in java 3d. Have tried this code but it wont work properly. Any help is gratefully accepted, Thanks.
Code: public void buildWall(int from, int to) { QuadArray plane = new QuadArray(4, GeometryArray.COORDINATES|GeometryArray.TEXTURE_COORDINATE_2); Point3f[] pts = new Point3f[4]; plane.setCoordinate(0, gridPoints[from]); plane.setCoordinate(1, gridPoints[to]); float x1 = gridPoints[to].x; float y1 = gridPoints[to].y; float z1 = gridPoints[to].z; plane.setCoordinate(2, new Point3f(x1, y1 + height, z1)); float x = gridPoints[from].x; float y = gridPoints[from].y; float z = gridPoints[from].z; plane.setCoordinate(3, new Point3f(x, y + height, z)); TexCoord2f q = new TexCoord2f(); q.set(0.0f, 0.0f); plane.setTextureCoordinate(0, 0, q); q.set(1.0f, 0.0f); plane.setTextureCoordinate(0, 1, q); q.set(1.0f, 1.0f); plane.setTextureCoordinate(0, 2, q); q.set(0.0f, 1.0f); plane.setTextureCoordinate(0, 3, q); Shape3D wall = new Shape3D(); wall.setGeometry(plane); Appearance appear = new Appearance(); appear.setMaterial(new Material()); appear.setPolygonAttributes(poly); TextureLoader texLoader = new TextureLoader("bricks.jpg", null); Texture2D texture = (Texture2D) texLoader.getTexture(); TextureAttributes texAttr = new TextureAttributes(); texAttr.setTextureMode(TextureAttributes.MODULATE); wall.setAppearance(appear); wallGroup.addChild(wall); =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".