X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.processeditor%2Fsrc%2Forg%2Fsimantics%2Fprocesseditor%2Fscenegraph%2FPipelineComponentNode.java;fp=org.simantics.processeditor%2Fsrc%2Forg%2Fsimantics%2Fprocesseditor%2Fscenegraph%2FPipelineComponentNode.java;h=0000000000000000000000000000000000000000;hb=6b6fcff5d6c326feef07ccf8401f97911778fffe;hp=13a06f0aad322f22ed375e2b011ee84957c56b38;hpb=504c111db40d78f4913badddd126b283b5504dbb;p=simantics%2F3d.git diff --git a/org.simantics.processeditor/src/org/simantics/processeditor/scenegraph/PipelineComponentNode.java b/org.simantics.processeditor/src/org/simantics/processeditor/scenegraph/PipelineComponentNode.java deleted file mode 100644 index 13a06f0a..00000000 --- a/org.simantics.processeditor/src/org/simantics/processeditor/scenegraph/PipelineComponentNode.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007- VTT Technical Research Centre of Finland. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.processeditor.scenegraph; - -import javax.vecmath.AxisAngle4d; - -import org.simantics.db.Graph; -import org.simantics.db.Resource; -import org.simantics.processeditor.ProcessResource; -import org.simantics.processeditor.common.ControlPointTools; -import org.simantics.processeditor.stubs.PipeControlPoint; -import org.simantics.processeditor.stubs.PipelineComponent; -import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase; -import org.simantics.proconf.g3d.scenegraph.IGraphicsNode; -import org.simantics.proconf.g3d.scenegraph.ParameterizedModelNode; - - - - -public class PipelineComponentNode extends ParameterizedModelNode { - - boolean updating = false; - - public PipelineComponentNode(ThreeDimensionalEditorBase editor, IGraphicsNode parent, Graph graph, Resource resource) { - super(editor,parent,graph, resource, ProcessResource.plant3Dresource.HasGraphics); - PipelineComponent component = new PipelineComponent(graph, resource); - if(!component.isInstanceOf(ProcessResource.plant3Dresource.PipelineComponent)) - throw new RuntimeException("Resource must be instance of Inline Component " + resource); - if (!(parent instanceof PipeRunNode)) - throw new RuntimeException("Parent must be instance of PipelineNode " + parent.getResource() + " " + resource); - - //PipeControlPoint pcp = component.getControlPoint(); -// monitor = new StructuralChangeMonitor( -// new StructuralChangeListener[] { this }, pcp.getResource(), GlobalIdMap -// .get(Layer0Mapping.HAS_PROPERTY)); - updateTransform(graph); - } - -// public void handleUpdate(StructuralChangeMonitor monitor, GraphChangeEvent event) { -// if (updating) -// return; -// if (event.getParameter() instanceof InlineComponentNode) -// return; -// if (event.getTransactionId() == null) -// return; -// if (event.getParameter() instanceof AbstractGraphicsNode) -// return; -// -// updating = true; -// updateTransform(); -// updating = false; -// } - - public void updateTransform(Graph graph) { - super.updateTransform(graph); - /* - PipelineComponent component = new PipelineComponent(graph,shapeResource); - - PipeControlPoint pcp = component.getControlPoint(); - Double angle = component.getAtMostOneRelatedScalarDouble(ProcessResource.plant3Dresource.HasRotationAngle); - double componentAngle = 0.0; - if (angle != null) - componentAngle = angle; - - AxisAngle4d aa = ControlPointTools.getControlPointRotation(pcp, componentAngle); - update(aa); - */ - } - - - public void dispose() { - //monitor.dispose(); - super.dispose(); - } - - - - -} \ No newline at end of file