Package com.jme3.scene.control
Class UpdateControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.scene.control.UpdateControl
- All Implemented Interfaces:
- Savable,- Control,- JmeCloneable,- Cloneable
Allows for enqueueing tasks onto the update loop / rendering thread.
 
 Usage:
 mySpatial.addControl(new UpdateControl()); // add it once
 mySpatial.getControl(UpdateControl.class).enqueue(new Callable() {
        public Object call() throws Exception {
            // do stuff here
            return null;
        }
    });
- 
Field SummaryFields inherited from class com.jme3.scene.control.AbstractControlenabled, spatial
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcontrolRender(RenderManager rm, ViewPort vp) To be implemented in subclass.protected voidcontrolUpdate(float tpf) To be implemented in subclass.<V> Future<V> Enqueues a task/callable object to execute in the jME3 rendering thread.jmeClone()Performs a regular shallow clone of the object.Methods inherited from class com.jme3.scene.control.AbstractControlcloneFields, cloneForSpatial, getSpatial, isEnabled, read, render, setEnabled, setSpatial, update, write
- 
Constructor Details- 
UpdateControlpublic UpdateControl()
 
- 
- 
Method Details- 
enqueueEnqueues a task/callable object to execute in the jME3 rendering thread.- Type Parameters:
- V- type of result returned by the Callable
- Parameters:
- callable- the Callable to run
- Returns:
- a new instance
 
- 
controlUpdateprotected void controlUpdate(float tpf) Description copied from class:AbstractControlTo be implemented in subclass.- Specified by:
- controlUpdatein class- AbstractControl
- Parameters:
- tpf- time per frame (in seconds)
 
- 
controlRenderDescription copied from class:AbstractControlTo be implemented in subclass.- Specified by:
- controlRenderin class- AbstractControl
- Parameters:
- rm- the RenderManager rendering the controlled Spatial (not null)
- vp- the ViewPort being rendered (not null)
 
- 
jmeCloneDescription copied from interface:JmeCloneablePerforms a regular shallow clone of the object. Some fields may also be cloned but generally only if they will never be shared with other objects. (For example, local Vector3fs and so on.)This 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. - Specified by:
- jmeClonein interface- JmeCloneable
- Overrides:
- jmeClonein class- AbstractControl
- Returns:
- a new instance
 
 
-