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

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

?? polyhedralboundedsolidoperator.java

?? 基于java的3d開發庫。對坐java3d的朋友有很大的幫助。
?? JAVA
字號:
//===========================================================================//=-------------------------------------------------------------------------=//= Module history:                                                         =//= - April 8 2008 - Oscar Chavarro: Original base version                  =//=-------------------------------------------------------------------------=//= References:                                                             =//= [MANT1988] Mantyla Martti. "An Introduction To Solid Modeling",         =//=     Computer Science Press, 1988.                                       =//===========================================================================package vsdk.toolkit.processing;// VitralSDK classesimport vsdk.toolkit.common.ColorRgb;import vsdk.toolkit.common.VSDK;import vsdk.toolkit.common.Vector3D;import vsdk.toolkit.common.CircularDoubleLinkedList;import vsdk.toolkit.environment.geometry.PolyhedralBoundedSolid;import vsdk.toolkit.environment.geometry.polyhedralBoundedSolidNodes._PolyhedralBoundedSolidFace;import vsdk.toolkit.environment.geometry.polyhedralBoundedSolidNodes._PolyhedralBoundedSolidLoop;import vsdk.toolkit.environment.geometry.polyhedralBoundedSolidNodes._PolyhedralBoundedSolidEdge;import vsdk.toolkit.environment.geometry.polyhedralBoundedSolidNodes._PolyhedralBoundedSolidHalfEdge;import vsdk.toolkit.environment.geometry.polyhedralBoundedSolidNodes._PolyhedralBoundedSolidVertex;/**This class is not intended to be used directly, but rather as a common serviceprovider for classes PolyhedralBoundedSolidSplitter andPolyhedralBoundedSolidSetOperator.*/public class PolyhedralBoundedSolidOperator extends GeometricModeler{    /**    */    private static boolean searchForEdge(        CircularDoubleLinkedList<_PolyhedralBoundedSolidEdge> l,        _PolyhedralBoundedSolidEdge e)    {        int i;        for ( i = 0; i < l.size(); i++ ) {            if ( l.get(i) == e ) return true;        }        return false;    }    /**    */    private static boolean searchForVertex(        CircularDoubleLinkedList<_PolyhedralBoundedSolidVertex> l,        _PolyhedralBoundedSolidVertex v)    {        int i;        for ( i = 0; i < l.size(); i++ ) {            if ( l.get(i) == v ) return true;        }        return false;    }    /**    Following section [MANT1988].14.7.1 and program [MANT1988].14.8.    */    protected static boolean neighbor(_PolyhedralBoundedSolidHalfEdge h1, _PolyhedralBoundedSolidHalfEdge h2)    {        return (h1.parentLoop.parentFace == h2.parentLoop.parentFace) &&            ( (              h1 == h1.parentEdge.rightHalf && h2 == h2.parentEdge.leftHalf              ) ||               (              h1 == h1.parentEdge.leftHalf && h2 == h2.parentEdge.rightHalf              ) );    }    /**    This is the answer to problem [MANT1988].14.2.    @todo Check for consistency of `emanatingHalfEdge` pointers for vertices.    */    protected static void cleanup(PolyhedralBoundedSolid s)    {        int i, j;        _PolyhedralBoundedSolidFace f;        _PolyhedralBoundedSolidLoop l;        _PolyhedralBoundedSolidHalfEdge he;        for ( i = 0; i < s.polygonsList.size(); i++ ) {            f = s.polygonsList.get(i);            for ( j = 0; j < f.boundariesList.size(); j++ ) {                l = f.boundariesList.get(j);                he = l.boundaryStartHalfEdge;                do {                    //                    if ( !searchForEdge(s.edgesList, he.parentEdge) ) {                        s.edgesList.add(he.parentEdge);                    }                    if ( !searchForVertex(s.verticesList, he.startingVertex) ) {                        s.verticesList.add(he.startingVertex);                        he.startingVertex.emanatingHalfEdge = he;                    }                    //                    he = he.next();                } while( he != l.boundaryStartHalfEdge );            }        }    }    /**    Following section [MANT1988].14.8. and program [MANT1988].14.12.    */    protected static void movefac(_PolyhedralBoundedSolidFace f,                                  PolyhedralBoundedSolid s)    {        _PolyhedralBoundedSolidLoop l;        _PolyhedralBoundedSolidHalfEdge he;        _PolyhedralBoundedSolidFace f2;        int i;        f.parentSolid.polygonsList.locateWindowAtElem(f);        f.parentSolid.polygonsList.removeElemAtWindow();        s.polygonsList.add(f);        f.parentSolid = s;        for ( i = 0; i < f.boundariesList.size(); i++ ) {            l = f.boundariesList.get(i);            he = l.boundaryStartHalfEdge;            do {                f2 = he.mirrorHalfEdge().parentLoop.parentFace;                if ( f2.parentSolid != s ) {                    movefac(f2, s);                }                he = he.next();            } while( he != l.boundaryStartHalfEdge );        }                    }    /**    Constructs a vector along the bisector of the sector defined by `he`.    Answer to problem [MANT1988].14.1.    Current implementation assumes the following interpretation:    Given a vertex of interest `he.startingVertex`, one can measure the angle    of incidence of loop `he.parentLoop` on vertex of interest by measuring the    angle between the halfedges `he` (direction `a`) and `he.previous`     (direction `b`).  The bisector vector is the one having its tail on the    vertex of interest position `he.startingVertex.position` and its end    pointing in the middle of `a` and `b` directions.    This is the answer to problem [MANT1988].14.1.    @todo: check current assumptions!    This protected method is here for exclusive use of subclasses    `PolyhedralBoundedSolidSplitter` and `PolyhedralBoundedSolidSetOperator`.    */    protected static Vector3D bisector(_PolyhedralBoundedSolidHalfEdge he)    {        Vector3D middle;        Vector3D a, b;        a = (he.next()).startingVertex.position.substract(he.startingVertex.position);        b = (he.previous()).startingVertex.position.substract(he.startingVertex.position);        a.normalize();        b.normalize();        middle = he.startingVertex.position.add((a.add(b)).multiply(0.5));        return middle;    }    /**    Moves those rings of `f1` that do not lie within its outer loop to    `f2`.    This procedure is used on the splitter and set operator algorithms to    ensure that after a face has been divided by a MEF, all loops will end up    in the correct halves.    This is an answer to problem [MANT1988].13.5. Its use in the context of    the splitter algorithm is briefly described on section [MANT1988].14.7.2.    */    private static void laringmv(_PolyhedralBoundedSolidFace f1,                                 _PolyhedralBoundedSolidFace f2)    {        _PolyhedralBoundedSolidLoop l;        int i;        // It is supposed to move all (internal) rings from `f1` to `f2`        // using PolyhedralBoundedSolid.lringmv        for ( i = 1; i < f1.boundariesList.size(); i++ ) {        l = f1.boundariesList.get(i);            if ( f1.parentSolid.lringmv(l, f2, false) ) {                i--;            }        }    }    /**    Following section [MANT1988].14.7.2. and program [MANT1988].14.10.    */    protected static void    join(_PolyhedralBoundedSolidHalfEdge h1, _PolyhedralBoundedSolidHalfEdge h2, boolean withDebug)    {        _PolyhedralBoundedSolidFace oldf, newf;        PolyhedralBoundedSolid s;        if ( withDebug ) {            System.out.println("       -> JOIN:");            System.out.println("          . H1: " + h1);            System.out.println("          . H2: " + h2);        }        oldf = h1.parentLoop.parentFace;        newf = null;        s = oldf.parentSolid;        if ( h1.parentLoop == h2.parentLoop ) {            if ( h1.previous().previous() != h2 ) {                newf = s.lmef(h1, h2.next(), s.getMaxFaceId()+1);                if ( withDebug ) {                    //h1.next().parentEdge.debugColor = new ColorRgb(1, 0, 0);                }            }        }        else {            s.lmekr(h1, h2.next());            if ( withDebug ) {                //h1.next().parentEdge.debugColor = new ColorRgb(0, 1, 0);            }        }        if ( h1.next().next() != h2 ) {            s.lmef(h2, h1.next(), s.getMaxFaceId()+1);            if ( withDebug ) {                //h2.next().parentEdge.debugColor = new ColorRgb(0, 0, 1);            }            if ( newf != null && oldf.boundariesList.size() >= 2 ) {                laringmv(oldf, newf);            }        }    }    /**    This method checks whether the edges `he.previous().parentEdge` and    `he.parentEdge` make a convex (less than 180 degrees) or concave    (larger than 180 degrees) angle. In the first case the method returns    `false` and `true` for the second case.    This is an answer to problem [MANT1988].13.6.    @todo Pending to verify functionality against method proposed by [MANT1988].    This should be a method of `PolyhedralBoundedSolid`, as it is of    common utility to some other operations.    PRE: Parent solid should be previously validated to contain correct    face equations.    This protected method is here for exclusive use of subclasses    `PolyhedralBoundedSolidSplitter` and `PolyhedralBoundedSolidSetOperator`.    */    protected static boolean checkWideness (_PolyhedralBoundedSolidHalfEdge he)    {        Vector3D a, b, c;        a = (he.next()).startingVertex.position.substract(he.startingVertex.position);        b = (he.previous()).startingVertex.position.substract(he.startingVertex.position);        a.normalize();        b.normalize();        c = b.crossProduct(a);// HERE SHOULD COMPARE `c` WITH FACE NORMAL!        if ( c.length() < 10*VSDK.EPSILON ) {            // Angle greater than 180 degrees            return true;        }        return false;    }}//===========================================================================//= EOF                                                                     =//===========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱一区二区| 亚洲精品菠萝久久久久久久| 欧美日韩精品欧美日韩精品一| av在线免费不卡| 99久久精品免费看| 91免费看视频| 欧美手机在线视频| 欧美日韩亚洲综合在线| 欧美三级电影一区| 欧美美女视频在线观看| 日韩欧美一区二区视频| 日韩一区二区三区视频| 日韩美女在线视频| 久久九九99视频| 国产精品久久久久久福利一牛影视| 国产欧美久久久精品影院| 国产精品私房写真福利视频| 国产精品伦理一区二区| 亚洲一区av在线| 午夜婷婷国产麻豆精品| 激情亚洲综合在线| 成人免费视频网站在线观看| 色综合久久久久久久| 91麻豆国产福利精品| 日韩欧美一区在线| 欧美经典一区二区| 亚洲免费观看高清在线观看| 日韩精品一二三四| 久久99精品网久久| 99re热这里只有精品视频| 欧美日韩一区二区在线视频| 久久伊99综合婷婷久久伊| 亚洲欧美韩国综合色| 美女性感视频久久| 成人av电影在线| 日韩一区二区三区免费看 | 91精品国产黑色紧身裤美女| 日韩欧美二区三区| 亚洲青青青在线视频| 久久99精品久久久久久国产越南 | 蜜臀久久久99精品久久久久久| 成人在线一区二区三区| 欧美日韩综合不卡| 中文字幕在线免费不卡| 久久国产精品99久久久久久老狼| 不卡av免费在线观看| 精品欧美乱码久久久久久| 一区二区三区免费看视频| 国产精品一线二线三线精华| 91精品婷婷国产综合久久| 中文字幕色av一区二区三区| 狠狠色综合播放一区二区| 欧美视频日韩视频在线观看| 欧美激情一区二区| 国产资源在线一区| 91精品国产综合久久精品性色 | 欧美系列亚洲系列| 国产欧美一区二区三区网站 | 国产精品美女一区二区在线观看| 婷婷开心激情综合| 日本高清无吗v一区| 国产肉丝袜一区二区| 久久av中文字幕片| 91.麻豆视频| 日本亚洲一区二区| 欧美日韩在线不卡| 亚洲一二三区在线观看| 色呦呦日韩精品| 亚洲视频资源在线| av网站免费线看精品| 欧美国产日本视频| 成人亚洲一区二区一| 欧美韩国日本综合| 不卡的电视剧免费网站有什么| 国产日韩欧美a| 国产91综合一区在线观看| 久久久久久影视| 国产麻豆日韩欧美久久| 欧美精品一区二区在线播放| 久久99热这里只有精品| 精品国产乱码久久久久久免费| 精东粉嫩av免费一区二区三区| 日韩欧美国产一二三区| 另类成人小视频在线| 精品国产乱码久久久久久图片| 国精产品一区一区三区mba视频| 欧美精品一区二区在线播放| 国产精品一二三四| 中文字幕一区二区三区乱码在线 | 精品久久国产字幕高潮| 久久91精品国产91久久小草 | 欧洲一区在线电影| 亚洲一区二区三区四区在线| 欧美午夜精品免费| 视频一区二区三区中文字幕| 精品欧美久久久| eeuss鲁片一区二区三区 | 国产精品白丝jk白祙喷水网站| 久久综合九色综合97婷婷| 成人中文字幕电影| 亚洲国产视频直播| 精品成人私密视频| 91香蕉视频黄| 青青草97国产精品免费观看| 国产精品丝袜在线| 欧美日韩精品三区| 高清不卡一区二区在线| 亚洲精品一二三区| 日韩精品中午字幕| 色婷婷亚洲一区二区三区| 全国精品久久少妇| 亚洲色图视频网| 日韩一区二区三区在线视频| 播五月开心婷婷综合| 日韩精品免费专区| 国产精品久久影院| 日韩一区二区三区电影| 成人av动漫在线| 激情综合亚洲精品| 亚洲高清视频在线| 中文字幕av在线一区二区三区| 欧美高清激情brazzers| 成人视屏免费看| 国内精品国产成人国产三级粉色 | 国产精品伦一区二区三级视频| 欧美精品自拍偷拍| av午夜精品一区二区三区| 国产一区二区三区免费| 亚洲一区精品在线| 国产精品家庭影院| 久久久久久久精| 日韩一区二区在线免费观看| 在线免费不卡电影| bt欧美亚洲午夜电影天堂| 精品一区二区日韩| 亚洲午夜三级在线| 亚洲人成伊人成综合网小说| 欧美经典一区二区| 国产日韩在线不卡| 久久新电视剧免费观看| 日韩一区二区高清| 欧美一级淫片007| 欧美日韩一区中文字幕| 在线亚洲高清视频| 色丁香久综合在线久综合在线观看| 国产精品亚洲а∨天堂免在线| 麻豆免费看一区二区三区| 日本不卡一二三区黄网| 亚洲成人激情社区| 亚州成人在线电影| 午夜精品久久久久影视| 亚洲一区二区三区爽爽爽爽爽| 中文字幕亚洲一区二区av在线 | 亚洲一区二区黄色| 亚洲香肠在线观看| 性感美女极品91精品| 亚洲 欧美综合在线网络| 亚洲bt欧美bt精品777| 午夜影视日本亚洲欧洲精品| 午夜精品123| 日韩电影免费一区| 激情综合色播五月| 国产精品一区二区在线观看网站| 国产一区91精品张津瑜| 国产成人午夜高潮毛片| 99精品欧美一区二区三区综合在线| 成人一区二区在线观看| 91国在线观看| 在线成人av影院| 欧美成人一区二区三区片免费| 欧美精品一区二区三区很污很色的 | 久99久精品视频免费观看| 国产一区二区网址| 99精品久久只有精品| 欧洲激情一区二区| 精品福利一区二区三区| 国产精品无人区| 亚洲一级二级在线| 久久99国产精品久久99果冻传媒| 国产成人综合自拍| 色播五月激情综合网| 欧美一区永久视频免费观看| 国产视频一区二区在线观看| 亚洲丝袜精品丝袜在线| 日韩电影在线观看电影| 成人性生交大合| 日本道色综合久久| 日韩欧美在线不卡| 亚洲乱码日产精品bd| 美女视频黄免费的久久| 色综合天天综合狠狠| 欧美一区二区三区影视| 综合久久一区二区三区| 麻豆国产一区二区| 91网址在线看| 日韩一二三区视频| 亚洲精品视频在线看| 精品在线播放午夜| 色欧美乱欧美15图片| 欧美xxxx在线观看|