⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pickcanvas.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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:13 PST 2006 --><TITLE>PickCanvas (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.picking.PickCanvas class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="PickCanvas (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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../com/sun/j3d/utils/picking/PickIntersection.html" title="class in com.sun.j3d.utils.picking"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html?com/sun/j3d/utils/picking/PickCanvas.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PickCanvas.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.sun.j3d.utils.picking.PickTool">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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.picking</FONT><BR>Class PickCanvas</H2><PRE>java.lang.Object  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html" title="class in com.sun.j3d.utils.picking">com.sun.j3d.utils.picking.PickTool</A>      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.j3d.utils.picking.PickCanvas</B></PRE><HR><DL><DT><PRE>public class <B>PickCanvas</B><DT>extends <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html" title="class in com.sun.j3d.utils.picking">PickTool</A></DL></PRE><P>A subclass of PickTool, simplifies picking using mouse events from a canvas.  This class allows picking using canvas x,y locations by generating the  appropriate pick shape.  <p> The pick tolerance specifies the distance from the pick center to include in the pick shape.  A tolerance of 0.0 may speedup  picking slightly, but also make it very difficult to pick points and lines. <p>  The pick canvas can be used to make a series of picks.  For example, to  initialize the pick canvas: <blockquote><pre>     PickCanvas pickCanvas = new PickCanvas(canvas, scene);     pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);      pickCanvas.setTolerance(4.0f); </pre></blockquote> <p> Then for each mouse event: <blockquote><pre>     pickCanvas.setShapeLocation(mouseEvent);     PickResult[] results = pickCanvas.pickAll(); </pre></blockquote> <p> NOTE: For the pickAllSorted or pickClosest methods, the picks will be sorted by the distance from the ViewPlatform to the intersection point.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html" title="class in com.sun.j3d.utils.picking"><CODE>PickTool</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></TABLE>&nbsp;<A NAME="fields_inherited_from_class_com.sun.j3d.utils.picking.PickTool"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Fields inherited from class com.sun.j3d.utils.picking.<A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html" title="class in com.sun.j3d.utils.picking">PickTool</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#BOUNDS">BOUNDS</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#GEOMETRY">GEOMETRY</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#GEOMETRY_INTERSECT_INFO">GEOMETRY_INTERSECT_INFO</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#INTERSECT_COORD">INTERSECT_COORD</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#INTERSECT_FULL">INTERSECT_FULL</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#INTERSECT_TEST">INTERSECT_TEST</A>, <A HREF="../../../../../com/sun/j3d/utils/picking/PickTool.html#userDefineShape">userDefineShape</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== 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/picking/PickCanvas.html#PickCanvas(javax.media.j3d.Canvas3D, javax.media.j3d.BranchGroup)">PickCanvas</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A>&nbsp;c,           <A HREF="../../../../../javax/media/j3d/BranchGroup.html" title="class in javax.media.j3d">BranchGroup</A>&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor with Canvas3D for mouse events and BranchGroup to be picked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/picking/PickCanvas.html#PickCanvas(javax.media.j3d.Canvas3D, javax.media.j3d.Locale)">PickCanvas</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A>&nbsp;c,           <A HREF="../../../../../javax/media/j3d/Locale.html" title="class in javax.media.j3d">Locale</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor with Canvas3D for mouse events and Locale to be picked.</TD></TR></TABLE>&nbsp;<!-- ========== 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>&nbsp;<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/picking/PickCanvas.html#getCanvas()">getCanvas</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inquire the canvas to be used for picking operations.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/picking/PickCanvas.html#getTolerance()">getTolerance</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the pick tolerance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/picking/PickCanvas.html#setShapeLocation(int, int)">setShapeLocation</A></B>(int&nbsp;xpos,                 int&nbsp;ypos)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the pick location.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -