com.jme3.scene.control
クラス LodControl

java.lang.Object
  上位を拡張 com.jme3.scene.control.AbstractControl
      上位を拡張 com.jme3.scene.control.LodControl
すべての実装されたインタフェース:
Savable, Control, java.lang.Cloneable

public class LodControl
extends AbstractControl
implements java.lang.Cloneable

Determines what Level of Detail a spatial should be, based on how many pixels on the screen the spatial is taking up. The more pixels covered, the more detailed the spatial should be. It calculates the area of the screen that the spatial covers by using its bounding box. When initializing, it will ask the spatial for how many triangles it has for each LOD. It then uses that, along with the trisPerPixel value to determine what LOD it should be at. It requires the camera to do this. The controlRender method is called each frame and will update the spatial's LOD if the camera has moved by a specified amount.


コンストラクタの概要
LodControl()
          Creates a new LodControl.
 
メソッドの概要
 Control cloneForSpatial(Spatial spatial)
          Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.
 float getDistTolerance()
          Returns the distance tolerance for changing LOD.
 float getTrisPerPixel()
          Returns the triangles per pixel value.
 void read(JmeImporter im)
           
 void setDistTolerance(float distTolerance)
          Specifies the distance tolerance for changing the LOD level on the geometry.
 void setSpatial(Spatial spatial)
           
 void setTrisPerPixel(float trisPerPixel)
          Sets the triangles per pixel value.
 void write(JmeExporter ex)
           
 
クラス com.jme3.scene.control.AbstractControl から継承されたメソッド
getSpatial, isEnabled, render, setEnabled, update
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LodControl

public LodControl()
Creates a new LodControl.

メソッドの詳細

getDistTolerance

public float getDistTolerance()
Returns the distance tolerance for changing LOD.

戻り値:
the distance tolerance for changing LOD.
関連項目:
setDistTolerance(float)

setDistTolerance

public void setDistTolerance(float distTolerance)
Specifies the distance tolerance for changing the LOD level on the geometry. The LOD level will only get changed if the geometry has moved this distance beyond the current LOD level.

パラメータ:
distTolerance - distance tolerance for changing LOD

getTrisPerPixel

public float getTrisPerPixel()
Returns the triangles per pixel value.

戻り値:
the triangles per pixel value.
関連項目:
setTrisPerPixel(float)

setTrisPerPixel

public void setTrisPerPixel(float trisPerPixel)
Sets the triangles per pixel value. The LodControl will use this value as an error metric to determine which LOD level to use based on the geometry's area on the screen.

パラメータ:
trisPerPixel - triangles per pixel

setSpatial

public void setSpatial(Spatial spatial)
定義:
インタフェース Control 内の setSpatial
オーバーライド:
クラス AbstractControl 内の setSpatial
パラメータ:
spatial - the spatial to be controlled. This should not be called from user code.

cloneForSpatial

public Control cloneForSpatial(Spatial spatial)
インタフェース Control の記述:
Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.

定義:
インタフェース Control 内の cloneForSpatial
戻り値:
A clone of this control for the spatial

write

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

read

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