亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jthreedsideview.java

?? The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
?? JAVA
字號:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: JThreeDSideView.java * * Copyright (c) 2005 Sun Microsystems and Static Free Software * * Electric(tm) is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Electric(tm) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Electric(tm); see the file COPYING.  If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, Mass 02111-1307, USA. */package com.sun.electric.plugins.j3d.ui;import com.sun.electric.tool.user.User;import com.sun.electric.technology.Layer;import com.sun.electric.database.geometry.GenMath;import com.sun.electric.plugins.j3d.*;import com.sun.electric.plugins.j3d.utils.J3DUtils;import com.sun.electric.plugins.j3d.utils.J3DAppearance;import com.sun.j3d.utils.universe.SimpleUniverse;import com.sun.j3d.utils.universe.ViewingPlatform;import com.sun.j3d.utils.universe.Viewer;import com.sun.j3d.utils.universe.PlatformGeometry;import com.sun.j3d.utils.behaviors.mouse.MouseRotate;import com.sun.j3d.utils.behaviors.mouse.MouseZoom;import com.sun.j3d.utils.behaviors.mouse.MouseTranslate;import com.sun.j3d.utils.picking.PickCanvas;import com.sun.j3d.utils.picking.PickResult;import javax.media.j3d.*;import javax.vecmath.*;import javax.swing.*;import java.awt.*;import java.awt.event.MouseMotionListener;import java.awt.event.MouseListener;import java.awt.event.MouseEvent;import java.awt.geom.Rectangle2D;import java.util.Iterator;import java.util.HashMap;/** * Support class for 3D viewing. */public class JThreeDSideView extends JPanel    implements MouseMotionListener, MouseListener{    private static Layer currentLayerSelected = null;    private HashMap<Layer,Shape3DTab> layerPolyhedra = null;    double lowHeight = Double.MAX_VALUE, highHeight = Double.MIN_VALUE;    private PickCanvas pickCanvas;    private JThreeDTab parentDialog;    // This class will store previous Z values assigned to layer    private static class Shape3DTab    {        Shape3D shape;        double origDist;        double origThick;        Shape3DTab(Shape3D s, double dist, double thick)        {            this.shape = s;            this.origDist = dist;            this.origThick = thick;        }    }    public JThreeDSideView(JThreeDTab dialog)    {        parentDialog = dialog;        GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();        setLayout(new BorderLayout());        Canvas3D canvas = new Canvas3D(config);        add("Center", canvas);        canvas.addMouseListener(this);        // Set global highlight appearance before create the elements        J3DAppearance.setHighlightedAppearanceValues(this);        // Set global bounding box appearance before values are set        J3DAppearance.setCellAppearanceValues(this);        // Set global axes before values are set        J3DAppearance.setAxisAppearanceValues(this);        // Creating scene        BranchGroup scene = createSceneGraph(canvas, J3DUtils.infiniteBounds);        ViewingPlatform viewP = new ViewingPlatform(4);        viewP.setCapability(ViewingPlatform.ALLOW_CHILDREN_READ);        Viewer viewer = new Viewer(canvas);        SimpleUniverse u = new SimpleUniverse(viewP, viewer);        u.addBranchGraph(scene);        // lights on ViewPlatform geometry group        PlatformGeometry pg = new PlatformGeometry();        J3DUtils.createLights(pg);        viewP.setPlatformGeometry(pg) ;        JMouseRotate rotate = new JMouseRotate(MouseRotate.INVERT_INPUT);        rotate.setTransformGroup(u.getViewingPlatform().getMultiTransformGroup().getTransformGroup(0));        BranchGroup rotateBG = new BranchGroup();        rotateBG.addChild(rotate);        u.getViewingPlatform().addChild(rotateBG);        rotate.setSchedulingBounds(J3DUtils.infiniteBounds);        JMouseZoom zoom = new JMouseZoom(canvas, MouseZoom.INVERT_INPUT);        zoom.setTransformGroup(u.getViewingPlatform().getMultiTransformGroup().getTransformGroup(1));        zoom.setSchedulingBounds(J3DUtils.infiniteBounds);        zoom.setFactor(0.7);    // default 0.4        BranchGroup zoomBG = new BranchGroup();        zoomBG.addChild(zoom);        u.getViewingPlatform().addChild(zoomBG);        JMouseTranslate translate = new JMouseTranslate(canvas, MouseTranslate.INVERT_INPUT);        translate.setTransformGroup(u.getViewingPlatform().getMultiTransformGroup().getTransformGroup(2));        translate.setSchedulingBounds(J3DUtils.infiniteBounds);        translate.setFactor(0.01 * (highHeight-lowHeight)); // default 0.02        BranchGroup translateBG = new BranchGroup();        translateBG.addChild(translate);        u.getViewingPlatform().addChild(translateBG);//        OrbitBehavior orbit = new OrbitBehavior(canvas, OrbitBehavior.REVERSE_ALL);//        orbit.setSchedulingBounds(infiniteBounds);//                Point3d center = new Point3d(-10, -10, (lowHeight+highHeight)/2);////    //orbit.setRotationCenter(center);//    orbit.setMinRadius(0);//    orbit.setZoomFactor(1);//    //orbit.setTransFactors(10, 10);//    orbit.setProportionalZoom(true);//        Transform3D home = new Transform3D();//        home.setTranslation(new Vector3d(center));//        //orbit.setHomeTransform(home);//        u.getViewingPlatform().setViewPlatformBehavior(orbit);        u.getViewingPlatform().setNominalViewingTransform();        //translate.setView(-10, -50);        J3DUtils.setViewPoint(u, canvas, scene, new Rectangle2D.Double(0, 0, 10, 20));        rotate.setRotation(-1.57, 0.5, 0);        zoom.setZoom(0.5);    }    private BranchGroup createSceneGraph(Canvas3D canvas, BoundingSphere infiniteBounds)    {        BranchGroup objRoot = new BranchGroup();        objRoot.setCapability(BranchGroup.ALLOW_BOUNDS_READ);        objRoot.setCapability(BranchGroup.ENABLE_PICK_REPORTING);        objRoot.setCapability(BranchGroup.ALLOW_BOUNDS_WRITE);        // Create a simple Shape3D node; add it to the scene graph.        Background bg = new Background(new Color3f(new Color(User.getColor(User.ColorPrefType.BACKGROUND))));        bg.setApplicationBounds(infiniteBounds);        objRoot.addChild(bg);        // Create the TransformGroup node and initialize it to the        // identity. Enable the TRANSFORM_WRITE capability so that        // our behavior code can modify it at run time. Add it to        // the root of the subgraph.        	// Create a transform group node to scale and position the object.        Transform3D t = new Transform3D();        t.set(1, new Vector3d(0, -10, -40));        TransformGroup objTrans = new TransformGroup(t);        objRoot.addChild(objTrans);        TransformGroup nodesGroup = new TransformGroup();        nodesGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);        nodesGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);        nodesGroup.setCapability(TransformGroup.ENABLE_PICK_REPORTING);        objTrans.addChild(nodesGroup);        layerPolyhedra = new HashMap<Layer,Shape3DTab>(parentDialog.getTech().getNumLayers());        for(Iterator<Layer> it = parentDialog.getTech().getLayers(); it.hasNext(); )        {            Layer layer = (Layer)it.next();            if (layer.isPseudoLayer()) continue;            //if (!layer.isVisible()) continue;            double xyFactor = (layer.getFunctionExtras() == Layer.Function.CONMETAL) ? 0.8 : 1;            J3DAppearance ap = parentDialog.transparencyMap.get(layer);            GenMath.MutableDouble thickness = parentDialog.threeDThicknessMap.get(layer);            GenMath.MutableDouble distance = parentDialog.threeDDistanceMap.get(layer);            double dis = distance.doubleValue();            double thick = thickness.doubleValue();            Rectangle2D bounds = new Rectangle2D.Double(0, 0, 10*xyFactor, 20*xyFactor);            Shape3DTab shape = new Shape3DTab(J3DUtils.addPolyhedron(bounds, dis, thick, ap, nodesGroup), dis, thick);            layerPolyhedra.put(layer, shape);            if (dis < lowHeight)                lowHeight = dis;            double max = dis + thick;            if (max > highHeight)                highHeight = max;        }        // picking tool        pickCanvas = new PickCanvas(canvas, objRoot);		//pickCanvas.setMode(PickCanvas.BOUNDS);        pickCanvas.setMode(PickCanvas.GEOMETRY_INTERSECT_INFO);        pickCanvas.setTolerance(4.0f);        objRoot.compile();        return objRoot;    }    /**     * To highlight layer according to list on the left     * @param layer     */    public void showLayer(Layer layer)    {        Shape3DTab shape;        if (currentLayerSelected != null)        {            // For this shape, its appareance has to be set back to normal            shape = layerPolyhedra.get(currentLayerSelected);            if (shape != null) // is null if previous shape belongs to another dialog (another tech)                shape.shape.setAppearance((J3DAppearance)parentDialog.transparencyMap.get(currentLayerSelected));        }        shape = layerPolyhedra.get(layer);        if (shape != null)            shape.shape.setAppearance(J3DAppearance.highlightApp);        else            System.out.println("Shape is null in JThreeDSideView.showLayer");        currentLayerSelected = layer;    }    public void updateZValues(Layer layer, double thickness, double distance)    {        Shape3DTab shape = layerPolyhedra.get(layer);        if (J3DUtils.updateZValues(shape.shape, (float)shape.origDist,  (float)(shape.origDist+shape.origThick),                (float)distance, (float)(distance+thickness)))        {            // It has to remember temporary new values until they are committed into database            shape.origDist = distance;            shape.origThick = thickness;        }    }    // the MouseEvent events    public void mousePressed(MouseEvent evt)    {    }    public void mouseReleased(MouseEvent evt) {}    /**     * Method to handle picking tool in 3D     * @param evt     */    public void mouseClicked(MouseEvent evt)    {        pickCanvas.setShapeLocation(evt);		PickResult result = pickCanvas.pickClosest();		if (result != null)		{            Shape3D s = (Shape3D)result.getNode(PickResult.SHAPE3D);            if (s != null)            {                J3DAppearance app = (J3DAppearance)s.getAppearance();                if (app != J3DAppearance.highlightApp)                {                    Layer layer = app.getGraphics().getLayer();                    parentDialog.threeDLayerList.setSelectedValue(layer.getName(), false);                    parentDialog.processDataInFields(layer, false);                }            }		}    }    public void mouseEntered(MouseEvent evt) {}    public void mouseExited(MouseEvent evt) {}    // the MouseMotionListener events    public void mouseMoved(MouseEvent evt) {}    public void mouseDragged(MouseEvent evt) {}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲无线码一区二区三区| 欧美白人最猛性xxxxx69交| 亚洲欧美日韩国产综合在线| 国产a视频精品免费观看| 久久天堂av综合合色蜜桃网| 国产很黄免费观看久久| 国产亚洲精品福利| 91免费版在线| 亚洲va欧美va国产va天堂影院| 欧美三级资源在线| 日本网站在线观看一区二区三区 | 午夜精品福利在线| 在线播放中文字幕一区| 久久国产精品99久久久久久老狼| 久久综合九色综合欧美98 | 欧洲一区在线电影| 午夜日韩在线观看| 亚洲精品一区二区三区在线观看| 国产成人超碰人人澡人人澡| 悠悠色在线精品| 日韩欧美电影在线| 懂色av一区二区夜夜嗨| 夜夜操天天操亚洲| 欧美精品一区二| 91首页免费视频| 日本午夜一本久久久综合| 亚洲国产高清不卡| 欧美日本精品一区二区三区| 国产成人午夜视频| 亚洲一区二区在线观看视频| 精品蜜桃在线看| 在线观看一区二区精品视频| 久久国产精品99久久久久久老狼| 中文字幕一区二区三区蜜月 | 精品久久99ma| 99精品一区二区三区| 美女爽到高潮91| 亚洲女同一区二区| 久久人人超碰精品| 欧美日韩在线观看一区二区| 国产成人av电影在线| 午夜视频在线观看一区二区三区| 亚洲国产精品精华液2区45| 欧美精品xxxxbbbb| 成人久久18免费网站麻豆| 毛片一区二区三区| 亚洲电影一级黄| 国产精品家庭影院| 久久精品人人做| 日韩精品自拍偷拍| 欧美四级电影在线观看| 成人成人成人在线视频| 国内精品自线一区二区三区视频| 亚洲国产美国国产综合一区二区| 一区二区三区视频在线看| 2023国产精品| 日韩久久精品一区| 91精品国产aⅴ一区二区| 91视频xxxx| 不卡高清视频专区| 国产不卡视频一区二区三区| 久久精品国产网站| 奇米影视一区二区三区| 日韩高清不卡在线| 丝袜美腿一区二区三区| 亚洲自拍偷拍网站| 亚洲视频网在线直播| 欧美一区2区视频在线观看| 欧美老女人第四色| 69堂成人精品免费视频| 欧美日韩在线免费视频| 欧美少妇一区二区| 欧美视频在线观看一区二区| 色婷婷久久久综合中文字幕| 一本大道av伊人久久综合| 亚洲免费三区一区二区| 亚洲丝袜精品丝袜在线| 亚洲精品日韩一| 亚洲一区二区中文在线| 亚洲国产精品麻豆| 亚洲一区免费视频| 亚洲超碰精品一区二区| 亚洲成人在线网站| 美女久久久精品| 九九精品一区二区| 国产精品一品视频| 91香蕉视频污在线| 91成人免费在线| 欧美日韩精品一区视频| 日韩欧美中文字幕一区| 久久亚洲精精品中文字幕早川悠里| 久久久国产午夜精品| 最新久久zyz资源站| 一区二区欧美国产| 日本不卡1234视频| 国产精品1区2区3区在线观看| 国产精品资源网站| 99精品国产一区二区三区不卡 | 99久久伊人精品| 色吧成人激情小说| 日韩欧美在线影院| 国产拍揄自揄精品视频麻豆| 日韩一区在线免费观看| 亚洲va国产天堂va久久en| 捆绑紧缚一区二区三区视频| 粉嫩av亚洲一区二区图片| 91国偷自产一区二区三区成为亚洲经典 | gogo大胆日本视频一区| 欧美日韩国产综合一区二区三区| 欧美一区二区三区在线电影| 国产女人aaa级久久久级| 亚洲精品视频观看| 久久电影网电视剧免费观看| eeuss鲁片一区二区三区在线看| 欧美日韩精品一区二区在线播放| 欧美精品一区二区三区在线| 亚洲精品乱码久久久久久| 美女国产一区二区三区| 97久久精品人人澡人人爽| 69久久99精品久久久久婷婷 | 亚洲成精国产精品女| 久久精品国产**网站演员| 99精品偷自拍| 日韩欧美的一区二区| 亚洲欧美另类综合偷拍| 久久精品国产77777蜜臀| 色婷婷激情一区二区三区| 精品国产免费久久| 亚洲国产精品麻豆| 成人av免费在线播放| 欧美v日韩v国产v| 亚洲一卡二卡三卡四卡无卡久久 | 成人理论电影网| 日韩一区二区三区免费观看| 亚洲少妇30p| 精品午夜一区二区三区在线观看| 色老综合老女人久久久| 国产欧美精品一区二区色综合 | 亚洲一级片在线观看| 成人国产在线观看| 久久伊人蜜桃av一区二区| 日韩精品一级中文字幕精品视频免费观看 | 欧美一区二区国产| 亚洲一区在线视频| 成人免费视频app| 精品国精品国产| 午夜精品久久一牛影视| 91网站最新网址| 国产人妖乱国产精品人妖| 蜜桃视频在线观看一区| 精品视频全国免费看| 一区二区三区国产精华| 99久久久国产精品免费蜜臀| 精品三级av在线| 日韩电影免费一区| 欧美老年两性高潮| 天堂成人免费av电影一区| 欧美视频在线观看一区| 亚洲欧美国产三级| 91免费在线看| 亚洲视频在线一区二区| 99re亚洲国产精品| 亚洲同性gay激情无套| 99久久久国产精品免费蜜臀| 国产精品每日更新| 成人h精品动漫一区二区三区| 国产欧美日本一区视频| 国产不卡在线播放| 亚洲国产高清aⅴ视频| 不卡的av电影| 亚洲精品写真福利| 日本高清不卡视频| 一区二区三区波多野结衣在线观看| av不卡免费在线观看| 亚洲欧洲av另类| 在线亚洲精品福利网址导航| 夜夜精品视频一区二区| 777亚洲妇女| 美国十次综合导航| 久久久五月婷婷| 懂色av一区二区夜夜嗨| 亚洲欧美日韩一区二区 | 免费人成在线不卡| 精品国内片67194| 高清shemale亚洲人妖| 国产精品第一页第二页第三页| 91视频国产资源| 日韩精品91亚洲二区在线观看| 日韩一级大片在线| 国产精品亚洲视频| 最新久久zyz资源站| 欧美电影一区二区| 久久99精品久久只有精品| 国产精品免费丝袜| 欧美日韩在线免费视频| 国产中文字幕精品| 亚洲日本一区二区三区| 日韩午夜激情视频| 成人高清免费观看| 天涯成人国产亚洲精品一区av|