📄 picktool.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:12 PST 2006 --><TITLE>PickTool (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.pickfast.PickTool class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PickTool (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../com/sun/j3d/utils/pickfast/PickIntersection.html" title="class in com.sun.j3d.utils.pickfast"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/sun/j3d/utils/pickfast/PickTool.html" target="_top"><B>FRAMES</B></A> <A HREF="PickTool.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.sun.j3d.utils.pickfast</FONT><BR>Class PickTool</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.j3d.utils.pickfast.PickTool</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickCanvas.html" title="class in com.sun.j3d.utils.pickfast">PickCanvas</A></DD></DL><HR><DL><DT><PRE>public class <B>PickTool</B><DT>extends java.lang.Object</DL></PRE><P>The base class for optimized picking operations. The picking methods will return a PickInfo object for each object picked, which can then be queried to obtain more detailed information about the specific objects that were picked. <p> The pick mode specifies the detail level of picking before the PickInfo is returned: <p> <UL> <LI> PickInfo.PICK_BOUNDS - Pick using the only bounds of the pickable nodes. </LI> <LI> PickInfo.PICK_GEOMETRY will pick using the geometry of the pickable nodes. Geometry nodes in the scene must have the ALLOW_INTERSECT capability set for this mode.</LI> <p> The pick flags specifies the content of the PickInfo(s) returned by the pick methods. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include : <ul> <code>PickInfo.SCENEGRAPHPATH</code> - request for computed SceneGraphPath.<br> <code>PickInfo.NODE</code> - request for computed intersected Node.<br> <code>PickInfo.LOCAL_TO_VWORLD</code> - request for computed local to virtual world transform.<br> <code>PickInfo.CLOSEST_INTERSECTION_POINT</code> - request for closest intersection point.<br> <code>PickInfo.CLOSEST_DISTANCE</code> - request for the distance of closest intersection.<br> <code>PickInfo.CLOSEST_GEOM_INFO</code> - request for only the closest intersection geometry information.<br> <code>PickInfo.ALL_GEOM_INFO</code> - request for all intersection geometry information.<br> </ul> </UL> <p> When using pickAllSorted or pickClosest methods, the picks will be sorted by the distance from the start point of the pick shape to the intersection point.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Locale.html#pickClosest(int, int, javax.media.j3d.PickShape)"><CODE>Locale.pickClosest(int,int,javax.media.j3d.PickShape)</CODE></A></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_BRANCH_GROUP">TYPE_BRANCH_GROUP</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>BranchGroup</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_GROUP">TYPE_GROUP</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Group</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_LINK">TYPE_LINK</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Link</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_MORPH">TYPE_MORPH</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Morph</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_PRIMITIVE">TYPE_PRIMITIVE</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Primitive</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_SHAPE3D">TYPE_SHAPE3D</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Shape3D</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_SWITCH">TYPE_SWITCH</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>Switch</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#TYPE_TRANSFORM_GROUP">TYPE_TRANSFORM_GROUP</A></B></CODE><BR> Flag to pass to <CODE>getNode(int)</CODE> to return a <code>TransformGroup</code> node from the <code>SceneGraphPath</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#userDefineShape">userDefineShape</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#PickTool(javax.media.j3d.BranchGroup)">PickTool</A></B>(<A HREF="../../../../../javax/media/j3d/BranchGroup.html" title="class in javax.media.j3d">BranchGroup</A> b)</CODE><BR> Constructor with BranchGroup to be picked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#PickTool(javax.media.j3d.Locale)">PickTool</A></B>(<A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d">Locale</A> l)</CODE><BR> Constructor with the Locale to be picked.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/BranchGroup.html" title="class in javax.media.j3d">BranchGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getBranchGroup()">getBranchGroup</A></B>()</CODE><BR> Returns the BranchGroup to be picked if the tool was initialized with a BranchGroup, null otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getFlags()">getFlags</A></B>()</CODE><BR> Gets the PickInfo content flags.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d">Locale</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getLocale()">getLocale</A></B>()</CODE><BR> Returns the Locale to be picked if the tool was initialized with a Locale, null otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getMode()">getMode</A></B>()</CODE><BR> Gets the picking detail mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Node.html" title="class in javax.media.j3d">Node</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getNode(javax.media.j3d.PickInfo, int)">getNode</A></B>(<A HREF="../../../../../javax/media/j3d/PickInfo.html" title="class in javax.media.j3d">PickInfo</A> pickInfo, int type)</CODE><BR> Get the first node of a certain type up the SceneGraphPath</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/PickShape.html" title="class in javax.media.j3d">PickShape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getPickShape()">getPickShape</A></B>()</CODE><BR> Returns the PickShape for this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/vecmath/Point3d.html" title="class in javax.vecmath">Point3d</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#getStartPosition()">getStartPosition</A></B>()</CODE><BR> Returns the start postion used for distance measurement.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/PickInfo.html" title="class in javax.media.j3d">PickInfo</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/pickfast/PickTool.html#pickAll()">pickAll</A></B>()</CODE><BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -