Made a lot of changes all over the place. This code does not compile and is not working, but may serve as a reference for future work.
diff --git a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/ColorPicker.java b/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/ColorPicker.java
deleted file mode 100644
index cbfd90e..0000000
--- a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/ColorPicker.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jens von Pilgrim and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Kristian Duske - initial API and implementation
- *    Jens von Pilgrim - initial API and implementation
- ******************************************************************************/
-package org.eclipse.draw3d.picking;
-
-import java.nio.ByteBuffer;
-import java.nio.FloatBuffer;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.eclipse.draw3d.Figure3DHelper;
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.ISurface;
-import org.eclipse.draw3d.RenderMode;
-import org.eclipse.draw3d.graphics3d.Graphics3DOffscreenBufferConfig;
-import org.eclipse.draw3d.util.ImageConverter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-import org.eclipse.swt.opengl.GLCanvas;
-
-/**
- * Allows picking of 3D figures by using color picking buffers. Color picking
- * works by rendering the scene with flat shading, giving every pickable object
- * a single distinct color. This color is later used as an index to retrieve the
- * associated figure. Picking is then performed by determining the color of the
- * pixel that was hit by the picking ray and looking up the picked object (if
- * any).
- * <p>
- * From old picking documentation (may not be uptodate): Picking is done by
- * rendering all 3D figures in flat color mode. Every figure has a unique RGB
- * color which is used to identify it. This color is also used as the index of
- * the {@link #coloredFigures} array: <br>
- * <br>
- * <code>index = RR | GG << 8 | BB << 16 == 0x00BBGGRR</code>.<br>
- * <br>
- * The picking process has the following steps:
- * <ol>
- * <li>Recreate the picking data structures if neccessary. For every figure:
- * <ol>
- * <li>Obtain a unique color using
- * {@link #nextColorIndex(RenderMode, IFigure3D)}. This also adds the figure to
- * the {@link #coloredFigures} array with the color as the index as described
- * above.</li>
- * <li>Render the figure in flat color mode using the unique color.</li>
- * </ol>
- * Finally, read the color and depth buffers.</li>
- * <li>Find the color at the given coordinates (this is done by reading the
- * color buffer).</li>
- * <li>Calculate an integer index from the RGB values of the color (see above).</li>
- * <li>If the color is 0xFFFFFF (white), then no figure was hit (white is the
- * background color). Otherwise, find the figure in the {@link #coloredFigures}
- * array and return it.</li>
- * </ol>
- * </p>
- * 
- * @author Kristian Duske
- * @version $Revision$
- * @since 08.05.2008
- */
-public class ColorPicker {
-
-    @SuppressWarnings("unused")
-    private static final Logger log = Logger.getLogger(ColorPicker.class.getName());
-
-    private GLCanvas m_canvas;
-
-    private ISurface m_currentSurface;
-
-    private boolean m_disposed = false;
-
-    private final FigureManager m_figureManager;
-
-    private Set<Class<?>> m_ignoredHosts = new HashSet<Class<?>>();
-
-    private final PickingBuffers m_pickingBuffers;
-
-    private IFigure3D m_rootFigure;
-
-    private boolean m_valid = false;
-
-    /**
-     * Creates a new instance.
-     */
-    public ColorPicker() {
-
-        m_figureManager = new FigureManager();
-        m_pickingBuffers = new OffscreenBuffers();
-    }
-
-    /**
-     * Clears the ignored figures and types.
-     */
-    public void clearIgnored() {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        if (log.isLoggable(Level.FINE))
-            log.fine("clearing all ignored figures and types");
-
-        m_valid = !m_figureManager.clearIgnored() && m_valid;
-    }
-
-    /**
-     * Disposes this color picker.
-     */
-    public void dispose() {
-
-        if (m_disposed)
-            return;
-
-        m_pickingBuffers.dispose();
-        m_disposed = true;
-    }
-
-    /**
-     * Dumps the color buffer of this picker.
-     */
-    public void dump() {
-
-        ByteBuffer buffer = m_pickingBuffers.getColorBuffer();
-        Graphics3DOffscreenBufferConfig bufferConfig = m_pickingBuffers.getBufferConfig();
-
-        int pixelFormat = bufferConfig.getColorPixelFormat();
-        int dataType = bufferConfig.getColorDataType();
-
-        int width = m_pickingBuffers.getWidth();
-        int height = m_pickingBuffers.getHeight();
-
-        ImageData imageData = ImageConverter.colorBufferToImage(buffer,
-            pixelFormat, dataType, width, height);
-
-        ImageLoader imageLoader = new ImageLoader();
-        imageLoader.data = new ImageData[] { imageData };
-
-        String path = "/Users/kristian/Temp/colorBuffer"
-                + System.currentTimeMillis() + ".png";
-        imageLoader.save(path, SWT.IMAGE_PNG);
-    }
-
-    /**
-     * Returns the color value of the pixel at the given position. The returned
-     * integer contains the RGB byte values in reverse order as it's least
-     * significant bytes: 0x00BBGGRR.
-     * 
-     * @param i_x
-     *            the x coordinate of the pixel
-     * @param i_y
-     *            the y coordinate of the pixel
-     * @return the color of the pixel at the given position
-     * @throws IllegalArgumentException
-     *             if the specified position coordinates exceed the buffer
-     *             dimensions
-     */
-    private int getColorValue(int i_x, int i_y) {
-
-        ByteBuffer colorBuffer = m_pickingBuffers.getColorBuffer();
-
-        int width = m_pickingBuffers.getWidth();
-        int height = m_pickingBuffers.getHeight();
-
-        if (i_x < 0 || i_x >= width || i_y < 0 || i_y >= height)
-            return 0;
-
-        int index = ((height - i_y - 1) * width + i_x) * 3;
-
-        int value = 0;
-        value = colorBuffer.get(index) & 0xFF;
-        value |= (colorBuffer.get(index + 1) & 0xFF) << 8;
-        value |= (colorBuffer.get(index + 2) & 0xFF) << 16;
-
-        return value;
-    }
-
-    /**
-     * Returns the current surface.
-     * 
-     * @return the current surface
-     */
-    public ISurface getCurrentSurface() {
-
-        if (m_currentSurface == null)
-            return m_rootFigure.getSurface();
-
-        return m_currentSurface;
-    }
-
-    /**
-     * Returns the depth value for the foremost figure at the given mouse
-     * coordinates.
-     * 
-     * @param i_x
-     *            the mouse X coordinate
-     * @param i_y
-     *            the mouse Y coordinate
-     * @return the depth value
-     * @throws IllegalStateException
-     *             if this figure picker is invalid
-     */
-    public float getDepth(int i_x, int i_y) {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        validate();
-
-        FloatBuffer depthBuffer = m_pickingBuffers.getDepthBuffer();
-
-        int width = m_pickingBuffers.getWidth();
-        int height = m_pickingBuffers.getHeight();
-
-        if (i_x < 0 || i_x >= width || i_y < 0 || i_y >= height)
-            return 0;
-
-        int index = (height - i_y - 1) * width + i_x;
-        return depthBuffer.get(index);
-    }
-
-    /**
-     * Returns the foremost 3D figure at the given mouse coordinates.
-     * 
-     * @param i_mx
-     *            the mouse X coordinate
-     * @param i_my
-     *            the mouse Y coordinate
-     * @return the 3D figure at the given coordinates or <code>null</code> if
-     *         the pixel at the given coordinates is void
-     * @throws IllegalStateException
-     *             if this figure picker is invalid
-     */
-    public IFigure3D getFigure3D(int i_mx, int i_my) {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        validate();
-
-        int color = getColorValue(i_mx, i_my);
-        IFigure3D figure = m_figureManager.getFigure(color);
-
-        if (figure != null && !isIgnoredHost(figure)) {
-            ISurface surface = figure.getSurface();
-            if (surface != null)
-                m_currentSurface = figure.getSurface();
-        }
-
-        return figure;
-    }
-
-    /**
-     * Ignore the given figure and all its children.
-     * 
-     * @param i_figure
-     *            the figure to ignore
-     * @throws NullPointerException
-     *             if the given figure is <code>null</code>
-     */
-    public void ignoreFigure(IFigure3D i_figure) {
-
-        if (i_figure == null)
-            throw new NullPointerException("i_figure must not be null");
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        m_valid = !m_figureManager.ignoreFigure(i_figure) && m_valid;
-
-        if (log.isLoggable(Level.FINE))
-            log.fine("ignoring " + i_figure + " and all children");
-    }
-
-    /**
-     * Ignores any surface that belongs to a host that is an instance of the
-     * given type or any of the hosts children.
-     * 
-     * @param i_hostType
-     *            the type to ignore
-     */
-    public void ignoreSurface(Class<?> i_hostType) {
-
-        if (i_hostType == null)
-            throw new NullPointerException("i_hostType must not be null");
-
-        if (m_ignoredHosts.add(i_hostType) && log.isLoggable(Level.FINE))
-            log.fine("ignoring surface type " + i_hostType);
-    }
-
-    /**
-     * Ignore any figure that is an instance of the given type including the
-     * figures children.
-     * 
-     * @param i_type
-     *            the type to ignore
-     * @throws NullPointerException
-     *             if the given class is <code>null</code>
-     */
-    public void ignoreType(Class<?> i_type) {
-
-        if (i_type == null)
-            throw new NullPointerException("i_type must not be null");
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        m_valid = !m_figureManager.ignoreType(i_type) && m_valid;
-
-        if (log.isLoggable(Level.FINE))
-            log.fine("ignoring " + i_type + " and all children");
-    }
-
-    /**
-     * Informs this figure picker that it needs to validate itself.
-     */
-    public void invalidate() {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        m_valid = false;
-    }
-
-    /**
-     * Indicates whether the given figure is ignored.
-     * 
-     * @param i_figure
-     *            the figure to check
-     * @return <code>true</code> if the given figure is ignored or
-     *         <code>false</code> otherwise
-     * @throws NullPointerException
-     *             if the given figure is <code>null</code>
-     */
-    public boolean isIgnored(IFigure3D i_figure) {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        IFigure3D currentFigure = i_figure;
-        do {
-            if (m_figureManager.isIgnored(currentFigure)) {
-                if (log.isLoggable(Level.FINE)) {
-                    StringBuilder message = new StringBuilder();
-                    message.append(i_figure);
-                    message.append(" is ignored");
-                    if (i_figure != currentFigure) {
-                        message.append(" because of ancestor ");
-                        message.append(currentFigure);
-                    }
-
-                    log.fine(message.toString());
-                }
-                return true;
-            }
-
-            currentFigure = Figure3DHelper.getAncestor3D(currentFigure);
-        } while (currentFigure != null);
-
-        return false;
-    }
-
-    private boolean isIgnoredHost(IFigure3D i_figure) {
-
-        for (Class<?> type : m_ignoredHosts)
-            if (type.isInstance(i_figure))
-                return true;
-
-        return false;
-    }
-
-    /**
-     * Sets the canvas to use when repainting the color buffer.
-     * 
-     * @param i_canvas
-     *            the canvas
-     */
-    public void setCanvas(GLCanvas i_canvas) {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        m_canvas = i_canvas;
-    }
-
-    /**
-     * Sets the root figure.
-     * 
-     * @param i_rootFigure
-     *            the root figure
-     */
-    public void setRootFigure(IFigure3D i_rootFigure) {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        m_rootFigure = i_rootFigure;
-    }
-
-    /**
-     * Triggers a validation of this figure picker.
-     */
-    public void validate() {
-
-        if (m_disposed)
-            throw new IllegalStateException("color picker is disposed");
-
-        if (m_valid)
-            return;
-
-        if (m_canvas == null)
-            throw new IllegalStateException("canvas has not been initialized");
-
-        if (m_rootFigure == null)
-            throw new IllegalStateException(
-                "root figure has not been initialized");
-
-        m_pickingBuffers.repaint(m_rootFigure, m_figureManager, m_canvas);
-        m_valid = true;
-    }
-}
diff --git a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/SnapshotBuffers.java b/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/SnapshotBuffers.java
deleted file mode 100644
index d941524..0000000
--- a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/picking/SnapshotBuffers.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jens von Pilgrim and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Kristian Duske - initial API and implementation
- ******************************************************************************/
-package org.eclipse.draw3d.picking;
-
-import java.nio.ByteBuffer;
-import java.nio.FloatBuffer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw3d.graphics3d.Graphics3DOffscreenBufferConfig;
-import org.eclipse.draw3d.util.BufferUtils;
-import org.eclipse.draw3d.util.StopWatch;
-import org.eclipse.swt.opengl.GLCanvas;
-
-/**
- * Picking buffers that contain a snapshot.
- * 
- * @author Kristian Duske
- * @version $Revision$
- * @since 16.05.2008
- */
-public class SnapshotBuffers implements PickingBuffers {
-
-	private static final Logger log = Logger.getLogger(SnapshotBuffers.class
-			.getName());
-
-	private final Graphics3DOffscreenBufferConfig m_bufferConfig;
-
-	private ByteBuffer m_colorBuffer;
-
-	private FloatBuffer m_depthBuffer;
-
-	private boolean m_disposed;
-
-	private final int m_height;
-
-	private final int m_width;
-
-	/**
-	 * Creates a new snapshot of the given buffers. The given buffers will be
-	 * copied so that changes to those buffers are not reflected in this
-	 * snapshot.
-	 * 
-	 * @param i_colorBuffer the color buffer to preserve
-	 * @param i_depthBuffer the depth buffer to preserve
-	 * @param i_width the width of the buffers, in pixels
-	 * @param i_height the height of the buffers, in pixels
-	 * @param i_bufferConfig the buffer configuration
-	 * @throws NullPointerException if any of the given buffers is
-	 *             <code>null</code>
-	 */
-	public SnapshotBuffers(ByteBuffer i_colorBuffer, FloatBuffer i_depthBuffer,
-			int i_width, int i_height,
-			Graphics3DOffscreenBufferConfig i_bufferConfig) {
-
-		if (i_colorBuffer == null)
-			throw new NullPointerException("i_colorBuffer must not be null");
-
-		if (i_depthBuffer == null)
-			throw new NullPointerException("i_depthBuffer must not be null");
-
-		if (i_bufferConfig == null)
-			throw new NullPointerException("i_bufferConfig must not be null");
-
-		if (log.isLoggable(Level.FINE))
-			log.fine(StopWatch.start("color buffer snapshot"));
-
-		m_colorBuffer = BufferUtils.createByteBuffer(i_colorBuffer.capacity());
-		i_colorBuffer.rewind();
-		m_colorBuffer.put(i_colorBuffer);
-
-		m_depthBuffer = BufferUtils.createFloatBuffer(i_depthBuffer.capacity());
-		m_depthBuffer.rewind();
-		m_depthBuffer.put(i_depthBuffer);
-
-		m_width = i_width;
-		m_height = i_height;
-		m_bufferConfig = i_bufferConfig;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#createSnapshot()
-	 */
-	public PickingBuffers createSnapshot() {
-
-		return new SnapshotBuffers(getColorBuffer(), getDepthBuffer(),
-				getWidth(), getHeight(), getBufferConfig());
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#dispose()
-	 */
-	public void dispose() {
-
-		if (m_disposed)
-			return;
-
-		m_colorBuffer = null;
-		m_depthBuffer = null;
-
-		m_disposed = true;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#getBufferConfig()
-	 */
-	public Graphics3DOffscreenBufferConfig getBufferConfig() {
-
-		return m_bufferConfig;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#getColorBuffer()
-	 */
-	public ByteBuffer getColorBuffer() {
-
-		if (m_disposed)
-			throw new IllegalStateException("picking buffers are disposed");
-
-		return m_colorBuffer;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#getDepthBuffer()
-	 */
-	public FloatBuffer getDepthBuffer() {
-
-		if (m_disposed)
-			throw new IllegalStateException("picking buffers are disposed");
-
-		return m_depthBuffer;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#getHeight()
-	 */
-	public int getHeight() {
-
-		if (m_disposed)
-			throw new IllegalStateException("picking buffers are disposed");
-
-		return m_height;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#getWidth()
-	 */
-	public int getWidth() {
-
-		if (m_disposed)
-			throw new IllegalStateException("picking buffers are disposed");
-
-		return m_width;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * 
-	 * @see org.eclipse.draw3d.picking.PickingBuffers#repaint(org.eclipse.draw2d.IFigure,
-	 *      org.eclipse.draw3d.picking.FigureManager,
-	 *      org.eclipse.swt.opengl.GLCanvas)
-	 */
-	public void repaint(IFigure i_rootFigure, FigureManager i_figureManager,
-			GLCanvas i_canvas) {
-
-		// nothing to do
-	}
-}
diff --git a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/util/CoordinateConverter.java b/org.eclipse.draw3d/src/java/org/eclipse/draw3d/util/CoordinateConverter.java
deleted file mode 100644
index 40359c2..0000000
--- a/org.eclipse.draw3d/src/java/org/eclipse/draw3d/util/CoordinateConverter.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jens von Pilgrim and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Kristian Duske - initial API and implementation
- *    Jens von Pilgrim - initial API and implementation
- ******************************************************************************/
-package org.eclipse.draw3d.util;
-
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
-
-import org.eclipse.draw2d.UpdateManager;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.PickingUpdateManager3D;
-import org.eclipse.draw3d.geometry.IVector3f;
-import org.eclipse.draw3d.geometry.Math3D;
-import org.eclipse.draw3d.geometry.Matrix4f;
-import org.eclipse.draw3d.geometry.Matrix4fImpl;
-import org.eclipse.draw3d.geometry.Vector3f;
-import org.eclipse.draw3d.geometry.Vector3fImpl;
-import org.eclipse.draw3d.geometry.Vector4f;
-import org.eclipse.draw3d.geometry.Vector4fImpl;
-import org.eclipse.draw3d.graphics3d.Graphics3D;
-import org.eclipse.draw3d.graphics3d.Graphics3DDraw;
-import org.eclipse.draw3d.picking.ColorPicker;
-
-/**
- * Utility class to convert coordinates.<br/>
- * <br />
- * There are the following coordinate systems in Gef3D:
- * <ul>
- * <li><b>World coordinates</b> - 3D floating point coordinates in OpenGL world
- * space.</li>
- * <li><b>Screen coordinates</b> - 2D integer coordinates on the screen, the
- * origin being in the top left corner of the viewport. Often, a depth value is
- * associated with screen coordinates to identify a point on the view ray. The
- * depth value at a given screen pixel describes the distance from the view
- * point to a point in 3D world space and can be obtained from the color picker
- * ({@link ColorPicker}).</li>
- * <li><b>Figure coordinates</b></li> - 3D floating point coordinates that are
- * relative to the local coordinate system of a figure. The origin of the figure
- * coordinate system is in its top left front corner.
- * <li><b>Surface coordinates</b></li> - 2D integer coordinates that are
- * relative to the origin of the front surface of a figure, which is usually in
- * its top left corner.
- * </ul>
- * 
- * @author Kristian Duske
- * @version $Revision$
- * @since 02.03.2008
- */
-public class CoordinateConverter {
-
-	private static final Matrix4f INVERSE = new Matrix4fImpl();
-
-	private static final Matrix4f MODELVIEW = new Matrix4fImpl();
-
-	private static final Matrix4f PROJECTION = new Matrix4fImpl();
-
-	private static final FloatBuffer TMP_F16 = BufferUtils
-			.createFloatBuffer(16);
-
-	/**
-	 * Used in {@link #screenToSurface(int, int, float, IFigure3D, Point) and
-	 * #worldToSurface(float, float, float, IFigure3D, Point).
-	 */
-	private static final Vector3fImpl TMP_V3 = new Vector3fImpl();
-
-	private static final Vector4f TMP_V4 = new Vector4fImpl();
-
-	private static final IntBuffer VIEWPORT = BufferUtils.createIntBuffer(16);
-
-	/**
-	 * Returns the world coordinates of a point given in figure-relative
-	 * coordinates.
-	 * 
-	 * @param i_fX
-	 *            the figure-relative X coordinate
-	 * @param i_fY
-	 *            the figure-relative Y coordinate
-	 * @param i_fZ
-	 *            the figure-relative Z coordinate
-	 * @param i_figure
-	 *            the reference figure
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the world coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Vector3f figureToWorld(float i_fX, float i_fY, float i_fZ,
-			IFigure3D i_figure, Vector3f io_result) {
-
-		if (i_figure == null)
-			throw new NullPointerException("i_figure must not be null");
-
-		if (io_result == null)
-			io_result = new Vector3fImpl();
-
-		IVector3f loc = i_figure.getLocation3D();
-
-		io_result.set(i_fX + loc.getX(), i_fY + loc.getY(), i_fZ + loc.getZ());
-		i_figure.transformToAbsolute(io_result);
-		return io_result;
-	}
-
-	/**
-	 * Converts the given screen coordinates to figure coordinates regarding the
-	 * given figure.
-	 * 
-	 * @param i_sX
-	 *            the X screen cordinate
-	 * @param i_sY
-	 *            the Y screen coordinate
-	 * @param i_d
-	 *            the depth value at the given screen coordinates, this value
-	 *            can be retrieved by calling
-	 *            {@link ColorPicker#getDepth(int, int)}
-	 * @param i_figure
-	 *            the figure to which the resulting coordinates should be
-	 *            relative to
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the figure coordinates of the given screen coordinates
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Vector3f screenToFigure(int i_sX, int i_sY, float i_d,
-			IFigure3D i_figure, Vector3f io_result) {
-
-		Graphics3D g3d = i_figure.getRenderContext().getGraphics3D();
-
-		screenToWorld(i_sX, i_sY, i_d, g3d, io_result);
-		return worldToFigure(io_result.getX(), io_result.getY(), io_result
-				.getZ(), i_figure, io_result);
-	}
-
-	/**
-	 * Returns the surface coordinates of a given point in screen coordinates
-	 * regarding the given figure.
-	 * 
-	 * @param i_sX
-	 *            the X screen coordinate
-	 * @param i_sY
-	 *            the Y screen coordinate
-	 * @param i_d
-	 *            the depth value
-	 * @param i_figure
-	 *            the figure that contains the surface
-	 * @param io_result
-	 *            the result point, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the screen coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Point screenToSurface(int i_sX, int i_sY, float i_d,
-			IFigure3D i_figure, Point io_result) {
-
-		Graphics3D g3d = i_figure.getRenderContext().getGraphics3D();
-
-		screenToWorld(i_sX, i_sY, i_d, g3d, TMP_V3);
-		return worldToSurface(TMP_V3.x, TMP_V3.y, TMP_V3.z, i_figure, io_result);
-	}
-
-	/**
-	 * Returns the surface coordinates of a point with the given screen
-	 * coordinates regarding the given figure. This method determines the
-	 * necessary depth value by querying the color picker of the given figure,
-	 * so it is assumed that the surface of the given figure is visible in the
-	 * current picking buffer and that it contains the given screen coordinates.
-	 * In other words, it is assumed that the surface of the given figure is hit
-	 * by the picking ray.
-	 * 
-	 * @param i_sX
-	 *            the X screen coordinate
-	 * @param i_sY
-	 *            the Y screen coordinate
-	 * @param i_figure
-	 *            the figure that contains the surface
-	 * @param io_result
-	 *            the result point, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the screen coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 * @throws IllegalArgumentException
-	 *             if no color picker can be retrieved from the given figure
-	 */
-	public static Point screenToSurface(int i_sX, int i_sY, IFigure3D i_figure,
-			Point io_result) {
-
-		if (i_figure == null)
-			throw new NullPointerException("i_figure must not be null");
-
-		UpdateManager updateManager = i_figure.getUpdateManager();
-		if (!(updateManager instanceof PickingUpdateManager3D))
-			throw new IllegalArgumentException(
-					"unable to get color picker from " + i_figure);
-
-		PickingUpdateManager3D pickingManager = (PickingUpdateManager3D) updateManager;
-		ColorPicker picker = pickingManager.getPicker();
-
-		float depth = picker.getDepth(i_sX, i_sY);
-		return screenToSurface(i_sX, i_sY, depth, i_figure, io_result);
-	}
-
-	/**
-	 * Converts the given screen coordinates to world coordinates using the
-	 * given depth value.
-	 * 
-	 * @param i_sX
-	 *            the X screen coordinate
-	 * @param i_sY
-	 *            the Y screen coordinate
-	 * @param i_d
-	 *            the depth value, this value can be retrieved by calling
-	 *            {@link ColorPicker#getDepth(int, int)}
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the world coordinates of the point specified by the given screen
-	 *         coordinates and depth
-	 */
-	public static Vector3f screenToWorld(int i_sX, int i_sY, float i_d,
-			Graphics3D i_graphics3D, Vector3f io_result) {
-
-		if (io_result == null)
-			io_result = new Vector3fImpl();
-
-		// invert viewport transformation
-		i_graphics3D.glGetInteger(Graphics3DDraw.GL_VIEWPORT, VIEWPORT);
-
-		int xv = VIEWPORT.get(0);
-		int yv = VIEWPORT.get(1);
-		float wv = VIEWPORT.get(2);
-		float hv = VIEWPORT.get(3);
-
-		float xd = 2 * (i_sX - xv) / wv - 1;
-		float yd = 1 - 2 * (i_sY - yv) / hv;
-		float zd = 2 * i_d - 1;
-
-		// normalized device coordinates
-		TMP_V4.set(xd, yd, zd, 1);
-
-		// invert modelview and projection transformations
-		i_graphics3D.glGetFloat(Graphics3DDraw.GL_PROJECTION_MATRIX, TMP_F16);
-		PROJECTION.setRowMajor(TMP_F16);
-
-		i_graphics3D.glGetFloat(Graphics3DDraw.GL_MODELVIEW_MATRIX, TMP_F16);
-		MODELVIEW.setRowMajor(TMP_F16);
-
-		Math3D.mul(PROJECTION, MODELVIEW, INVERSE);
-		Math3D.invert(INVERSE, INVERSE);
-
-		Math3D.transform(INVERSE, TMP_V4, TMP_V4);
-		io_result.setX(TMP_V4.getX() / TMP_V4.getW());
-		io_result.setY(TMP_V4.getY() / TMP_V4.getW());
-		io_result.setZ(TMP_V4.getZ() / TMP_V4.getW());
-
-		return io_result;
-	}
-
-	/**
-	 * Returns the world coordinates of a point on a given figure's front
-	 * surface, with the given distance to the surface.
-	 * 
-	 * @param i_sX
-	 *            the X surface coordinate
-	 * @param i_sY
-	 *            the Y surface coordinate
-	 * @param i_dist
-	 *            the distance of the resulting 3D location from the front
-	 *            surface
-	 * @param i_figure
-	 *            the figure that contains the surface
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the world coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Vector3f surfaceToWorld(int i_sX, int i_sY, float i_dist,
-			IFigure3D i_figure, Vector3f io_result) {
-
-		if (i_figure == null)
-			throw new NullPointerException("figure must not be null");
-
-		IVector3f size = i_figure.getSize3D();
-		return figureToWorld(i_sX, i_sY, i_dist + size.getZ(), i_figure,
-				io_result);
-	}
-
-	/**
-	 * Returns the world coordinates of a point on a given figure's front
-	 * surface. This is the same as calling
-	 * {@link #surfaceToWorld(int, int, float, IFigure3D, Vector3f)} with a
-	 * distance of 0.
-	 * 
-	 * @param i_sX
-	 *            the X surface coordinate
-	 * @param i_sY
-	 *            the Y surface coordinate
-	 * @param i_figure
-	 *            the figure that contains the surface
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the world coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Vector3f surfaceToWorld(int i_sX, int i_sY,
-			IFigure3D i_figure, Vector3f io_result) {
-
-		return surfaceToWorld(i_sX, i_sY, 0, i_figure, io_result);
-	}
-
-	/**
-	 * Returns the figure-relative coordinates of a given point in world
-	 * coordinates.
-	 * 
-	 * @param i_wX
-	 *            the X world coordinate
-	 * @param i_wY
-	 *            the Y world coordinate
-	 * @param i_wZ
-	 *            the Z world coordinate
-	 * @param i_figure
-	 *            the figure which the returned point should be relative to
-	 * @param io_result
-	 *            the result vector, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the figure-relative coordinates of the given point
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Vector3f worldToFigure(float i_wX, float i_wY, float i_wZ,
-			IFigure3D i_figure, Vector3f io_result) {
-
-		if (i_figure == null)
-			throw new NullPointerException("i_figure must not be null");
-
-		if (io_result == null)
-			io_result = new Vector3fImpl();
-
-		io_result.set(i_wX, i_wY, i_wZ);
-		i_figure.transformToRelative(io_result);
-
-		IVector3f loc = i_figure.getLocation3D();
-		io_result.set(io_result.getX() - loc.getX(), io_result.getY()
-				- loc.getY(), io_result.getZ() - loc.getZ());
-
-		return io_result;
-	}
-
-	/**
-	 * Returns the surface coordinates of a given point in world coordinates.
-	 * The surface point is specified by the intersection of a line that is
-	 * perpendicular to the figure's surface and that contains the given point.
-	 * 
-	 * @param i_wX
-	 *            the X world coordinate
-	 * @param i_wY
-	 *            the Y world coordinate
-	 * @param i_wZ
-	 *            the Z world coordinate
-	 * @param i_figure
-	 *            the figure that contains the surface to which the returned
-	 *            point should be relative
-	 * @param io_result
-	 *            the result point, if <code>null</code>, a new one will be
-	 *            created
-	 * @return the 2D surface coordinates on the figures surface
-	 * @throws NullPointerException
-	 *             if the given figure is <code>null</code>
-	 */
-	public static Point worldToSurface(float i_wX, float i_wY, float i_wZ,
-			IFigure3D i_figure, Point io_result) {
-
-		if (i_figure == null)
-			throw new NullPointerException("figure must not be null");
-
-		Point result = io_result;
-		if (result == null)
-			result = new Point();
-
-		worldToFigure(i_wX, i_wY, i_wZ, i_figure, TMP_V3);
-		result.x = Math.round(TMP_V3.x);
-		result.y = Math.round(TMP_V3.y);
-
-		return result;
-	}
-
-	private CoordinateConverter() {
-
-		// empty constructor
-	}
-}
\ No newline at end of file