📄 spotlight.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:07 PST 2006 --><TITLE>SpotLight (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.SpotLight class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="SpotLight (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="../../../javax/media/j3d/SourceCodeShader.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/Switch.html" title="class in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/media/j3d/SpotLight.html" target="_top"><B>FRAMES</B></A> <A HREF="SpotLight.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">javax.media.j3d</FONT><BR>Class SpotLight</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/Leaf.html" title="class in javax.media.j3d">javax.media.j3d.Leaf</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/Light.html" title="class in javax.media.j3d">javax.media.j3d.Light</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/PointLight.html" title="class in javax.media.j3d">javax.media.j3d.PointLight</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.SpotLight</B></PRE><HR><DL><DT><PRE>public class <B>SpotLight</B><DT>extends <A HREF="../../../javax/media/j3d/PointLight.html" title="class in javax.media.j3d">PointLight</A></DL></PRE><P>The SpotLight object specifies an attenuated light source at a fixed point in space that radiates light in a specified direction from the light source. A SpotLight has the same attributes as a PointLight node, with the addition of the following:<P> <UL> <LI>Direction - The axis of the cone of light. The default direction is (0.0, 0.0, -1.0). The spot light direction is significant only when the spread angle is not PI radians (which it is by default).</LI> <P> <LI>Spread angle - The angle in radians between the direction axis and a ray along the edge of the cone. Note that the angle of the cone at the apex is then twice this value. The range of values is [0.0,PI/2] radians, with a special value of PI radians. Values lower than 0 are clamped to 0 and values over PI/2 are clamped to PI. The default spread angle is PI radians. </LI> <P> <LI>Concentration - Specifies how quickly the light intensity attenuates as a function of the angle of radiation as measured from the direction of radiation. The light's intensity is highest at the center of the cone and is attenuated toward the edges of the cone by the cosine of the angle between the direction of the light and the direction from the light to the object being lit, raised to the power of the spot concentration exponent. The higher the concentration value, the more focused the light source. The range of values is [0.0,128.0]. The default concentration is 0.0, which provides uniform light distribution.</LI><P> </UL> A spot light contributes to diffuse and specular reflections, which depend on the orientation and position of an object's surface. A spot light does not contribute to ambient reflections.<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="../../../javax/media/j3d/SpotLight.html#ALLOW_CONCENTRATION_READ">ALLOW_CONCENTRATION_READ</A></B></CODE><BR> Specifies that the Node allows reading its spot lights concentration information.</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="../../../javax/media/j3d/SpotLight.html#ALLOW_CONCENTRATION_WRITE">ALLOW_CONCENTRATION_WRITE</A></B></CODE><BR> Specifies that the Node allows writing to its spot lights concentration information.</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="../../../javax/media/j3d/SpotLight.html#ALLOW_DIRECTION_READ">ALLOW_DIRECTION_READ</A></B></CODE><BR> Specifies that the Node allows reading its spot lights direction information.</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="../../../javax/media/j3d/SpotLight.html#ALLOW_DIRECTION_WRITE">ALLOW_DIRECTION_WRITE</A></B></CODE><BR> Specifies that the Node allows writing to its spot lights direction information.</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="../../../javax/media/j3d/SpotLight.html#ALLOW_SPREAD_ANGLE_READ">ALLOW_SPREAD_ANGLE_READ</A></B></CODE><BR> Specifies that the Node allows reading its spot lights spread angle information.</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="../../../javax/media/j3d/SpotLight.html#ALLOW_SPREAD_ANGLE_WRITE">ALLOW_SPREAD_ANGLE_WRITE</A></B></CODE><BR> Specifies that the Node allows writing to its spot lights spread angle information.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.media.j3d.PointLight"><!-- --></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/PointLight.html" title="class in javax.media.j3d">PointLight</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/media/j3d/PointLight.html#ALLOW_ATTENUATION_READ">ALLOW_ATTENUATION_READ</A>, <A HREF="../../../javax/media/j3d/PointLight.html#ALLOW_ATTENUATION_WRITE">ALLOW_ATTENUATION_WRITE</A>, <A HREF="../../../javax/media/j3d/PointLight.html#ALLOW_POSITION_READ">ALLOW_POSITION_READ</A>, <A HREF="../../../javax/media/j3d/PointLight.html#ALLOW_POSITION_WRITE">ALLOW_POSITION_WRITE</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.media.j3d.Light"><!-- --></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/Light.html" title="class in javax.media.j3d">Light</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/media/j3d/Light.html#ALLOW_COLOR_READ">ALLOW_COLOR_READ</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_COLOR_WRITE">ALLOW_COLOR_WRITE</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_INFLUENCING_BOUNDS_READ">ALLOW_INFLUENCING_BOUNDS_READ</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_INFLUENCING_BOUNDS_WRITE">ALLOW_INFLUENCING_BOUNDS_WRITE</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_SCOPE_READ">ALLOW_SCOPE_READ</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_SCOPE_WRITE">ALLOW_SCOPE_WRITE</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_STATE_READ">ALLOW_STATE_READ</A>, <A HREF="../../../javax/media/j3d/Light.html#ALLOW_STATE_WRITE">ALLOW_STATE_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="../../../javax/media/j3d/SpotLight.html#SpotLight()">SpotLight</A></B>()</CODE><BR> Constructs a SpotLight node with default parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/SpotLight.html#SpotLight(boolean, javax.vecmath.Color3f, javax.vecmath.Point3f, javax.vecmath.Point3f, javax.vecmath.Vector3f, float, float)">SpotLight</A></B>(boolean lightOn, <A HREF="../../../javax/vecmath/Color3f.html" title="class in javax.vecmath">Color3f</A> color, <A HREF="../../../javax/vecmath/Point3f.html" title="class in javax.vecmath">Point3f</A> position, <A HREF="../../../javax/vecmath/Point3f.html" title="class in javax.vecmath">Point3f</A> attenuation, <A HREF="../../../javax/vecmath/Vector3f.html" title="class in javax.vecmath">Vector3f</A> direction, float spreadAngle,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -