📄 box.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>Box (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.geometry.Box class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Box (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"> PREV CLASS <A HREF="../../../../../com/sun/j3d/utils/geometry/ColorCube.html" title="class in com.sun.j3d.utils.geometry"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/sun/j3d/utils/geometry/Box.html" target="_top"><B>FRAMES</B></A> <A HREF="Box.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.geometry</FONT><BR>Class Box</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../javax/media/j3d/SceneGraphObject.html" title="class in javax.media.j3d">javax.media.j3d.SceneGraphObject</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../javax/media/j3d/Node.html" title="class in javax.media.j3d">javax.media.j3d.Node</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../javax/media/j3d/Group.html" title="class in javax.media.j3d">javax.media.j3d.Group</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html" title="class in com.sun.j3d.utils.geometry">com.sun.j3d.utils.geometry.Primitive</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.j3d.utils.geometry.Box</B></PRE><HR><DL><DT><PRE>public class <B>Box</B><DT>extends <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html" title="class in com.sun.j3d.utils.geometry">Primitive</A></DL></PRE><P>Box is a geometry primitive created with a given length, width, and height. It is centered at the origin. By default, it lies within the bounding box, [-1,-1,-1] and [1,1,1]. When a texture is applied to a box, it is map CCW like on a Cylinder. A texture is mapped CCW from the back of the body. The top and bottom faces are mapped such that the texture appears front facing when the faces are rotated 90 toward the viewer. <p> By default all primitives with the same parameters share their geometry (e.g., you can have 50 shperes in your scene, but the geometry is stored only once). A change to one primitive will effect all shared nodes. Another implication of this implementation is that the capabilities of the geometry are shared, and once one of the shared nodes is live, the capabilities cannot be set. Use the GEOMETRY_NOT_SHARED flag if you do not wish to share geometry among primitives with the same parameters.<P><P><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/geometry/Box.html#BACK">BACK</A></B></CODE><BR> Used to designate the back side of the box when using getShape().</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/geometry/Box.html#BOTTOM">BOTTOM</A></B></CODE><BR> Used to designate the bottom side of the box when using getShape().</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/geometry/Box.html#FRONT">FRONT</A></B></CODE><BR> Used to designate the front side of the box when using getShape().</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/geometry/Box.html#LEFT">LEFT</A></B></CODE><BR> Used to designate the left side of the box when using getShape().</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/geometry/Box.html#RIGHT">RIGHT</A></B></CODE><BR> Used to designate the right side of the box when using getShape().</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/geometry/Box.html#TOP">TOP</A></B></CODE><BR> Used to designate the top side of the box when using getShape().</TD></TR></TABLE> <A NAME="fields_inherited_from_class_com.sun.j3d.utils.geometry.Primitive"><!-- --></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.geometry.<A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html" title="class in com.sun.j3d.utils.geometry">Primitive</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#ENABLE_APPEARANCE_MODIFY">ENABLE_APPEARANCE_MODIFY</A>, <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#ENABLE_GEOMETRY_PICKING">ENABLE_GEOMETRY_PICKING</A>, <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#GENERATE_NORMALS">GENERATE_NORMALS</A>, <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#GENERATE_NORMALS_INWARD">GENERATE_NORMALS_INWARD</A>, <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#GENERATE_TEXTURE_COORDS">GENERATE_TEXTURE_COORDS</A>, <A HREF="../../../../../com/sun/j3d/utils/geometry/Primitive.html#GEOMETRY_NOT_SHARED">GEOMETRY_NOT_SHARED</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.media.j3d.Group"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Fields inherited from class javax.media.j3d.<A HREF="../../../../../javax/media/j3d/Group.html" title="class in javax.media.j3d">Group</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../javax/media/j3d/Group.html#ALLOW_CHILDREN_EXTEND">ALLOW_CHILDREN_EXTEND</A>, <A HREF="../../../../../javax/media/j3d/Group.html#ALLOW_CHILDREN_READ">ALLOW_CHILDREN_READ</A>, <A HREF="../../../../../javax/media/j3d/Group.html#ALLOW_CHILDREN_WRITE">ALLOW_CHILDREN_WRITE</A>, <A HREF="../../../../../javax/media/j3d/Group.html#ALLOW_COLLISION_BOUNDS_READ">ALLOW_COLLISION_BOUNDS_READ</A>, <A HREF="../../../../../javax/media/j3d/Group.html#ALLOW_COLLISION_BOUNDS_WRITE">ALLOW_COLLISION_BOUNDS_WRITE</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.media.j3d.Node"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Fields inherited from class javax.media.j3d.<A HREF="../../../../../javax/media/j3d/Node.html" title="class in javax.media.j3d">Node</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_AUTO_COMPUTE_BOUNDS_READ">ALLOW_AUTO_COMPUTE_BOUNDS_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_AUTO_COMPUTE_BOUNDS_WRITE">ALLOW_AUTO_COMPUTE_BOUNDS_WRITE</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_BOUNDS_READ">ALLOW_BOUNDS_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_BOUNDS_WRITE">ALLOW_BOUNDS_WRITE</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_COLLIDABLE_READ">ALLOW_COLLIDABLE_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_COLLIDABLE_WRITE">ALLOW_COLLIDABLE_WRITE</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_LOCAL_TO_VWORLD_READ">ALLOW_LOCAL_TO_VWORLD_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_LOCALE_READ">ALLOW_LOCALE_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_PARENT_READ">ALLOW_PARENT_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_PICKABLE_READ">ALLOW_PICKABLE_READ</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ALLOW_PICKABLE_WRITE">ALLOW_PICKABLE_WRITE</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ENABLE_COLLISION_REPORTING">ENABLE_COLLISION_REPORTING</A>, <A HREF="../../../../../javax/media/j3d/Node.html#ENABLE_PICK_REPORTING">ENABLE_PICK_REPORTING</A></CODE></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/geometry/Box.html#Box()">Box</A></B>()</CODE><BR> Constructs a default box of 1.0 in all dimensions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/geometry/Box.html#Box(float, float, float, javax.media.j3d.Appearance)">Box</A></B>(float xdim, float ydim, float zdim, <A HREF="../../../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d">Appearance</A> ap)</CODE><BR> Constructs a box of a given dimension and appearance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/geometry/Box.html#Box(float, float, float, int, javax.media.j3d.Appearance)">Box</A></B>(float xdim, float ydim, float zdim, int primflags, <A HREF="../../../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d">Appearance</A> ap)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/geometry/Box.html#Box(float, float, float, int, javax.media.j3d.Appearance, int)">Box</A></B>(float xdim, float ydim, float zdim, int primflags, <A HREF="../../../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d">Appearance</A> ap, int numTexUnit)</CODE><BR> Constructs a box of a given dimension, flags, and appearance.</TD></TR></TABLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -