com.jme3.scene
Class AssetLinkNode
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.scene.AssetLinkNode
- All Implemented Interfaces:
- CloneableSmartAsset, Collidable, Savable, java.lang.Cloneable
public class AssetLinkNode
- extends Node
The AssetLinkNode does not store its children when exported to file.
Instead, you can add a list of AssetKeys that will be loaded and attached
when the AssetLinkNode is restored.
Fields inherited from class com.jme3.scene.Spatial |
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform |
Methods inherited from class com.jme3.scene.Node |
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound |
Methods inherited from class com.jme3.scene.Spatial |
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, 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, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setParent, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
assetLoaderKeys
protected java.util.ArrayList<ModelKey> assetLoaderKeys
assetChildren
protected java.util.Map<ModelKey,Spatial> assetChildren
AssetLinkNode
public AssetLinkNode()
AssetLinkNode
public AssetLinkNode(ModelKey key)
AssetLinkNode
public AssetLinkNode(java.lang.String name,
ModelKey key)
addLinkedChild
public void addLinkedChild(ModelKey key)
- Add a "linked" child. These are loaded from the assetManager when the
AssetLinkNode is loaded from a binary file.
- Parameters:
key
-
removeLinkedChild
public void removeLinkedChild(ModelKey key)
getAssetLoaderKeys
public java.util.ArrayList<ModelKey> getAssetLoaderKeys()
attachLinkedChild
public void attachLinkedChild(AssetManager manager,
ModelKey key)
attachLinkedChild
public void attachLinkedChild(Spatial spat,
ModelKey key)
detachLinkedChild
public void detachLinkedChild(ModelKey key)
detachLinkedChild
public void detachLinkedChild(Spatial child,
ModelKey key)
attachLinkedChildren
public void attachLinkedChildren(AssetManager manager)
- Loads the linked children AssetKeys from the AssetManager and attaches them to the Node
If they are already attached, they will be reloaded.
- Parameters:
manager
-
detachLinkedChildren
public void detachLinkedChildren()
read
public void read(JmeImporter e)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class Node
- Throws:
java.io.IOException
write
public void write(JmeExporter e)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class Node
- Throws:
java.io.IOException