Commit 5c96fec5 authored by Florian Hölzl's avatar Florian Hölzl

YELLOW

refs 881
parent 42cb0b96
......@@ -6,8 +6,7 @@ Bundle-Version: 2.1.0.qualifier
Bundle-Activator: org.fortiss.tooling.graphicsGL.ui.ToolingGraphicsGLUIActivator
Require-Bundle: org.fortiss.tooling.graphicsGL;bundle-version="2.1.0";visibility:=reexport,
org.fortiss.tooling.base.ui;bundle-version="2.1.0";visibility:=reexport,
org.lwjgl;bundle-version="2.8.4";visibility:=reexport,
org.fortiss.af3.expression.ui;bundle-version="2.1.0"
org.lwjgl;bundle-version="2.8.4";visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: fortiss GmbH
......
......@@ -8,14 +8,5 @@
$Id$
-->
<plugin>
<extension
point="org.fortiss.tooling.kernel.ui.modelEditorBinding">
<modelEditorBinding
binding="test.org.fortiss.tooling.graphicsGL.ui.Test3DEditorBinding">
<modelElementClass
modelElementClass="org.fortiss.af3.expression.model.DataDictionary">
</modelElementClass>
</modelEditorBinding>
</extension>
</plugin>
......@@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E9B79759E2C0C013BE2B19DE87749838
* @ConQAT.Rating YELLOW Hash: 47BC7AF39421CEFE9806644725D90600
*/
public class ToolingGraphicsGLUIActivator extends AbstractUIPlugin {
......
......@@ -28,11 +28,12 @@ import static org.lwjgl.util.glu.GLU.gluLookAt;
/**
* A {@link Camera} which can be configured with pitch and yaw angle.
* With both angles at 0.0 degree the camera looks along the Y axis.
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 8D71137B475BD3A8ECD299C288D95E15
* @ConQAT.Rating YELLOW Hash: BE3CCA00095D96842B395F12D5F730C8
*/
public class MovingCameraWithPitchAndYaw extends Camera {
......
......@@ -35,13 +35,13 @@ import org.eclipse.swt.widgets.Listener;
import org.lwjgl.LWJGLException;
/**
* Canvas for drawing LWJGL content onto a SWT widget. It uses double buffer, dpeth buffer and four
* Canvas for drawing LWJGL content onto a SWT widget. It uses double buffer, depth buffer and four
* sample buffers.
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 83ECFD2B231D8EC0A50D3D363571A870
* @ConQAT.Rating YELLOW Hash: 75F7F2D3454F0497129383C42DE14443
*/
public class Lwjgl3DCanvas extends GLCanvas {
......
......@@ -65,7 +65,7 @@ import org.lwjgl.util.vector.Vector3f;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 908A7E484514F2EC6D3126014A55B7E9
* @ConQAT.Rating YELLOW Hash: 760EFA8C756A02DB703D0DD2D6A7DFFB
*/
public abstract class Graphical3DEditorBase<T extends EObject> extends EditorBase<T> implements
MouseListener, MouseTrackListener, MouseMoveListener, MouseWheelListener, KeyListener,
......
......@@ -35,7 +35,7 @@ import org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E66B9A1E36BB0871D1F6B8C171070154
* @ConQAT.Rating YELLOW Hash: 0CDD15394CBA85A529E6042BE9D98DB3
*/
public class Light {
......
......@@ -28,7 +28,7 @@ import org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 9F494319806A2DB44419BB8D51E0B430
* @ConQAT.Rating YELLOW Hash: E54C95BF5F93D0E19494340EDAF88235
*/
public class Light3DLight {
......
......@@ -29,7 +29,7 @@ import org.fortiss.tooling.graphicsGL.ui.picker.ModelObjectPicker;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: D3F8BDCBB89A0D376ED987F07023EC68
* @ConQAT.Rating YELLOW Hash: 001519E21F075E0C685BA8C3643C42D7
*/
public class CompositeViewObject extends ViewObjectBase {
/** The component objects. */
......
......@@ -43,7 +43,7 @@ import org.lwjgl.util.glu.Sphere;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 7EFCEC92BBCFB59C5C1BEA5F9F2ABFD3
* @ConQAT.Rating YELLOW Hash: E6B8826D13F12C42C0B5170FB2BBD32C
*/
public class Graph3DViewObject extends ViewObjectBase {
/** The graph model. */
......
......@@ -27,7 +27,7 @@ import org.fortiss.tooling.graphicsGL.model.scene.Object3D;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 277D271D3EED34F7CEBDA245836C1528
* @ConQAT.Rating YELLOW Hash: A85A506B484FBC814E010B3BFCB2C469
*/
public class Object3DViewObject extends ViewObjectBase {
/** The model object. */
......
......@@ -31,7 +31,7 @@ import org.fortiss.tooling.graphicsGL.ui.picker.ModelObjectPicker;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: DD1E015FD10F45DD24F4A92F67902F33
* @ConQAT.Rating YELLOW Hash: E7B4568D6E68335F154DA5CBB56A1045
*/
public abstract class PickableObjectBase extends ViewObjectBase {
......
......@@ -29,7 +29,7 @@ import org.lwjgl.util.vector.Vector3f;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: A447FB4D5DC5307470D36A7347352A16
* @ConQAT.Rating YELLOW Hash: FA9908A498EA1707A18BAF414062FB0D
*/
public class RotatedObject extends WrappedViewObjectBase {
/** The rotation angle. */
......
......@@ -29,7 +29,7 @@ import org.lwjgl.util.vector.Vector3f;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 57BE199D8FDF27A1D0F615CD53FCD32F
* @ConQAT.Rating YELLOW Hash: 93FBF763F8910DD408BB2E8F0E501F6F
*/
public class ScaledObject extends WrappedViewObjectBase {
/** The scale factor. */
......
......@@ -26,7 +26,7 @@ import org.fortiss.tooling.graphicsGL.ui.picker.ModelObjectPicker;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: C970B9D2F1FF5088B0E7494BE10DA692
* @ConQAT.Rating YELLOW Hash: 022CF9DDC5E9998D4D27F0BE6F3DD58A
*/
public abstract class ViewObjectBase {
......
......@@ -53,7 +53,7 @@ import org.lwjgl.util.vector.Vector3f;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 4F5B62FD35DFAAEAE994F1C76A03CA27
* @ConQAT.Rating YELLOW Hash: 2306FB8D729B656476F454CF057B77B7
*/
public final class ModelObjectPicker {
/** The buffer size for pickable objects. */
......
......@@ -30,7 +30,7 @@ import org.fortiss.tooling.graphicsGL.model.Vector3D;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: AFD0F65604F06A6F752C5EEB538EC5A4
* @ConQAT.Rating YELLOW Hash: 565AA855ABB91C01B95498B94DA93FE4
*/
public class FloatBufferUtils {
/** Creates a float buffer for the given value array. */
......
......@@ -93,7 +93,7 @@ import org.newdawn.slick.Color;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 29BEEFDEA81964C64956C3DF00EEF580
* @ConQAT.Rating YELLOW Hash: 79E8012B3C8B9A5385EFA51933DF077E
*/
public class GLPrimitives {
/** The X unit vector. */
......@@ -190,10 +190,23 @@ public class GLPrimitives {
/** Draws the given list of material groups. */
public static void drawMaterialGroups(List<MaterialGroup3D> groups) {
drawMaterialGroups(groups, true);
}
/**
* Draws the given list of material groups setting material properties only when
* {@code useLight} is {@code true}. Otherwise, the ambient component of the material is used to
* set the GL color property.
*/
public static void drawMaterialGroups(List<MaterialGroup3D> groups, boolean useLight) {
for(MaterialGroup3D g : groups) {
Material3D mat = g.getMaterial() == null ? DEFAULT_MATERIAL : g.getMaterial();
setSmoothShading(g.isSmoothShading());
setMaterial(mat);
if(useLight) {
setMaterial(mat);
} else {
setColor(mat.getAmbient());
}
drawTriangleFaces(g.getFacesList());
}
}
......
......@@ -66,7 +66,7 @@ import org.fortiss.tooling.kernel.model.IProjectRootElement;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: C1DEE860EDFB7F388FEECC831432B425
* @ConQAT.Rating YELLOW Hash: 6909A72D299CD75366AC9EEDD30C0B64
*/
public class Test3DEditor extends Graphical3DEditorBase<IProjectRootElement> {
/** The ambient intensity. */
......
......@@ -17,8 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package test.org.fortiss.tooling.graphicsGL.ui;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.expression.model.DataDictionary;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
/**
......@@ -27,9 +27,9 @@ import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 92549E564D969E70FD6068582B3F5AE7
* @ConQAT.Rating YELLOW Hash: 9EAB9F3BD398676AC39020C213A1EC07
*/
public class Test3DEditorBinding implements IModelEditorBinding<DataDictionary> {
public class Test3DEditorBinding implements IModelEditorBinding<EObject> {
/** {@inheritDoc} */
@Override
......
......@@ -9,5 +9,26 @@
-->
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<package
class="org.fortiss.tooling.graphicsGL.model.ToolingGraphics3DPackage"
genModel="model/graphics3D.genmodel"
uri="http://www.fortiss.org/tooling/graphics3D">
</package>
<package
class="org.fortiss.tooling.graphicsGL.model.graph.GraphPackage"
genModel="model/graphics3D.genmodel"
uri="http://www.fortiss.org/tooling/graphics3D/graph">
</package>
<package
class="org.fortiss.tooling.graphicsGL.model.mesh.MeshPackage"
genModel="model/graphics3D.genmodel"
uri="http://www.fortiss.org/tooling/graphics3D/mesh">
</package>
<package
class="org.fortiss.tooling.graphicsGL.model.scene.ScenePackage"
genModel="model/graphics3D.genmodel"
uri="http://www.fortiss.org/tooling/graphics3D/scene">
</package>
</extension>
</plugin>
......@@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 966C2F74D749B8A2DAD42CB1A3701708
* @ConQAT.Rating YELLOW Hash: 8FE89A9B5D58EFF9A7AA909FD589AE39
*/
public class ToolingGraphicsGLActivator extends Plugin {
......
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.graphicsGL.model.graph.GraphPoint3D;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 192CE033FD264FA9061460C63A7DBA82
* @ConQAT.Rating YELLOW Hash: 1B0A747B551E0B74ECA9E89699BB75EF
*/
public class Graph3DModelElementFactory {
/** Creates a graph point. */
......
......@@ -28,26 +28,28 @@ import org.fortiss.tooling.graphicsGL.model.Vector3D;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 39791CC098082EAC5013A4F2287B41E8
* @ConQAT.Rating YELLOW Hash: 66DBBE62E8E395FB2D471987C8E5E72A
*/
public class Graphics3DModelElementFactory {
/** Black color. */
public static final Color3D BLACK = color(0, 0, 0);
/** Red color. */
public static final Color3D RED = color(1.0f, 0, 0);
/** Green color. */
public static final Color3D GREEN = color(0, 1.0f, 0);
/** Blue color. */
public static final Color3D BLUE = color(0, 0, 1.0f);
/** White color. */
public static final Color3D WHITE = color(1.0f, 1.0f, 1.0f);
/** The origin vector. */
public static final Vector3D ORIGIN = vector(0, 0, 0);
/** The X unit vector. */
public static final Vector3D X_UNIT_VECTOR = vector(1.0f, 0, 0);
/** The Y unit vector. */
public static final Vector3D Y_UNIT_VECTOR = vector(0, 1.0f, 0);
/** The Z unit vector. */
public static final Vector3D Z_UNIT_VECTOR = vector(0, 0, 1.0f);
/** Creates a color. */
public static Color3D color(float r, float g, float b) {
......
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.graphicsGL.model.mesh.Vertex3D;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E42773CBB7A478A8F561BB91E87CD4D8
* @ConQAT.Rating YELLOW Hash: 658D16A642FEEFA8A5E1F870C6C3C481
*/
public class Mesh3DModelElementFactory {
......
......@@ -49,11 +49,10 @@ import org.fortiss.tooling.graphicsGL.model.scene.Object3D;
* These files can be produced by exporting 3D objects from Blender (http://www.blender.org).
* Note that you must enable the export normals option in order to get the normal vectors, too.
*
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 901EE648CC8D80D1509F96EA03422682
* @ConQAT.Rating YELLOW Hash: 5E24A597E41FDD86C7FD5EEE07D267C8
*/
public class OBJFileLoaderUtil {
/** Material map. */
......
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.graphicsGL.model.scene.ScenePackage;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: BC63DBE087E95F237CA5A3AB494F560A
* @ConQAT.Rating YELLOW Hash: BC758CC15FA6D352DB611691B4B545FE
*/
public class Scene3DModelElementFactory {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment