com.jme3.light
クラス LightList

java.lang.Object
  上位を拡張 com.jme3.light.LightList
すべての実装されたインタフェース:
Savable, java.lang.Cloneable, java.lang.Iterable<Light>

public final class LightList
extends java.lang.Object
implements java.lang.Iterable<Light>, Savable, java.lang.Cloneable

LightList is used internally by Spatials to manage lights that are attached to them.


コンストラクタの概要
LightList()
          Default constructor for serialization.
LightList(Spatial owner)
          Creates a LightList for the given Spatial.
 
メソッドの概要
 void add(Light l)
          Adds a light to the list.
 void clear()
          Resets list size to 0.
 LightList clone()
           
 Light get(int num)
           
 java.util.Iterator<Light> iterator()
          Returns an iterator that can be used to iterate over this LightList.
 void read(JmeImporter im)
           
 void remove(int index)
          Remove the light at the given index.
 void remove(Light l)
          Removes the given light from the LightList.
 void setOwner(Spatial owner)
          Set the owner of the LightList.
 int size()
           
 void sort(boolean transformChanged)
          Sorts the elements in the list acording to their Comparator.
 void update(LightList local, LightList parent)
          Updates a "world-space" light list, using the spatial's local-space light list and its parent's world-space light list.
 void write(JmeExporter ex)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LightList

public LightList()
Default constructor for serialization. Do not use


LightList

public LightList(Spatial owner)
Creates a LightList for the given Spatial.

パラメータ:
owner - The spatial owner
メソッドの詳細

setOwner

public void setOwner(Spatial owner)
Set the owner of the LightList. Only used for cloning.

パラメータ:
owner -

add

public void add(Light l)
Adds a light to the list. List size is doubled if there is no room.

パラメータ:
l - The light to add.

remove

public void remove(int index)
Remove the light at the given index.

パラメータ:
index -

remove

public void remove(Light l)
Removes the given light from the LightList.

パラメータ:
l - the light to remove

size

public int size()
戻り値:
The size of the list.

get

public Light get(int num)
戻り値:
the light at the given index.
例外:
java.lang.IndexOutOfBoundsException - If the given index is outside bounds.

clear

public void clear()
Resets list size to 0.


sort

public void sort(boolean transformChanged)
Sorts the elements in the list acording to their Comparator. There are two reasons why lights should be resorted. First, if the lights have moved, that means their distance to the spatial changed. Second, if the spatial itself moved, it means the distance from it to the individual lights might have changed.

パラメータ:
transformChanged - Whether the spatial's transform has changed

update

public void update(LightList local,
                   LightList parent)
Updates a "world-space" light list, using the spatial's local-space light list and its parent's world-space light list.

パラメータ:
local -
parent -

iterator

public java.util.Iterator<Light> iterator()
Returns an iterator that can be used to iterate over this LightList.

定義:
インタフェース java.lang.Iterable<Light> 内の iterator
戻り値:
an iterator that can be used to iterate over this LightList.

clone

public LightList clone()
オーバーライド:
クラス java.lang.Object 内の clone

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException