public class LodControl extends AbstractControl implements java.lang.Cloneable, JmeCloneable
enabled, spatial| Constructor and Description |
|---|
LodControl()
Creates a new
LodControl. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
To be implemented in subclass.
|
protected void |
controlUpdate(float tpf)
To be implemented in subclass.
|
float |
getDistTolerance()
Returns the distance tolerance for changing LOD.
|
float |
getTrisPerPixel()
Returns the triangles per pixel value.
|
java.lang.Object |
jmeClone()
Performs a regular shallow clone of the object.
|
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) |
cloneFields, cloneForSpatial, getSpatial, isEnabled, render, setEnabled, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloneFieldspublic float getDistTolerance()
setDistTolerance(float)public void setDistTolerance(float distTolerance)
distTolerance - distance tolerance for changing LODpublic float getTrisPerPixel()
setTrisPerPixel(float)public void setTrisPerPixel(float trisPerPixel)
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 pixelpublic void setSpatial(Spatial spatial)
setSpatial in interface ControlsetSpatial in class AbstractControlspatial - the spatial to be controlled. This should not be called
from user code.public java.lang.Object jmeClone()
JmeCloneableThis method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in.
jmeClone in interface JmeCloneablejmeClone in class AbstractControlprotected void controlUpdate(float tpf)
AbstractControlcontrolUpdate in class AbstractControltpf - time per frame (in seconds)protected void controlRender(RenderManager rm, ViewPort vp)
AbstractControlcontrolRender in class AbstractControlrm - the RenderManager rendering the controlled Spatial (not null)vp - the ViewPort being rendered (not null)public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class AbstractControljava.io.IOExceptionpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class AbstractControljava.io.IOException