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

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

?? intersect.java

?? JAVA3D矩陳的相關類
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * $RCSfile: Intersect.java,v $ * * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistribution of source code must retain the above copyright *   notice, this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright *   notice, this list of conditions and the following disclaimer in *   the documentation and/or other materials provided with the *   distribution. * * Neither the name of Sun Microsystems, Inc. or the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * This software is provided "AS IS," without a warranty of any * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed, licensed or * intended for use in the design, construction, operation or * maintenance of any nuclear facility. * * $Revision: 1.4 $ * $Date: 2007/02/09 17:20:13 $ * $State: Exp $ */package com.sun.j3d.utils.behaviors.picking;import javax.media.j3d.*;import javax.vecmath.*;import java.lang.Math;import com.sun.j3d.internal.J3dUtilsI18N;/* * Contains static methods to aid in the intersection test between * various PickShape classes and geometry primitives (such as quad, * triangle, line and point).  *//** * @deprecated As of Java 3D version 1.2, this class is no * longer needed */public class Intersect{    /**   * Determines if the <code>PickRay</code> and quadrilateral   * objects intersect.   * The quadrilateral is defined as <code>coordinates[index]</code> to   * <code>coordinates[index+3]</code>.   *   * @param ray The ray to use in the intersection test.   * @param coordinates An array holding the quadrilateral data.   * @param index An array index that designates the starting position   *  in the array of the quadrilateral to test.   * @param dist On return dist[0] will be set to the distance between ray's    * origin and the point of intersection, if it exists.     * The dist array should be allocated by the user.   * @return <code>true</code> if the ray intersects the quad,   *  <code>false</code> if the ray does not intersect the object.   */   public static boolean rayAndQuad( PickRay ray, Point3d coordinates[], 				    int index, double dist[] ) {        if((coordinates.length - index) < 4)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect0"));       Point3d pnts[] = new Point3d[4];        for(int i=0; i<4; i++)      pnts[i] = coordinates[index+i];       return rayAndPoly(pnts, ray, dist);      }  /**   * Return true if triangle intersects with ray and the distance, from   * the origin of ray to the intersection point, is stored in dist[0].   * The triangle is defined by coordinates[index] to coordinates[index+2]   * <code>coordinates[index+2]</code>.   *   * @param ray The ray to use in the intersection test.   * @param coordinates An array holding the triangle data.   * @param index An array index that designates the starting position   *  in the array of the triangle to test.   * @param dist On return dist[0] will be set to the distance between ray's origin and the   *  point of intersection, if it exists.  The dist array should be   *  allocated by the user.   * @return <code>true</code> if the ray intersects the triangle,   *  <code>false</code> if the ray does not intersect the object.   */  public static boolean rayAndTriangle( PickRay ray, Point3d coordinates[],					int index, double dist[] ) {        if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect1"));       Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = coordinates[index+i];        return rayAndPoly(pnts, ray, dist);      }  /**   * Return true if triangle intersects with ray and the distance, from   * the origin of ray to the intersection point, is stored in dist[0].   * The triangle is defined by coordinates[index] to coordinates[index+2]   *   * @param ray The ray that is used in intersection test.   * @param coordinates an array of vertices.   * @param index the vertex index   * @param dist On return dist[0] will be set to the distance between ray's origin and the point intersection, if   * exist.   * @return true if ray intersects triangle, else return false.   */     public static boolean rayAndTriangle( PickRay ray, Point3f coordinates[],					int index, double dist[] ) {        if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect1"));       Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = new Point3d(coordinates[index+i]);        return rayAndPoly(pnts, ray, dist);      }      /**   * Caluates the intersection between a <code>PickSegment</code>   * object and a quadrilateral.   * The quad is defined as coordinates[index] to coordinates[index+3]   *   * @param segment The segment to use in the intersection test.   * @param coordinates An array holding the quadrilateral data.   * @param index An array index that designates the starting position   *  in the array of the quadrilateral to test.   * @param dist On return dist[0] will be set to the distance between the start of the segment   *   and the point of intersection, if it exists.  The dist array   *   should be allocated by the user.   * @return <code>true</code> if the segment intersects the quad,   *  <code>false</code> if the segment does not intersect the object.   */  public static boolean segmentAndQuad( PickSegment segment,                                        Point3d coordinates[],					int index, double dist[] ) {    if((coordinates.length - index) < 4)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect3"));       Point3d pnts[] = new Point3d[4];    for(int i=0; i<4; i++)      pnts[i] = coordinates[index+i];        return segmentAndPoly(pnts, segment, dist);      }  /**   * Return true if quad intersects with segment and the distance, from   * the start of segment to the intersection point, is stored in dist[0].   * The quad is defined by coordinates[index] to coordinates[index+3]   *   * @param segment The segment that is used in intersection test.   * @param coordinates an array of vertices.   * @param index the vertex index   * @param dist On return dist[0] will be set to the distance between segment's start and the point    * intersection, if exist.   * @return true if segment intersects quad, else return false.   */     public static boolean segmentAndQuad( PickSegment segment, Point3f coordinates[],					int index, double dist[] ) {    if((coordinates.length - index) < 4)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect3"));       Point3d pnts[] = new Point3d[4];        for(int i=0; i<4; i++)      pnts[i] = new Point3d(coordinates[index+i]);        return segmentAndPoly(pnts, segment, dist);      }    /**   * Caluates the intersection between a <code>PickSegment</code>   * object and a triangle.   * The triangle is defined as coordinates[index] to coordinates[index+2]   *   * @param segment The segment to use in the intersection test.   * @param coordinates An array holding the triangle data.   * @param index An array index that designates the starting position   *  in the array of the triangle to test.   * @param dist On return dist[0] contains the distance between the start of the segment   *   and the point of intersection, if it exists.  The dist array   *   should be allocated by the user.   * @return <code>true</code> if the segment intersects the triangle,   *  <code>false</code> if the segment does not intersect the object.   */  public static boolean segmentAndTriangle( PickSegment segment,                                             Point3d coordinates[],                                            int index,  					    double dist[] ) {    if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect5"));        Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = coordinates[index+i];        return segmentAndPoly(pnts, segment, dist);      }  /**   * Return true if triangle intersects with segment and the distance, from   * the start of segment to the intersection point, is stored in dist[0].   * The triangle is defined by coordinates[index] to coordinates[index+2]   *   * @param segment The segment that is used in intersection test.   * @param coordinates an array of vertices.   * @param index the vertex index   * @param dist On return dist[0] will be set to the distance between segment's start and the point    * intersection, if exist.   * @return true if segment intersects triangle, else return false.   */     public static boolean segmentAndTriangle( PickSegment segment, 					    Point3f coordinates[], int index,  					    double dist[] ) {    if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect6"));        Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = new Point3d(coordinates[index+i]);        return segmentAndPoly(pnts, segment, dist);      }   /**   * Caluates the intersection between a <code>PickPoint</code>   * object and a quadrilateral.   * The quad is defined as <code>coordinates[index]</code> to   * <code>coordinates[index+3]</code>.   *   * @param point The point to use in the intersection test.   * @param coordinates An array holding the quadrilateral data.   * @param index An array index that designates the starting position   *  in the array of the quadrilateral to test.   * @return <code>true</code> if the point intersects the quad,   *  <code>false</code> if the point does not intersect the object.   */  private static boolean pointAndQuad( PickPoint point,                                       Point3d coordinates[],				       int index) {    if((coordinates.length - index) < 4)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect7"));           Point3d pnts[] = new Point3d[4];        for(int i=0; i<4; i++)      pnts[i] = coordinates[index+i];        return pointAndPoly( pnts, point);  }  /**   * Return true if quad intersects with point.   * The triangle is defined by coordinates[index] to coordinates[index+3]   *   * @param point The point that is used in intersection test.   * @param coordinates an array of vertices.   * @param index the vertex index   * @return true if point intersects quad, else return false.   */   private static boolean pointAndQuad( PickPoint point, Point3f coordinates[],				       int index) {    if((coordinates.length - index) < 4)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect7"));           Point3d pnts[] = new Point3d[4];        for(int i=0; i<4; i++)      pnts[i] = new Point3d(coordinates[index+i]);        return pointAndPoly( pnts, point);      }  /**   * Caluates the intersection between a <code>PickPoint</code>   * object and a triangle.   * The triangle is defined by <code>coordinates[index]</code> to   * <code>coordinates[index+2]</code>.   *   * @param point The point to use in the intersection test.   * @param coordinates An array holding the triangle data.   * @param index An array index that designates the starting position   *  in the array of the triangle to test.   * @return <code>true</code> if the point intersects the triangle,   *  <code>false</code> if the point does not intersect the object.   */  private static boolean pointAndTriangle( PickPoint point,                                           Point3d coordinates[],					   int index) {    if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect9"));           Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = coordinates[index+i];        return pointAndPoly( pnts, point);      }  /**   * Return true if triangle intersects with point.   * The triangle is defined by coordinates[index] to coordinates[index+2]   *   * @param point The point that is used in intersection test.   * @param coordinates an array of vertices.   * @param index the vertex index   * @return true if point intersects triangle, else return false.   */   private static boolean pointAndTriangle( PickPoint point, Point3f coordinates[],					   int index) {    if((coordinates.length - index) < 3)       throw new RuntimeException(J3dUtilsI18N.getString("Intersect10"));           Point3d pnts[] = new Point3d[3];        for(int i=0; i<3; i++)      pnts[i] = new Point3d(coordinates[index+i]);        return pointAndPoly( pnts, point);      }  /**   * Determines if the <code>PickRay</code> and <code>Point3d</code>   * objects intersect.   *   * @param ray The ray that is used in the intersection test.   * @param pnt The point that is used in intersection test.   * @param dist On return dist[0] will be set to the distance between ray's origin and the point    * of intersection, if it exists. The dist array   * should be allocated by the user.   * @return <code>true</code> if the ray intersects the point,   *  <code>false</code> if the ray does not intersect the object.   */   public static boolean rayAndPoint( PickRay ray, Point3d pnt,                                                  double dist[] ) {        Point3d origin = new Point3d();    Vector3d direction = new Vector3d();        ray.get(origin, direction);        return rayAndPoint(pnt, origin, direction, dist);  }  /**   * Return true if point intersects with ray and the distance, from   * the origin of ray to the intersection point, is stored in dist[0].   *   * @param ray The ray that is used in intersection test.   * @param pnt The point that is used in intersection test.   * @param dist On return dist[0] contains the distance between ray's origin and the point    * intersection, if exist.   * @return true if ray intersects point, else return false.   */     public static boolean rayAndPoint( PickRay ray, Point3f pnt, double dist[] ) {        Point3d origin = new Point3d();    Vector3d direction = new Vector3d();        ray.get(origin, direction);      return rayAndPoint(new Point3d(pnt), origin, direction, dist);  }    /**   * Determines if the <code>PickSegment</code> and <code>Point3d</code>   * objects intersect.     *   * @param segment The segment that is used in the intersection test.   * @param pnt The point that is used in intersection test.   * @param dist On return dist[0] contains the distance between segment's origin and the point   * of intersection, if it exists. The dist array

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本不卡视频在线| 欧美日韩精品久久久| 欧美一a一片一级一片| 久久亚洲二区三区| 亚洲h精品动漫在线观看| 成人午夜又粗又硬又大| 日韩欧美国产精品| 亚洲国产aⅴ天堂久久| 91香蕉视频污在线| 久久久久久久久久美女| 乱中年女人伦av一区二区| 在线视频你懂得一区二区三区| 久久嫩草精品久久久久| 免费人成网站在线观看欧美高清| 色综合久久久网| 中文字幕亚洲在| 国产成人免费视频一区| 久久蜜桃一区二区| 久草精品在线观看| 日韩欧美一区中文| 五月婷婷综合激情| 在线播放欧美女士性生活| 一区二区三区加勒比av| 91尤物视频在线观看| 国产精品女主播av| 99久久婷婷国产综合精品电影| 国产日韩欧美精品在线| 国产二区国产一区在线观看| 久久久精品中文字幕麻豆发布| 卡一卡二国产精品 | 精品午夜一区二区三区在线观看| 欧美亚洲综合色| 亚洲一卡二卡三卡四卡 | 丰满放荡岳乱妇91ww| 久久精品一区二区三区不卡 | 免费高清在线一区| 日韩亚洲欧美成人一区| 久久国产婷婷国产香蕉| 欧美精品一区二区三区蜜桃| 国内精品伊人久久久久影院对白| 精品国产成人在线影院| 国产黄色精品网站| 亚洲欧美日韩国产综合在线| 一本久道久久综合中文字幕| 亚洲成a天堂v人片| 日韩欧美亚洲国产另类| 国产在线国偷精品产拍免费yy| 久久精品人人做人人爽97| 99在线热播精品免费| 亚洲一区欧美一区| 91精品在线观看入口| 黄色日韩三级电影| 亚洲视频一区在线| 8x8x8国产精品| 色综合天天综合色综合av | 亚洲国产视频一区| 欧美一区二区三区视频免费| 8x8x8国产精品| 中文字幕精品一区二区三区精品| 国产精品久久久久影院| 亚洲国产一区二区三区| 成人aa视频在线观看| 日韩亚洲电影在线| 亚洲资源在线观看| av色综合久久天堂av综合| 欧美va亚洲va在线观看蝴蝶网| 亚洲欧美电影院| 成人妖精视频yjsp地址| 久久久综合激的五月天| 视频一区二区三区中文字幕| 色婷婷国产精品综合在线观看| 国产丝袜欧美中文另类| 国产成人在线视频播放| 久久网站最新地址| 国产精品一色哟哟哟| www精品美女久久久tv| 久99久精品视频免费观看| 欧美一区二区三区男人的天堂| 日欧美一区二区| 日韩免费电影一区| 国产成人午夜片在线观看高清观看| 欧美一级久久久| 国产成人在线视频播放| 中文字幕在线免费不卡| 欧美综合视频在线观看| 奇米在线7777在线精品 | 久久色中文字幕| 91老师片黄在线观看| 麻豆精品久久精品色综合| 中文字幕精品综合| 欧美一级在线观看| 99热国产精品| 免费看日韩精品| 亚洲手机成人高清视频| 亚洲精品一区二区三区香蕉| av午夜精品一区二区三区| 久久97超碰国产精品超碰| 亚洲自拍偷拍网站| 亚洲欧洲av色图| 国产网站一区二区三区| 91麻豆精品国产无毒不卡在线观看| 国产一区二区视频在线播放| 日本亚洲三级在线| 亚洲bdsm女犯bdsm网站| 国产精品久久久久久久久免费丝袜| 这里只有精品免费| 欧美日韩视频在线第一区| 不卡av在线免费观看| 国产成人av一区| 国产精品一区二区在线观看不卡 | 日本不卡一区二区三区| 亚洲九九爱视频| 亚洲无人区一区| 亚洲va国产天堂va久久en| 亚洲视频电影在线| 一级做a爱片久久| 秋霞av亚洲一区二区三| 久久99精品久久久久| 国产精品系列在线播放| 福利电影一区二区三区| 99视频精品免费视频| 欧美三级欧美一级| 日韩一区二区免费在线观看| 26uuu亚洲| 亚洲老妇xxxxxx| 奇米888四色在线精品| 国产精品自拍在线| 一本一道综合狠狠老| 91精品免费在线| 中文字幕日韩精品一区| 亚洲mv大片欧洲mv大片精品| 韩国视频一区二区| 91丨九色丨蝌蚪富婆spa| 日韩午夜精品电影| 亚洲欧美色一区| 国产91富婆露脸刺激对白| 在线观看中文字幕不卡| 久久青草国产手机看片福利盒子| 亚洲综合色区另类av| 国产精品综合视频| 日韩三级免费观看| 亚洲一区二区在线免费看| 国产剧情在线观看一区二区| 欧美日韩一区二区三区高清| 欧美极品美女视频| 国产专区综合网| 欧美一区二区三区精品| 午夜精品久久久久久久久久久| 大胆欧美人体老妇| 久久一区二区视频| 国产在线麻豆精品观看| 日韩一级片在线观看| 日本三级韩国三级欧美三级| 欧美电影在哪看比较好| 五月婷婷久久综合| 日韩欧美中文字幕精品| 青娱乐精品视频| 久久综合久久鬼色中文字| 国产真实精品久久二三区| 精品欧美一区二区三区精品久久 | 午夜婷婷国产麻豆精品| 91成人在线免费观看| 亚洲一区欧美一区| 欧美精品精品一区| 六月丁香综合在线视频| 2017欧美狠狠色| 成人av免费网站| 视频精品一区二区| 精品入口麻豆88视频| av电影在线观看完整版一区二区| 国产精品久久久久久久久果冻传媒 | 欧美一区二区三区免费| 国产乱码精品一品二品| 最新不卡av在线| 91精品国产aⅴ一区二区| 国产精品91一区二区| 亚洲高清久久久| 国产亚洲精品久| 欧美亚洲一区二区三区四区| 久久精品国产成人一区二区三区| 国产精品青草久久| 欧美电影免费观看高清完整版| www.在线成人| 国产一区二区按摩在线观看| 亚洲v中文字幕| 一区二区三区在线高清| 欧美高清一级片在线观看| 4438成人网| 91福利视频网站| 99久久久精品免费观看国产蜜| 免费视频一区二区| 日韩高清欧美激情| 亚洲超碰精品一区二区| 亚洲一区自拍偷拍| 亚洲欧美精品午睡沙发| 成人免费在线播放视频| 国产精品乱人伦| 亚洲天堂免费看| 亚洲一区二区在线免费观看视频| 国产欧美日韩在线观看|