public class JMELine extends JMEItem implements ILine, IInitable, IItemListener
com.jme3.scene.Spatial.CullHint
ILine.LineMode
INestable.IChildrenChangedListener
KEY_JMEITEMDATA
Constructor and Description |
---|
JMELine(java.lang.String name,
java.util.UUID uuid)
Instantiates a new JME line.
|
Modifier and Type | Method and Description |
---|---|
IItem |
getDestinationItem()
Gets the destination item.
|
com.jme3.math.Vector2f |
getEndPosition()
Gets the end position.
|
float |
getLength()
Gets the length.
|
com.jme3.scene.Spatial |
getManipulableSpatial()
Gets the manipulable spatial.
|
ILine.LineMode |
getMode()
Gets the mode.
|
IItem |
getSourceItem()
Gets the source item.
|
com.jme3.math.Vector2f |
getStartPosition()
Gets the start position.
|
void |
initializeGeometry(com.jme3.asset.AssetManager assetManager)
Initialize geometry.
|
void |
itemCursorChanged(IItem item,
MultiTouchCursorEvent event)
Item cursor changed.
|
void |
itemCursorClicked(IItem item,
MultiTouchCursorEvent event)
Item cursor clicked.
|
void |
itemCursorPressed(IItem item,
MultiTouchCursorEvent event)
Item cursor pressed.
|
void |
itemCursorReleased(IItem item,
MultiTouchCursorEvent event)
Item cursor released.
|
void |
itemMoved(IItem item)
Item moved.
|
void |
itemRotated(IItem item)
Item rotated.
|
void |
itemScaled(IItem item)
Item scaled.
|
void |
itemVisibilityChanged(IItem item,
boolean isVisible)
Item visibility changed.
|
void |
itemZOrderChanged(IItem item)
Item z order changed.
|
void |
setDestinationItem(IItem item)
Sets the destination item.
|
void |
setEndPosition(com.jme3.math.Vector2f v)
Sets the end position.
|
void |
setLineColour(com.jme3.math.ColorRGBA c)
Sets the line colour.
|
void |
setLineVisibilityChangesWithItemVisibility(boolean autoVisibilityChange)
Sets the line visibility changes with item visibility.
|
void |
setLineWidth(float width)
Sets the line width.
|
void |
setSourceItem(IItem item)
Sets the source item.
|
void |
setStartPosition(com.jme3.math.Vector2f v)
Sets the start position.
|
addItem, addItemListener, behaviourAdded, centerItem, convertWorldVelocityToLocalVelocity, deRegisterChildrenChangedListener, getBehaviours, getBehaviours, getChildItems, getChildrenCount, getItemChildren, getItemListeners, getItemName, getMultiTouchDispatcher, getName, getParentItem, getRelativeLocation, getRelativeLocationOfWorldLocation, getRelativeRotation, getRelativeScale, getUUID, getWorldLocation, getWorldLocation, getWorldRotationDegrees, getZOrder, getZOrderManager, hasChildren, isVisible, registerChildrenChangedListener, removeAllItems, removeItem, removeItemListener, setInteractionEnabled, setItemListeners, setItemName, setParentItem, setRelativeLocation, setRelativeRotation, setRelativeScale, setVisible, setWorldLocation, setZOrder, 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, write
addControl, 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, worldToLocal
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addItemListener, behaviourAdded, centerItem, convertWorldVelocityToLocalVelocity, getBehaviours, getBehaviours, getItemListeners, getMultiTouchDispatcher, getName, getParentItem, getRelativeLocation, getRelativeLocationOfWorldLocation, getRelativeRotation, getRelativeScale, getUUID, getWorldLocation, getWorldLocation, getWorldRotationDegrees, getZOrder, getZOrderManager, isVisible, removeItemListener, setInteractionEnabled, setItemListeners, setParentItem, setRelativeLocation, setRelativeRotation, setRelativeScale, setVisible, setWorldLocation, setZOrder
addItem, deRegisterChildrenChangedListener, getChildItems, getChildrenCount, hasChildren, registerChildrenChangedListener, removeAllItems, removeItem
public JMELine(java.lang.String name, java.util.UUID uuid)
name
- the nameuuid
- the uuidpublic IItem getDestinationItem()
ILine
getDestinationItem
in interface ILine
public com.jme3.math.Vector2f getEndPosition()
ILine
getEndPosition
in interface ILine
public float getLength()
ILine
public com.jme3.scene.Spatial getManipulableSpatial()
IItem
getManipulableSpatial
in interface IItem
public ILine.LineMode getMode()
ILine
public IItem getSourceItem()
ILine
getSourceItem
in interface ILine
public com.jme3.math.Vector2f getStartPosition()
ILine
getStartPosition
in interface ILine
public void initializeGeometry(com.jme3.asset.AssetManager assetManager)
IInitable
initializeGeometry
in interface IInitable
assetManager
- the asset managerpublic void itemCursorChanged(IItem item, MultiTouchCursorEvent event)
IItemListener
itemCursorChanged
in interface IItemListener
item
- the itemevent
- the eventpublic void itemCursorClicked(IItem item, MultiTouchCursorEvent event)
IItemListener
itemCursorClicked
in interface IItemListener
item
- the itemevent
- the eventpublic void itemCursorPressed(IItem item, MultiTouchCursorEvent event)
IItemListener
itemCursorPressed
in interface IItemListener
item
- the itemevent
- the eventpublic void itemCursorReleased(IItem item, MultiTouchCursorEvent event)
IItemListener
itemCursorReleased
in interface IItemListener
item
- the itemevent
- the eventpublic void itemMoved(IItem item)
IItemListener
itemMoved
in interface IItemListener
item
- the itempublic void itemRotated(IItem item)
IItemListener
itemRotated
in interface IItemListener
item
- the itempublic void itemScaled(IItem item)
IItemListener
itemScaled
in interface IItemListener
item
- the itempublic void itemVisibilityChanged(IItem item, boolean isVisible)
IItemListener
itemVisibilityChanged
in interface IItemListener
item
- the itemisVisible
- the is visiblepublic void itemZOrderChanged(IItem item)
IItemListener
itemZOrderChanged
in interface IItemListener
item
- the itempublic void setDestinationItem(IItem item)
ILine
setDestinationItem
in interface ILine
item
- the new destination itempublic void setEndPosition(com.jme3.math.Vector2f v)
ILine
setEndPosition
in interface ILine
v
- the new end positionpublic void setLineColour(com.jme3.math.ColorRGBA c)
ILine
setLineColour
in interface ILine
c
- the new line colourpublic void setLineVisibilityChangesWithItemVisibility(boolean autoVisibilityChange)
ILine
setLineVisibilityChangesWithItemVisibility
in interface ILine
autoVisibilityChange
- the new line visibility changes with item
visibilitypublic void setLineWidth(float width)
ILine
setLineWidth
in interface ILine
width
- the new line widthpublic void setSourceItem(IItem item)
ILine
setSourceItem
in interface ILine
item
- the new source itempublic void setStartPosition(com.jme3.math.Vector2f v)
ILine
setStartPosition
in interface ILine
v
- the new start position