Fix line delimiters.
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/.classpath b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/.classpath
index 2d1a430..64c5e31 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/.classpath
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.html b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.html
index 65d4bc2..36d90ec 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.html
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>October 5, 2009</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 5, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
</html>
\ No newline at end of file
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.properties b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.properties
index de0493b..3620289 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.properties
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/about.properties
@@ -1,29 +1,29 @@
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-
-featureText=AMP Agent 3D Graphics Framework x(AGF3D) (Incubation)\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Metascape LLC and others. 2009. All rights reserved.\n\
-\n\
-Agent Graphics Framework and Escape support for 3D Graphics using GEF3D. Currently supports 2D spaces only using 2 1/2 D. Requires LWJGL plugin at http://lwjgl.org/update.\n\
-\n\
-Visit http://www.eclipse.org/amp
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+featureText=AMP Agent 3D Graphics Framework x(AGF3D) (Incubation)\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Metascape LLC and others. 2009. All rights reserved.\n\
+\n\
+Agent Graphics Framework and Escape support for 3D Graphics using GEF3D. Currently supports 2D spaces only using 2 1/2 D. Requires LWJGL plugin at http://lwjgl.org/update.\n\
+\n\
+Visit http://www.eclipse.org/amp
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/plugin.properties b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/plugin.properties
index 0c5d87b..67dd151 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/plugin.properties
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/plugin.properties
@@ -1,32 +1,32 @@
-# /**
-# * <copyright>
-# *
-# * Copyright (c) 2009 Metascape, LLC.
-# * 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:
-# * Metascape - Initial API and Implementation
-# *
-# * </copyright>
-# *
-# * $Id: plugin.properties
-# */
-
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Agent Graphics Framework GEF 3D Support (Incubation)
-providerName = Eclipse Agent Modeling Platform
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2009 Metascape, LLC.
+# * 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:
+# * Metascape - Initial API and Implementation
+# *
+# * </copyright>
+# *
+# * $Id: plugin.properties
+# */
+
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = Agent Graphics Framework GEF 3D Support (Incubation)
+providerName = Eclipse Agent Modeling Platform
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/CompositeRenderShape.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/CompositeRenderShape.java
index 6b03914..d085066 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/CompositeRenderShape.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/CompositeRenderShape.java
@@ -1,84 +1,84 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.RenderContext;
-import org.eclipse.draw3d.shapes.CuboidShape;
-import org.eclipse.draw3d.shapes.CylinderShape;
-import org.eclipse.draw3d.shapes.PositionableShape;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Adapated from org.eclipse.draw3d.shapes.CubiodShape
- *
- * @author mparker
- * @author Kristian Duske
- *
- */
-public class CompositeRenderShape extends RenderShape {
-
- private List<PositionableShape> shapes = new ArrayList<PositionableShape>();
-
- IColorProvider colorProvider;
-
- /**
- * @param figure
- * @param renderer
- * @param object
- */
- public CompositeRenderShape(IFigure3D figure, Object object, IColorProvider colorProvider) {
- super(figure, null, object);
- this.colorProvider = colorProvider;
- }
-
- public void addShape(PositionableShape shape) {
- shapes.add(shape);
- }
-
- /**
- * @param iRenderContext
- * @see org.eclipse.amp.agf3d.RenderShape#doRender(org.eclipse.draw3d.RenderContext)
- */
- protected void doRender(RenderContext context) {
- Color colorForAll = null;
- if (colorProvider != null) {
- colorForAll = colorProvider.getBackground(getModel());
- } else {
- colorForAll = figure.getBackgroundColor();
- }
- for (PositionableShape shape : shapes) {
- if (shape instanceof CylinderShape) {
- ((CylinderShape) shape).setFillColor(colorForAll);
- } else if (shape instanceof CuboidShape) {
- ((CuboidShape) shape).setFillColor(colorForAll);
- }
- shape.render(context);
- }
- }
-
- /**
- * @return the shapes
- */
- public List<PositionableShape> getShapes() {
- return shapes;
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.RenderContext;
+import org.eclipse.draw3d.shapes.CuboidShape;
+import org.eclipse.draw3d.shapes.CylinderShape;
+import org.eclipse.draw3d.shapes.PositionableShape;
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Adapated from org.eclipse.draw3d.shapes.CubiodShape
+ *
+ * @author mparker
+ * @author Kristian Duske
+ *
+ */
+public class CompositeRenderShape extends RenderShape {
+
+ private List<PositionableShape> shapes = new ArrayList<PositionableShape>();
+
+ IColorProvider colorProvider;
+
+ /**
+ * @param figure
+ * @param renderer
+ * @param object
+ */
+ public CompositeRenderShape(IFigure3D figure, Object object, IColorProvider colorProvider) {
+ super(figure, null, object);
+ this.colorProvider = colorProvider;
+ }
+
+ public void addShape(PositionableShape shape) {
+ shapes.add(shape);
+ }
+
+ /**
+ * @param iRenderContext
+ * @see org.eclipse.amp.agf3d.RenderShape#doRender(org.eclipse.draw3d.RenderContext)
+ */
+ protected void doRender(RenderContext context) {
+ Color colorForAll = null;
+ if (colorProvider != null) {
+ colorForAll = colorProvider.getBackground(getModel());
+ } else {
+ colorForAll = figure.getBackgroundColor();
+ }
+ for (PositionableShape shape : shapes) {
+ if (shape instanceof CylinderShape) {
+ ((CylinderShape) shape).setFillColor(colorForAll);
+ } else if (shape instanceof CuboidShape) {
+ ((CuboidShape) shape).setFillColor(colorForAll);
+ }
+ shape.render(context);
+ }
+ }
+
+ /**
+ * @return the shapes
+ */
+ public List<PositionableShape> getShapes() {
+ return shapes;
+ }
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IColorProviderFactory.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IColorProviderFactory.java
index 9357084..9e0e20e 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IColorProviderFactory.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IColorProviderFactory.java
@@ -1,29 +1,29 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.jface.viewers.IColorProvider;
-
-/**
- *
- * @author mparker
- *
- */
-public interface IColorProviderFactory {
-
- IColorProvider getColorProvider(Object object);
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.jface.viewers.IColorProvider;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public interface IColorProviderFactory {
+
+ IColorProvider getColorProvider(Object object);
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IGraphics3DAdapted.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IGraphics3DAdapted.java
index 07fdc72..832c387 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IGraphics3DAdapted.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IGraphics3DAdapted.java
@@ -1,6 +1,6 @@
-package org.eclipse.amp.agf3d;
-
-
-public interface IGraphics3DAdapted {
- IGraphics3DAdapter getGraphics3DAdapter();
-}
+package org.eclipse.amp.agf3d;
+
+
+public interface IGraphics3DAdapted {
+ IGraphics3DAdapter getGraphics3DAdapter();
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IModel3DFactoryProvider.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IModel3DFactoryProvider.java
index 529a6ce..ed8fa42 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IModel3DFactoryProvider.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IModel3DFactoryProvider.java
@@ -13,11 +13,11 @@
* </copyright>
*
*/
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.gef.EditPartFactory;
-
-public interface IModel3DFactoryProvider {
- EditPartFactory getEditPart3DFactory(Object model);
+package org.eclipse.amp.agf3d;
-}
+import org.eclipse.gef.EditPartFactory;
+
+public interface IModel3DFactoryProvider {
+ EditPartFactory getEditPart3DFactory(Object model);
+
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IRenderer.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IRenderer.java
index 4350d64..cdf2ecf 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IRenderer.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IRenderer.java
@@ -1,30 +1,30 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.RenderContext;
-
-/**
- *
- * @author mparker
- *
- */
-public interface IRenderer {
-
- void renderShape(IFigure3D figure, RenderContext context, Object object);
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.RenderContext;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public interface IRenderer {
+
+ void renderShape(IFigure3D figure, RenderContext context, Object object);
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IShape3DProvider.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IShape3DProvider.java
index 92f85d5..2accaea 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IShape3DProvider.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/IShape3DProvider.java
@@ -1,42 +1,42 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.geometry.IVector3f;
-import org.eclipse.draw3d.shapes.Shape;
-
-/**
- *
- * @author mparker
- *
- */
-public interface IShape3DProvider {
- public Shape getShape3D(Object object, IFigure3D figure);
-
- /**
- * @param object
- * @return
- */
- IVector3f getSize3D(Object object);
-
- /**
- * @param object
- * @return
- */
- IVector3f getRelativeLocation3D(Object object);
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.geometry.IVector3f;
+import org.eclipse.draw3d.shapes.Shape;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public interface IShape3DProvider {
+ public Shape getShape3D(Object object, IFigure3D figure);
+
+ /**
+ * @param object
+ * @return
+ */
+ IVector3f getSize3D(Object object);
+
+ /**
+ * @param object
+ * @return
+ */
+ IVector3f getRelativeLocation3D(Object object);
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderShape.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderShape.java
index 65304f8..3799ae6 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderShape.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderShape.java
@@ -1,151 +1,151 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.RenderContext;
-import org.eclipse.draw3d.graphics3d.Graphics3D;
-import org.eclipse.draw3d.shapes.CuboidShape;
-import org.eclipse.draw3d.util.ColorConverter;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Adapated from org.eclipse.draw3d.shapes.CubiodShape
- *
- * @author mparker
- * @author Kristian Duske
- *
- */
-public class RenderShape extends CuboidShape {
-
- public static final int SCALE = 20;
- private static final float[] DEFAULT_COLOR = new float[] { 0, 0, 0, 1 };
- private final float[] m_color = new float[] { DEFAULT_COLOR[0], DEFAULT_COLOR[1], DEFAULT_COLOR[2],
- DEFAULT_COLOR[3] };
-
- boolean update = true;
-
- IFigure3D figure;
- private final IRenderer renderer;
- private final Object object;
-
- // private CuboidShape shape;
-
- public RenderShape(IFigure3D figure, final IRenderer renderer, final Object object) {
- super(figure.getPosition3D(), false);
- this.figure = figure;
- // shape = new CuboidShape(figure.getPosition3D(), false) {
- // /**
- // * @param iRenderContext
- // * @see org.eclipse.draw3d.shapes.CuboidShape#doRender(org.eclipse.draw3d.RenderContext)
- // */
- // protected void doRender(RenderContext iRenderContext) {
- // renderer.renderShape(iRenderContext.getGraphics3D(), object);
- // }
- // };
- this.renderer = renderer;
- this.object = object;
- }
-
- /**
- * @param iRenderContext
- * @see org.eclipse.draw3d.shapes.CuboidShape#doRender(org.eclipse.draw3d.RenderContext)
- */
- protected void doRender(RenderContext iRenderContext) {
- renderer.renderShape(figure, iRenderContext, object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "CuboidFigureShape [m_figure=" + figure + "]";
- }
-
- /**
- * Sets the color of this cube.
- *
- * @param i_color the color
- * @param i_alpha the alpha value
- *
- * @throws NullPointerException if the given color is <code>null</code>
- */
- public void setColor(Color i_color, int i_alpha) {
-
- if (i_color == null) {
- throw new NullPointerException("i_color must not be null");
- }
-
- ColorConverter.toFloatArray(i_color, i_alpha, m_color);
- }
-
- /**
- * Sets the color of the given face.
- *
- * @param i_color the color as an int value (fomat 0x00BBGGRR)
- * @param i_alpha the alpha value
- */
- public void setColor(int i_color, int i_alpha) {
-
- ColorConverter.toFloatArray(i_color, i_alpha, m_color);
- }
-
- /**
- * Gl set color.
- *
- * @param g3d the g3d
- */
- private void glSetColor(Graphics3D g3d) {
-
- float r = m_color[0];
- float g = m_color[1];
- float b = m_color[2];
- float a = m_color[3];
-
- g3d.glColor4f(r, g, b, a);
- }
-
- /**
- * Gl set color.
- *
- * @param g3d the g3d
- */
- public void glSetColor(Graphics3D g3d, Color i_color) {
- setColor(i_color, 255);
- glSetColor(g3d);
- }
-
- /**
- * Gl set color.
- *
- * @param g3d the g3d
- */
- public void glSetColor(Graphics3D g3d, Color i_color, int alpha) {
- setColor(i_color, alpha);
- glSetColor(g3d);
- }
-
- /**
- * @return the object
- */
- public Object getModel() {
- return object;
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.RenderContext;
+import org.eclipse.draw3d.graphics3d.Graphics3D;
+import org.eclipse.draw3d.shapes.CuboidShape;
+import org.eclipse.draw3d.util.ColorConverter;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Adapated from org.eclipse.draw3d.shapes.CubiodShape
+ *
+ * @author mparker
+ * @author Kristian Duske
+ *
+ */
+public class RenderShape extends CuboidShape {
+
+ public static final int SCALE = 20;
+ private static final float[] DEFAULT_COLOR = new float[] { 0, 0, 0, 1 };
+ private final float[] m_color = new float[] { DEFAULT_COLOR[0], DEFAULT_COLOR[1], DEFAULT_COLOR[2],
+ DEFAULT_COLOR[3] };
+
+ boolean update = true;
+
+ IFigure3D figure;
+ private final IRenderer renderer;
+ private final Object object;
+
+ // private CuboidShape shape;
+
+ public RenderShape(IFigure3D figure, final IRenderer renderer, final Object object) {
+ super(figure.getPosition3D(), false);
+ this.figure = figure;
+ // shape = new CuboidShape(figure.getPosition3D(), false) {
+ // /**
+ // * @param iRenderContext
+ // * @see org.eclipse.draw3d.shapes.CuboidShape#doRender(org.eclipse.draw3d.RenderContext)
+ // */
+ // protected void doRender(RenderContext iRenderContext) {
+ // renderer.renderShape(iRenderContext.getGraphics3D(), object);
+ // }
+ // };
+ this.renderer = renderer;
+ this.object = object;
+ }
+
+ /**
+ * @param iRenderContext
+ * @see org.eclipse.draw3d.shapes.CuboidShape#doRender(org.eclipse.draw3d.RenderContext)
+ */
+ protected void doRender(RenderContext iRenderContext) {
+ renderer.renderShape(figure, iRenderContext, object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "CuboidFigureShape [m_figure=" + figure + "]";
+ }
+
+ /**
+ * Sets the color of this cube.
+ *
+ * @param i_color the color
+ * @param i_alpha the alpha value
+ *
+ * @throws NullPointerException if the given color is <code>null</code>
+ */
+ public void setColor(Color i_color, int i_alpha) {
+
+ if (i_color == null) {
+ throw new NullPointerException("i_color must not be null");
+ }
+
+ ColorConverter.toFloatArray(i_color, i_alpha, m_color);
+ }
+
+ /**
+ * Sets the color of the given face.
+ *
+ * @param i_color the color as an int value (fomat 0x00BBGGRR)
+ * @param i_alpha the alpha value
+ */
+ public void setColor(int i_color, int i_alpha) {
+
+ ColorConverter.toFloatArray(i_color, i_alpha, m_color);
+ }
+
+ /**
+ * Gl set color.
+ *
+ * @param g3d the g3d
+ */
+ private void glSetColor(Graphics3D g3d) {
+
+ float r = m_color[0];
+ float g = m_color[1];
+ float b = m_color[2];
+ float a = m_color[3];
+
+ g3d.glColor4f(r, g, b, a);
+ }
+
+ /**
+ * Gl set color.
+ *
+ * @param g3d the g3d
+ */
+ public void glSetColor(Graphics3D g3d, Color i_color) {
+ setColor(i_color, 255);
+ glSetColor(g3d);
+ }
+
+ /**
+ * Gl set color.
+ *
+ * @param g3d the g3d
+ */
+ public void glSetColor(Graphics3D g3d, Color i_color, int alpha) {
+ setColor(i_color, alpha);
+ glSetColor(g3d);
+ }
+
+ /**
+ * @return the object
+ */
+ public Object getModel() {
+ return object;
+ }
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderingShapeProvider.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderingShapeProvider.java
index ac12869..7ddc93f 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderingShapeProvider.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/RenderingShapeProvider.java
@@ -1,60 +1,60 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.amp.agf.gef.GenericEditPart;
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.geometry.IVector3f;
-import org.eclipse.draw3d.geometry.Vector3fImpl;
-import org.eclipse.draw3d.shapes.Shape;
-
-/**
- *
- * @author mparker
- *
- */
-public class RenderingShapeProvider implements IShape3DProvider {
-
- IRenderer renderer;
-
- public RenderingShapeProvider(IRenderer renderer) {
- super();
- this.renderer = renderer;
- }
-
- /**
- * @param object
- * @param figure
- * @return
- * @see org.eclipse.amp.agf3d.IShape3DProvider#getShape3D(java.lang.Object, IFigure3D)
- */
- public Shape getShape3D(Object object, IFigure3D figure) {
- return new RenderShape(figure, renderer, object);
- }
-
- public IVector3f getSize3D(Object object) {
- return new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, GenericEditPart.SCALE);
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- return new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, 0);
- }
-
- public static IShape3DProvider createProvider(IRenderer renderer) {
- return new RenderingShapeProvider(renderer);
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.amp.agf.gef.GenericEditPart;
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.geometry.IVector3f;
+import org.eclipse.draw3d.geometry.Vector3fImpl;
+import org.eclipse.draw3d.shapes.Shape;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public class RenderingShapeProvider implements IShape3DProvider {
+
+ IRenderer renderer;
+
+ public RenderingShapeProvider(IRenderer renderer) {
+ super();
+ this.renderer = renderer;
+ }
+
+ /**
+ * @param object
+ * @param figure
+ * @return
+ * @see org.eclipse.amp.agf3d.IShape3DProvider#getShape3D(java.lang.Object, IFigure3D)
+ */
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ return new RenderShape(figure, renderer, object);
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, GenericEditPart.SCALE);
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ return new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, 0);
+ }
+
+ public static IShape3DProvider createProvider(IRenderer renderer) {
+ return new RenderingShapeProvider(renderer);
+ }
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/ScapeEditRoot3DPart.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/ScapeEditRoot3DPart.java
index c8d5936..a26480a 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/ScapeEditRoot3DPart.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/ScapeEditRoot3DPart.java
@@ -1,133 +1,133 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import java.util.List;
-
-import org.eclipse.amp.agf.gef.GEFUtils;
-import org.eclipse.amp.agf.gef.ScapeEditPart;
-import org.eclipse.amp.axf.core.ICompositionProvider;
-import org.eclipse.amp.axf.space.ILocation;
-import org.eclipse.amp.axf.space.ILocation2D;
-import org.eclipse.amp.axf.space.ILocationProvider;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.XYLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.draw3d.Figure3D;
-import org.eclipse.draw3d.FigureSurface;
-import org.eclipse.draw3d.ISurface;
-import org.eclipse.gef.EditPart;
-import org.eclipse.jface.viewers.IFilter;
-
-/**
- *
- * @author mparker
- *
- */
-public class ScapeEditRoot3DPart extends ScapeEdit3DPart {
-
- public static final int DEFAULT_ANIMATION_STEP_COUNT = 5;
-
- private int animationStep;
-
- private int animationStepCount = DEFAULT_ANIMATION_STEP_COUNT;
-
- public ScapeEditRoot3DPart(ICompositionProvider memberProvider, ILocationProvider locationProvider, IFilter filter) {
- super(memberProvider, locationProvider, filter);
- }
-
- /**
- * @return
- * @see org.eclipse.amp.agf3d.ScapeEdit3DPart#createFigure()
- */
- protected IFigure createFigure() {
- figure = new Figure3D() {
- private ISurface m_surface = new FigureSurface(this);
-
- @Override
- public ISurface getSurface() {
- return m_surface;
- }
-
- };
- // SurfaceLayout.setDelegate((IFigure3D) figure, new FreeformLayout());
- figure.setLayoutManager(new XYLayout());
- Rectangle bounds = new Rectangle(new Point(0, 0), calculateDimension());
- figure.setBounds(bounds);
- return figure;
- }
-
- // This is just a hack to prevent having to rearrange scape wrapper
- public Dimension calculateDimension() {
- ILocation extent = getLocationProvider().getExtent(getModelRoot());
- if (extent instanceof ILocation2D) {
- return GEFUtils.toScaledDimension((ILocation2D) extent);
- }
- return null;
- }
-
- /**
- * @return
- * @see org.eclipse.gef.editparts.AbstractEditPart#getModelChildren()
- */
- protected List getModelChildren() {
- return getMemberProvider().getList(getModel());
- }
-
- /**
- * @param child
- * @param index
- * @see org.eclipse.gef.editparts.AbstractEditPart#addChild(org.eclipse.gef.EditPart, int)
- */
- protected void addChild(EditPart child, int index) {
- super.addChild(child, index);
- }
-
- /**
- * @return
- * @see org.eclipse.amp.agf.gef.ScapeEditPart#getRootScapeEditPart()
- */
- public ScapeEditPart getRootScapeEditPart() {
- return this;
- }
-
- /**
- * @return the animationStep
- */
- public int getAnimationStep() {
- return animationStep;
- }
-
- /**
- * @return the animationStepCount
- */
- public int getAnimationStepCount() {
- return animationStepCount;
- }
-
- public int setAnimationStep(int animationStep) {
- this.animationStep = animationStep;
- return animationStep;
- }
-
- public void setAnimationStepCount(int animationStepCount) {
- this.animationStepCount = animationStepCount;
- this.animationStep = 0;
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import java.util.List;
+
+import org.eclipse.amp.agf.gef.GEFUtils;
+import org.eclipse.amp.agf.gef.ScapeEditPart;
+import org.eclipse.amp.axf.core.ICompositionProvider;
+import org.eclipse.amp.axf.space.ILocation;
+import org.eclipse.amp.axf.space.ILocation2D;
+import org.eclipse.amp.axf.space.ILocationProvider;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.draw3d.Figure3D;
+import org.eclipse.draw3d.FigureSurface;
+import org.eclipse.draw3d.ISurface;
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.IFilter;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public class ScapeEditRoot3DPart extends ScapeEdit3DPart {
+
+ public static final int DEFAULT_ANIMATION_STEP_COUNT = 5;
+
+ private int animationStep;
+
+ private int animationStepCount = DEFAULT_ANIMATION_STEP_COUNT;
+
+ public ScapeEditRoot3DPart(ICompositionProvider memberProvider, ILocationProvider locationProvider, IFilter filter) {
+ super(memberProvider, locationProvider, filter);
+ }
+
+ /**
+ * @return
+ * @see org.eclipse.amp.agf3d.ScapeEdit3DPart#createFigure()
+ */
+ protected IFigure createFigure() {
+ figure = new Figure3D() {
+ private ISurface m_surface = new FigureSurface(this);
+
+ @Override
+ public ISurface getSurface() {
+ return m_surface;
+ }
+
+ };
+ // SurfaceLayout.setDelegate((IFigure3D) figure, new FreeformLayout());
+ figure.setLayoutManager(new XYLayout());
+ Rectangle bounds = new Rectangle(new Point(0, 0), calculateDimension());
+ figure.setBounds(bounds);
+ return figure;
+ }
+
+ // This is just a hack to prevent having to rearrange scape wrapper
+ public Dimension calculateDimension() {
+ ILocation extent = getLocationProvider().getExtent(getModelRoot());
+ if (extent instanceof ILocation2D) {
+ return GEFUtils.toScaledDimension((ILocation2D) extent);
+ }
+ return null;
+ }
+
+ /**
+ * @return
+ * @see org.eclipse.gef.editparts.AbstractEditPart#getModelChildren()
+ */
+ protected List getModelChildren() {
+ return getMemberProvider().getList(getModel());
+ }
+
+ /**
+ * @param child
+ * @param index
+ * @see org.eclipse.gef.editparts.AbstractEditPart#addChild(org.eclipse.gef.EditPart, int)
+ */
+ protected void addChild(EditPart child, int index) {
+ super.addChild(child, index);
+ }
+
+ /**
+ * @return
+ * @see org.eclipse.amp.agf.gef.ScapeEditPart#getRootScapeEditPart()
+ */
+ public ScapeEditPart getRootScapeEditPart() {
+ return this;
+ }
+
+ /**
+ * @return the animationStep
+ */
+ public int getAnimationStep() {
+ return animationStep;
+ }
+
+ /**
+ * @return the animationStepCount
+ */
+ public int getAnimationStepCount() {
+ return animationStepCount;
+ }
+
+ public int setAnimationStep(int animationStep) {
+ this.animationStep = animationStep;
+ return animationStep;
+ }
+
+ public void setAnimationStepCount(int animationStepCount) {
+ this.animationStepCount = animationStepCount;
+ this.animationStep = 0;
+ }
+}
diff --git a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/Shapes3D.java b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/Shapes3D.java
index 276783f..fbde387 100644
--- a/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/Shapes3D.java
+++ b/org.eclipse.amp.agf/plugins/org.eclipse.amp.agf3d/src/org/eclipse/amp/agf3d/Shapes3D.java
@@ -1,226 +1,226 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2009 Metascape, LLC.
- * 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:
- * Metascape - Initial API and Implementation
- *
- * </copyright>
- *
- */
-
-package org.eclipse.amp.agf3d;
-
-import org.eclipse.amp.agf.gef.GenericEditPart;
-import org.eclipse.draw3d.IFigure3D;
-import org.eclipse.draw3d.geometry.IVector3f;
-import org.eclipse.draw3d.geometry.Position3D;
-import org.eclipse.draw3d.geometry.Position3DUtil;
-import org.eclipse.draw3d.geometry.Vector3fImpl;
-import org.eclipse.draw3d.shapes.CuboidFigureShape;
-import org.eclipse.draw3d.shapes.CuboidShape;
-import org.eclipse.draw3d.shapes.CylinderShape;
-import org.eclipse.draw3d.shapes.CylindricFigureShape;
-import org.eclipse.draw3d.shapes.PositionableShape;
-import org.eclipse.draw3d.shapes.Shape;
-import org.eclipse.draw3d.shapes.SphereFigureShape;
-
-/**
- *
- * @author mparker
- *
- */
-public class Shapes3D {
-
- private static final Vector3fImpl ORIGIN = new Vector3fImpl(0.0f, 0.0f, 0.0f);
-
- private static final Vector3fImpl FLAT_SIZE = new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, 0.0f);
-
- private static final Vector3fImpl NINETYPCT_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
- GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .9f);
-
- private static final Vector3fImpl DISC_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
- GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .20f);
-
- private static final Vector3fImpl CYLINDER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
- GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .80f);
-
- private static final Vector3fImpl TWENTIETH_IN = new Vector3fImpl(GenericEditPart.SCALE * .05f,
- GenericEditPart.SCALE * .05f, 0);
-
- private static final Vector3fImpl EIGHTH_IN = new Vector3fImpl(GenericEditPart.SCALE * .125f,
- GenericEditPart.SCALE * .125f, 0);
-
- private static final Vector3fImpl THREE_EIGHTS_IN = new Vector3fImpl(GenericEditPart.SCALE * .375f,
- GenericEditPart.SCALE * .3755f, 0);
-
- private static final Vector3fImpl THREE_QUARTER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .75f,
- GenericEditPart.SCALE * .75f, GenericEditPart.SCALE * .75f);
-
- private static final Vector3fImpl FULL_SIZE = new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE,
- GenericEditPart.SCALE);
-
- private static final Vector3fImpl HALF_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .5f,
- GenericEditPart.SCALE * .5f, GenericEditPart.SCALE * .5f);
-
- private static final Vector3fImpl QUARTER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .25f,
- GenericEditPart.SCALE * .25f, GenericEditPart.SCALE * .25f);
-
- public enum ShapeType {
- CUBE, TILE, SPHERE, CYLINDER
- };
-
- public static IShape3DProvider CUBE_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- return new CuboidFigureShape(figure, true);
- }
-
- public IVector3f getSize3D(Object object) {
- return THREE_QUARTER_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- return EIGHTH_IN;
- }
- };
-
- public static IShape3DProvider CYLINDER_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- return new CylindricFigureShape(figure, 30, 1.0f, true);
- }
-
- public IVector3f getSize3D(Object object) {
- return CYLINDER_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- // "checker"
- return TWENTIETH_IN;
- }
- };
- public static IShape3DProvider DISC_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- CylindricFigureShape cylindricFigureShape = new CylindricFigureShape(figure, 30, 1.0f, true);
- cylindricFigureShape.setFill(true);
- return cylindricFigureShape;
- }
-
- public IVector3f getSize3D(Object object) {
- return DISC_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- // "checker"
- return TWENTIETH_IN;
- }
- };
- public static IShape3DProvider SMALL_DISC_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- CylindricFigureShape cylindricFigureShape = new CylindricFigureShape(figure, 30, 1.0f, true);
- cylindricFigureShape.setFill(true);
- return cylindricFigureShape;
- }
-
- public IVector3f getSize3D(Object object) {
- return QUARTER_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- // "checker"
- return THREE_EIGHTS_IN;
- }
- };
- public static IShape3DProvider SPHERE_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- return new SphereFigureShape(figure, 3);
- }
-
- public IVector3f getSize3D(Object object) {
- return NINETYPCT_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- return TWENTIETH_IN;
- }
- };
- public static IShape3DProvider TILE_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- return new CuboidFigureShape(figure);
- }
-
- public IVector3f getSize3D(Object object) {
- return FLAT_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- return ORIGIN;
- }
- };
- public static IShape3DProvider HUMAN_SHAPE_PROVIDER = new IShape3DProvider() {
- public Shape getShape3D(Object object, IFigure3D figure) {
- CompositeRenderShape shape = new CompositeRenderShape(figure, object, null);
-
- float scale = 1.0f;
-
- float bodyWidth = 0.4f * scale;
- float bodyDepth = 0.3f * scale;
- float bodyHeight = 0.4f * scale;
- float legWidth = 0.1f * scale;
- float legHeight = 0.6f * scale;
- float headWidth = 0.3f * scale;
- float headHeight = 0.2f * scale;
-
- // legs
- shape.addShape(createCylinder(legHeight, new Vector3fImpl(legWidth, legWidth, legHeight), new Vector3fImpl(
- 0.5f - 1.5f * legWidth, 0.5f - .5f * legWidth, 0)));
-
- // legs
- shape.addShape(createCylinder(legHeight, new Vector3fImpl(legWidth, legWidth, legHeight), new Vector3fImpl(
- 0.5f + .5f * legWidth, 0.5f - .5f * legWidth, 0)));
- // body
- shape.addShape(createCube(bodyHeight + legHeight, new Vector3fImpl(bodyWidth, bodyDepth, bodyHeight),
- new Vector3fImpl((1.0f - bodyWidth) / 2.0f, (1.0f - bodyDepth) / 2.0f,
- legHeight)));
-
- // head
- shape.addShape(createCylinder(headHeight, new Vector3fImpl(headWidth, headWidth, headHeight),
- new Vector3fImpl(0.5f - .5f * headWidth, 0.5f - .5f * headWidth,
- (legHeight + bodyHeight))));
- return shape;
- }
-
- public IVector3f getSize3D(Object object) {
- return FULL_SIZE;
- }
-
- public IVector3f getRelativeLocation3D(Object object) {
- return ORIGIN;
- }
- };
-
- protected static PositionableShape createCylinder(float headHeight, IVector3f size, IVector3f location) {
- Position3D p3 = Position3DUtil.createAbsolutePosition();
- p3.setCenter3D(new Vector3fImpl(location.getX(), location.getY(), location.getZ()));
- p3.setSize3D(size);
- CylinderShape shape = new CylinderShape(p3, 30, 1.0f, true);
- shape.setFill(true);
- shape.setOutline(true);
- return shape;
- }
-
- protected static PositionableShape createCube(float headHeight, IVector3f size, IVector3f location) {
- Position3D p3 = Position3DUtil.createAbsolutePosition();
- p3.setCenter3D(new Vector3fImpl(location.getX(), location.getY(), location.getZ()));
- p3.setSize3D(size);
- CuboidShape shape = new CuboidShape(p3, true);
- shape.setFill(true);
- shape.setOutline(true);
- return shape;
- }
-
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ * Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.agf3d;
+
+import org.eclipse.amp.agf.gef.GenericEditPart;
+import org.eclipse.draw3d.IFigure3D;
+import org.eclipse.draw3d.geometry.IVector3f;
+import org.eclipse.draw3d.geometry.Position3D;
+import org.eclipse.draw3d.geometry.Position3DUtil;
+import org.eclipse.draw3d.geometry.Vector3fImpl;
+import org.eclipse.draw3d.shapes.CuboidFigureShape;
+import org.eclipse.draw3d.shapes.CuboidShape;
+import org.eclipse.draw3d.shapes.CylinderShape;
+import org.eclipse.draw3d.shapes.CylindricFigureShape;
+import org.eclipse.draw3d.shapes.PositionableShape;
+import org.eclipse.draw3d.shapes.Shape;
+import org.eclipse.draw3d.shapes.SphereFigureShape;
+
+/**
+ *
+ * @author mparker
+ *
+ */
+public class Shapes3D {
+
+ private static final Vector3fImpl ORIGIN = new Vector3fImpl(0.0f, 0.0f, 0.0f);
+
+ private static final Vector3fImpl FLAT_SIZE = new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE, 0.0f);
+
+ private static final Vector3fImpl NINETYPCT_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
+ GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .9f);
+
+ private static final Vector3fImpl DISC_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
+ GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .20f);
+
+ private static final Vector3fImpl CYLINDER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .9f,
+ GenericEditPart.SCALE * .9f, GenericEditPart.SCALE * .80f);
+
+ private static final Vector3fImpl TWENTIETH_IN = new Vector3fImpl(GenericEditPart.SCALE * .05f,
+ GenericEditPart.SCALE * .05f, 0);
+
+ private static final Vector3fImpl EIGHTH_IN = new Vector3fImpl(GenericEditPart.SCALE * .125f,
+ GenericEditPart.SCALE * .125f, 0);
+
+ private static final Vector3fImpl THREE_EIGHTS_IN = new Vector3fImpl(GenericEditPart.SCALE * .375f,
+ GenericEditPart.SCALE * .3755f, 0);
+
+ private static final Vector3fImpl THREE_QUARTER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .75f,
+ GenericEditPart.SCALE * .75f, GenericEditPart.SCALE * .75f);
+
+ private static final Vector3fImpl FULL_SIZE = new Vector3fImpl(GenericEditPart.SCALE, GenericEditPart.SCALE,
+ GenericEditPart.SCALE);
+
+ private static final Vector3fImpl HALF_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .5f,
+ GenericEditPart.SCALE * .5f, GenericEditPart.SCALE * .5f);
+
+ private static final Vector3fImpl QUARTER_SIZE = new Vector3fImpl(GenericEditPart.SCALE * .25f,
+ GenericEditPart.SCALE * .25f, GenericEditPart.SCALE * .25f);
+
+ public enum ShapeType {
+ CUBE, TILE, SPHERE, CYLINDER
+ };
+
+ public static IShape3DProvider CUBE_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ return new CuboidFigureShape(figure, true);
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return THREE_QUARTER_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ return EIGHTH_IN;
+ }
+ };
+
+ public static IShape3DProvider CYLINDER_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ return new CylindricFigureShape(figure, 30, 1.0f, true);
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return CYLINDER_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ // "checker"
+ return TWENTIETH_IN;
+ }
+ };
+ public static IShape3DProvider DISC_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ CylindricFigureShape cylindricFigureShape = new CylindricFigureShape(figure, 30, 1.0f, true);
+ cylindricFigureShape.setFill(true);
+ return cylindricFigureShape;
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return DISC_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ // "checker"
+ return TWENTIETH_IN;
+ }
+ };
+ public static IShape3DProvider SMALL_DISC_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ CylindricFigureShape cylindricFigureShape = new CylindricFigureShape(figure, 30, 1.0f, true);
+ cylindricFigureShape.setFill(true);
+ return cylindricFigureShape;
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return QUARTER_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ // "checker"
+ return THREE_EIGHTS_IN;
+ }
+ };
+ public static IShape3DProvider SPHERE_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ return new SphereFigureShape(figure, 3);
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return NINETYPCT_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ return TWENTIETH_IN;
+ }
+ };
+ public static IShape3DProvider TILE_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ return new CuboidFigureShape(figure);
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return FLAT_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ return ORIGIN;
+ }
+ };
+ public static IShape3DProvider HUMAN_SHAPE_PROVIDER = new IShape3DProvider() {
+ public Shape getShape3D(Object object, IFigure3D figure) {
+ CompositeRenderShape shape = new CompositeRenderShape(figure, object, null);
+
+ float scale = 1.0f;
+
+ float bodyWidth = 0.4f * scale;
+ float bodyDepth = 0.3f * scale;
+ float bodyHeight = 0.4f * scale;
+ float legWidth = 0.1f * scale;
+ float legHeight = 0.6f * scale;
+ float headWidth = 0.3f * scale;
+ float headHeight = 0.2f * scale;
+
+ // legs
+ shape.addShape(createCylinder(legHeight, new Vector3fImpl(legWidth, legWidth, legHeight), new Vector3fImpl(
+ 0.5f - 1.5f * legWidth, 0.5f - .5f * legWidth, 0)));
+
+ // legs
+ shape.addShape(createCylinder(legHeight, new Vector3fImpl(legWidth, legWidth, legHeight), new Vector3fImpl(
+ 0.5f + .5f * legWidth, 0.5f - .5f * legWidth, 0)));
+ // body
+ shape.addShape(createCube(bodyHeight + legHeight, new Vector3fImpl(bodyWidth, bodyDepth, bodyHeight),
+ new Vector3fImpl((1.0f - bodyWidth) / 2.0f, (1.0f - bodyDepth) / 2.0f,
+ legHeight)));
+
+ // head
+ shape.addShape(createCylinder(headHeight, new Vector3fImpl(headWidth, headWidth, headHeight),
+ new Vector3fImpl(0.5f - .5f * headWidth, 0.5f - .5f * headWidth,
+ (legHeight + bodyHeight))));
+ return shape;
+ }
+
+ public IVector3f getSize3D(Object object) {
+ return FULL_SIZE;
+ }
+
+ public IVector3f getRelativeLocation3D(Object object) {
+ return ORIGIN;
+ }
+ };
+
+ protected static PositionableShape createCylinder(float headHeight, IVector3f size, IVector3f location) {
+ Position3D p3 = Position3DUtil.createAbsolutePosition();
+ p3.setCenter3D(new Vector3fImpl(location.getX(), location.getY(), location.getZ()));
+ p3.setSize3D(size);
+ CylinderShape shape = new CylinderShape(p3, 30, 1.0f, true);
+ shape.setFill(true);
+ shape.setOutline(true);
+ return shape;
+ }
+
+ protected static PositionableShape createCube(float headHeight, IVector3f size, IVector3f location) {
+ Position3D p3 = Position3DUtil.createAbsolutePosition();
+ p3.setCenter3D(new Vector3fImpl(location.getX(), location.getY(), location.getZ()));
+ p3.setSize3D(size);
+ CuboidShape shape = new CuboidShape(p3, true);
+ shape.setFill(true);
+ shape.setOutline(true);
+ return shape;
+ }
+
+}