public abstract class JMEItem extends com.jme3.scene.Node implements IItem, IInitable
com.jme3.scene.Spatial.CullHintINestable.IChildrenChangedListener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_JMEITEMDATA
The Constant KEY_JMEITEMDATA.
|
| Constructor and Description |
|---|
JMEItem(java.lang.String name,
java.util.UUID uuid)
Instantiates a new JME item.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(IItem item)
Adds the item.
|
void |
addItemListener(IItemListener itemListener)
Adds the item listener.
|
void |
behaviourAdded(IBehaviour behaviour)
Behaviour added.
|
void |
centerItem()
Center item.
|
com.jme3.math.Vector2f |
convertWorldVelocityToLocalVelocity(com.jme3.math.Vector2f loc)
Convert world velocity to local velocity.
|
void |
deRegisterChildrenChangedListener(INestable.IChildrenChangedListener listener)
De register children changed listener.
|
java.util.List<IBehaviour> |
getBehaviours()
Gets the behaviours.
|
<T extends IBehaviour> |
getBehaviours(java.lang.Class<T> clazz)
Gets the behaviours.
|
java.util.List<IItem> |
getChildItems()
Gets the child items.
|
int |
getChildrenCount()
Gets the children count.
|
java.util.List<IItem> |
getItemChildren()
Gets the item children.
|
java.util.List<IItemListener> |
getItemListeners()
Gets the item listeners.
|
java.lang.String |
getItemName()
Gets the item name.
|
MultiTouchEventDispatcher |
getMultiTouchDispatcher()
Gets the multi touch dispatcher.
|
java.lang.String |
getName()
Gets the name.
|
IItem |
getParentItem()
Gets the parent item.
|
com.jme3.math.Vector2f |
getRelativeLocation()
Gets the relative location.
|
com.jme3.math.Vector2f |
getRelativeLocationOfWorldLocation(com.jme3.math.Vector2f worldloc)
Converts an arbitrary location in world coordinates into local
coordinates relative to this item.
|
float |
getRelativeRotation()
Gets the relative rotation.
|
float |
getRelativeScale()
Gets the relative scale.
|
java.util.UUID |
getUUID()
Gets the uuid.
|
com.jme3.math.Vector2f |
getWorldLocation()
Gets the world location.
|
com.jme3.math.Vector2f |
getWorldLocation(com.jme3.math.Vector2f v)
Get the world location of an arbitrary point, where the arbitrary point
is given in relative coordinates to this item.
|
float |
getWorldRotationDegrees()
Gets the world rotation degrees.
|
int |
getZOrder()
Gets the z order.
|
IZOrderManager |
getZOrderManager()
Gets the z order manager.
|
boolean |
hasChildren()
Checks for children.
|
boolean |
isVisible()
Checks if is visible.
|
void |
registerChildrenChangedListener(INestable.IChildrenChangedListener listener)
Register children changed listener.
|
void |
removeAllItems(boolean recursive)
Removes the all items.
|
void |
removeItem(IItem item)
Removes the item.
|
void |
removeItemListener(IItemListener itemListener)
Removes the item listener.
|
void |
setInteractionEnabled(boolean b)
Sets the interaction enabled.
|
void |
setItemListeners(java.util.List<IItemListener> itemListeners)
Sets the item listeners.
|
void |
setItemName(java.lang.String itemName)
Sets the item name.
|
void |
setParentItem(IItem parent)
Sets the parent item.
|
void |
setRelativeLocation(com.jme3.math.Vector2f newLoc)
Sets the relative location.
|
void |
setRelativeRotation(float angle)
Sets the relative rotation.
|
void |
setRelativeScale(float scale)
Sets the relative scale.
|
void |
setVisible(boolean isVisible)
Sets the visible.
|
void |
setWorldLocation(com.jme3.math.Vector2f loc)
Puts the item to a location on screen, given by screen coordinates
|
void |
setZOrder(int zOrder)
Sets the z order.
|
java.lang.String |
toString() |
attachChild, attachChildAt, childChange, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLodLevel, setMaterial, setModelBound, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, writeaddControl, addLight, breadthFirstTraversal, center, checkCulling, clone, getControl, getControl, getCullHint, getLastFrustumIntersection, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setCullHint, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, worldToLocalequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetManipulableSpatialinitializeGeometrypublic static final java.lang.String KEY_JMEITEMDATA
public JMEItem(java.lang.String name,
java.util.UUID uuid)
name - the nameuuid - the uuidpublic void addItemListener(IItemListener itemListener)
IItemaddItemListener in interface IItemitemListener - the item listenerpublic void behaviourAdded(IBehaviour behaviour)
IItembehaviourAdded in interface IItembehaviour - the behaviourpublic void centerItem()
IItemcenterItem in interface IItempublic com.jme3.math.Vector2f convertWorldVelocityToLocalVelocity(com.jme3.math.Vector2f loc)
IItemconvertWorldVelocityToLocalVelocity in interface IItemloc - the locpublic void deRegisterChildrenChangedListener(INestable.IChildrenChangedListener listener)
INestabledeRegisterChildrenChangedListener in interface INestablelistener - the listenerpublic java.util.List<IBehaviour> getBehaviours()
IItemgetBehaviours in interface IItempublic <T extends IBehaviour> java.util.List<T> getBehaviours(java.lang.Class<T> clazz)
IItemgetBehaviours in interface IItemT - the generic typeclazz - the clazzpublic java.util.List<IItem> getChildItems()
INestablegetChildItems in interface INestablepublic int getChildrenCount()
INestablegetChildrenCount in interface INestablepublic java.util.List<IItem> getItemChildren()
public java.util.List<IItemListener> getItemListeners()
IItemgetItemListeners in interface IItempublic java.lang.String getItemName()
public MultiTouchEventDispatcher getMultiTouchDispatcher()
IItemgetMultiTouchDispatcher in interface IItempublic java.lang.String getName()
IItempublic IItem getParentItem()
IItemgetParentItem in interface IItempublic com.jme3.math.Vector2f getRelativeLocation()
IItemgetRelativeLocation in interface IItempublic com.jme3.math.Vector2f getRelativeLocationOfWorldLocation(com.jme3.math.Vector2f worldloc)
getRelativeLocationOfWorldLocation in interface IItemworldloc - the worldlocpublic float getRelativeRotation()
IItemgetRelativeRotation in interface IItempublic float getRelativeScale()
IItemgetRelativeScale in interface IItempublic java.util.UUID getUUID()
IItempublic com.jme3.math.Vector2f getWorldLocation()
IItemgetWorldLocation in interface IItempublic com.jme3.math.Vector2f getWorldLocation(com.jme3.math.Vector2f v)
IItemgetWorldLocation in interface IItempublic float getWorldRotationDegrees()
IItemgetWorldRotationDegrees in interface IItempublic int getZOrder()
IItempublic IZOrderManager getZOrderManager()
INestablegetZOrderManager in interface INestablegetZOrderManager in interface IItempublic boolean hasChildren()
INestablehasChildren in interface INestablepublic boolean isVisible()
IItempublic void registerChildrenChangedListener(INestable.IChildrenChangedListener listener)
INestableregisterChildrenChangedListener in interface INestablelistener - the listenerpublic void removeAllItems(boolean recursive)
INestableremoveAllItems in interface INestablerecursive - the recursivepublic void removeItem(IItem item)
INestableremoveItem in interface INestableitem - the itempublic void removeItemListener(IItemListener itemListener)
IItemremoveItemListener in interface IItemitemListener - the item listenerpublic void setInteractionEnabled(boolean b)
IItemsetInteractionEnabled in interface IItemb - the new interaction enabledpublic void setItemListeners(java.util.List<IItemListener> itemListeners)
IItemsetItemListeners in interface IItemitemListeners - the new item listenerspublic void setItemName(java.lang.String itemName)
itemName - the new item namepublic void setParentItem(IItem parent)
IItemsetParentItem in interface IItemparent - the new parent itempublic void setRelativeLocation(com.jme3.math.Vector2f newLoc)
IItemsetRelativeLocation in interface IItemnewLoc - the new relative locationpublic void setRelativeRotation(float angle)
IItemsetRelativeRotation in interface IItemangle - the new relative rotationpublic void setRelativeScale(float scale)
IItemsetRelativeScale in interface IItemscale - the new relative scalepublic void setVisible(boolean isVisible)
IItemsetVisible in interface IItemisVisible - the new visiblepublic void setWorldLocation(com.jme3.math.Vector2f loc)
IItemsetWorldLocation in interface IItemloc - a position, in screen coordinatespublic void setZOrder(int zOrder)
IItempublic java.lang.String toString()
toString in class com.jme3.scene.Spatial