📄 light.html
字号:
<HR><A NAME="ALLOW_STATE_WRITE"><!-- --></A><H3>ALLOW_STATE_WRITE</H3><PRE>public static final int <B>ALLOW_STATE_WRITE</B></PRE><DL><DD>Specifies that this Light allows write access to its current state information at runtime.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_STATE_WRITE">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_COLOR_READ"><!-- --></A><H3>ALLOW_COLOR_READ</H3><PRE>public static final int <B>ALLOW_COLOR_READ</B></PRE><DL><DD>Specifies that this Light allows read access to its color information at runtime.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_COLOR_READ">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_COLOR_WRITE"><!-- --></A><H3>ALLOW_COLOR_WRITE</H3><PRE>public static final int <B>ALLOW_COLOR_WRITE</B></PRE><DL><DD>Specifies that this Light allows write access to its color information at runtime.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_COLOR_WRITE">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_INFLUENCING_BOUNDS_READ"><!-- --></A><H3>ALLOW_INFLUENCING_BOUNDS_READ</H3><PRE>public static final int <B>ALLOW_INFLUENCING_BOUNDS_READ</B></PRE><DL><DD>Specifies that this Light allows read access to its influencing bounds and bounds leaf information.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_READ">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_INFLUENCING_BOUNDS_WRITE"><!-- --></A><H3>ALLOW_INFLUENCING_BOUNDS_WRITE</H3><PRE>public static final int <B>ALLOW_INFLUENCING_BOUNDS_WRITE</B></PRE><DL><DD>Specifies that this Light allows write access to its influencing bounds and bounds leaf information.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_WRITE">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_SCOPE_READ"><!-- --></A><H3>ALLOW_SCOPE_READ</H3><PRE>public static final int <B>ALLOW_SCOPE_READ</B></PRE><DL><DD>Specifies that this Light allows read access to its scope information at runtime.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_SCOPE_READ">Constant Field Values</A></DL></DL><HR><A NAME="ALLOW_SCOPE_WRITE"><!-- --></A><H3>ALLOW_SCOPE_WRITE</H3><PRE>public static final int <B>ALLOW_SCOPE_WRITE</B></PRE><DL><DD>Specifies that this Light allows write access to its scope information at runtime.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Light.ALLOW_SCOPE_WRITE">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Light()"><!-- --></A><H3>Light</H3><PRE>public <B>Light</B>()</PRE><DL><DD>Constructs a Light node with default parameters. The default values are as follows: <ul> enable flag : true<br> color : white (1,1,1)<br> scope : empty (universe scope)<br> influencing bounds : null<br> influencing bounding leaf : null<br> </ul><P></DL><HR><A NAME="Light(javax.vecmath.Color3f)"><!-- --></A><H3>Light</H3><PRE>public <B>Light</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Constructs and initializes a Light node using the specified color.<P><DT><B>Parameters:</B><DD><CODE>color</CODE> - the color of the light source</DL><HR><A NAME="Light(boolean, javax.vecmath.Color3f)"><!-- --></A><H3>Light</H3><PRE>public <B>Light</B>(boolean lightOn, <A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Constructs and initializes a Light node using the specified enable flag and color.<P><DT><B>Parameters:</B><DD><CODE>lightOn</CODE> - flag indicating whether this light is on or off<DD><CODE>color</CODE> - the color of the light source</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setEnable(boolean)"><!-- --></A><H3>setEnable</H3><PRE>public void <B>setEnable</B>(boolean state)</PRE><DL><DD>Turns the light on or off.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>state</CODE> - true or false to set light on or off<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getEnable()"><!-- --></A><H3>getEnable</H3><PRE>public boolean <B>getEnable</B>()</PRE><DL><DD>Retrieves this Light's current state (on/off).<P><DD><DL><DT><B>Returns:</B><DD>this node's current state (on/off)<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setColor(javax.vecmath.Color3f)"><!-- --></A><H3>setColor</H3><PRE>public void <B>setColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Sets the Light's current color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the value of this node's new color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getColor(javax.vecmath.Color3f)"><!-- --></A><H3>getColor</H3><PRE>public void <B>getColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Gets this Light's current color and places it in the parameter specified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the vector that will receive this node's color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setScope(javax.media.j3d.Group, int)"><!-- --></A><H3>setScope</H3><PRE>public void <B>setScope</B>(<A HREF="../../../javax/media/j3d/Group.html">Group</A> scope, int index)</PRE><DL><DD>Replaces the node at the specified index in this Light node's list of scopes with the specified Group node. By default, Light nodes are scoped only by their influencing bounds. This allows them to be further scoped by a list of nodes in the hierarchy.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>scope</CODE> - the Group node to be stored at the specified index.<DD><CODE>index</CODE> - the index of the Group node to be replaced.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE><A HREF="../../../javax/media/j3d/RestrictedAccessException.html">RestrictedAccessException</A></CODE> - if the specified group node is part of a compiled scene graph</DL></DD></DL><HR><A NAME="getScope(int)"><!-- --></A><H3>getScope</H3><PRE>public <A HREF="../../../javax/media/j3d/Group.html">Group</A> <B>getScope</B>(int index)</PRE><DL><DD>Retrieves the Group node at the specified index from this Light node's list of scopes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the Group node to be returned.<DT><B>Returns:</B><DD>the Group node at the specified index.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="insertScope(javax.media.j3d.Group, int)"><!-- --></A><H3>insertScope</H3><PRE>public void <B>insertScope</B>(<A HREF="../../../javax/media/j3d/Group.html">Group</A> scope, int index)</PRE><DL><DD>Inserts the specified Group node into this Light node's list of scopes at the specified index. By default, Light nodes are scoped only by their influencing bounds. This allows them to be further scoped by a list of nodes in the hierarchy.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>scope</CODE> - the Group node to be inserted at the specified index.<DD><CODE>index</CODE> - the index at which the Group node is inserted.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE><A HREF="../../../javax/media/j3d/RestrictedAccessException.html">RestrictedAccessException</A></CODE> - if the specified group node is part of a compiled scene graph</DL></DD></DL><HR><A NAME="removeScope(int)"><!-- --></A><H3>removeScope</H3><PRE>public void <B>removeScope</B>(int index)</PRE><DL><DD>Removes the node at the specified index from this Light node's list of scopes. If this operation causes the list of scopes to become empty, then this Light will have universe scope: all nodes within the region of influence will be affected by this Light node.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the Group node to be removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE><A HREF="../../../javax/media/j3d/RestrictedAccessException.html">RestrictedAccessException</A></CODE> - if the group node at the specified index is part of a compiled scene graph</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -