com.jme3.light
クラス SpotLight

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

public class SpotLight
extends Light
implements Savable

Represents a spot light. A spot light emmit a cone of light from a position and in a direction. It can be used to fake torch lights or car's lights.

In addition to a position and a direction, spot lights also have a range which can be used to attenuate the influence of the light depending on the distance between the light and the effected object. Also the angle of the cone can be tweaked by changing the spot inner angle and the spot outer angle. the spot inner angle determin the cone of light where light has full influence. the spot outer angle determin the cone global cone of light of the spot light. the light intensity slowly decrease between the inner cone and the outer cone.


入れ子のクラスの概要
 
クラス com.jme3.light.Light から継承された入れ子のクラス/インタフェース
Light.Type
 
コンストラクタの概要
SpotLight()
           
 
メソッドの概要
 Vector3f getDirection()
           
 float getInvSpotRange()
          for internal use only
 float getPackedAngleCos()
          for internal use only
 Vector3f getPosition()
           
 float getSpotInnerAngle()
          returns the spot inner angle
 float getSpotOuterAngle()
          returns the spot outer angle
 float getSpotRange()
           
 Light.Type getType()
          Returns the light type
 void read(JmeImporter im)
           
 void setDirection(Vector3f direction)
           
 void setPosition(Vector3f position)
           
 void setSpotInnerAngle(float spotInnerAngle)
          Sets the inner angle of the cone of influence.
 void setSpotOuterAngle(float spotOuterAngle)
          Sets the outer angle of the cone of influence.
 void setSpotRange(float spotRange)
          Set the range of the light influence.
 void write(JmeExporter ex)
           
 
クラス com.jme3.light.Light から継承されたメソッド
clone, getColor, getName, setColor, setName
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SpotLight

public SpotLight()
メソッドの詳細

getType

public Light.Type getType()
クラス Light の記述:
Returns the light type

定義:
クラス Light 内の getType
戻り値:
the light type
関連項目:
Light.Type

getDirection

public Vector3f getDirection()

setDirection

public void setDirection(Vector3f direction)

getPosition

public Vector3f getPosition()

setPosition

public void setPosition(Vector3f position)

getSpotRange

public float getSpotRange()

setSpotRange

public void setSpotRange(float spotRange)
Set the range of the light influence.

Setting a non-zero range indicates the light should use attenuation. If a pixel's distance to this light's position is greater than the light's range, then the pixel will not be effected by this light, if the distance is less than the range, then the magnitude of the influence is equal to distance / range.

パラメータ:
spotRange - the range of the light influence.
例外:
java.lang.IllegalArgumentException - If spotRange is negative

getInvSpotRange

public float getInvSpotRange()
for internal use only

戻り値:
the inverse of the spot range

getSpotInnerAngle

public float getSpotInnerAngle()
returns the spot inner angle

戻り値:
the spot inner angle

setSpotInnerAngle

public void setSpotInnerAngle(float spotInnerAngle)
Sets the inner angle of the cone of influence. This angle is the angle between the spot direction axis and the inner border of the cone of influence.

パラメータ:
spotInnerAngle -

getSpotOuterAngle

public float getSpotOuterAngle()
returns the spot outer angle

戻り値:
the spot outer angle

setSpotOuterAngle

public void setSpotOuterAngle(float spotOuterAngle)
Sets the outer angle of the cone of influence. This angle is the angle between the spot direction axis and the outer border of the cone of influence. this should be greater than the inner angle or the result will be unexpected.

パラメータ:
spotOuterAngle -

getPackedAngleCos

public float getPackedAngleCos()
for internal use only

戻り値:
the cosines of the inner and outter angle packed in a float

write

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

read

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