Package com.simsilica.lemur.core
Class AbstractNodeControl<T>
java.lang.Object
com.jme3.scene.control.AbstractControl
com.simsilica.lemur.core.AbstractNodeControl<T>
- All Implemented Interfaces:
Savable
,Control
,JmeCloneable
,Cloneable
- Direct Known Subclasses:
GuiControl
A default abstract implementation of a Control that
will only allow attachment to a Node and provides a special
getNode() method to subclasses.
-
Field Summary
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
attach()
protected void
controlRender
(RenderManager rm, ViewPort vp) To be implemented in subclass.protected void
controlUpdate
(float tpf) To be implemented in subclass.protected abstract void
detach()
protected Node
getNode()
void
Methods inherited from class com.jme3.scene.control.AbstractControl
cloneFields, cloneForSpatial, getSpatial, isEnabled, jmeClone, read, render, setEnabled, update, write
-
Constructor Details
-
Method Details
-
getNode
-
setSpatial
- Specified by:
setSpatial
in interfaceControl
- Overrides:
setSpatial
in classAbstractControl
- Parameters:
s
- the spatial to be controlled. This should not be called from user code.
-
attach
protected abstract void attach() -
detach
protected abstract void detach() -
controlUpdate
protected void controlUpdate(float tpf) Description copied from class:AbstractControl
To be implemented in subclass.- Specified by:
controlUpdate
in classAbstractControl
- Parameters:
tpf
- time per frame (in seconds)
-
controlRender
Description copied from class:AbstractControl
To be implemented in subclass.- Specified by:
controlRender
in classAbstractControl
- Parameters:
rm
- the RenderManager rendering the controlled Spatial (not null)vp
- the ViewPort being rendered (not null)
-