|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.plugins.blender.BlenderContext
public class BlenderContext
The class that stores temporary data and manages it during loading the belnd file. This class is intended to be used in a single loading thread. It holds the state of loading operations.
Nested Class Summary | |
---|---|
static class |
BlenderContext.LoadedFeatureDataType
This enum defines what loaded data type user wants to retreive. |
Field Summary | |
---|---|
protected java.util.Map<java.lang.Long,BoneContext> |
boneContexts
A map of bone contexts. |
protected java.util.Map<java.lang.Long,java.util.List<Constraint>> |
constraints
A list of constraints for the specified object. |
protected java.util.Map<java.lang.Long,MeshContext> |
meshContexts
A map of mesh contexts. |
protected java.util.Map<java.lang.Long,java.util.List<Modifier>> |
modifiers
A list of modifiers for the specified object. |
Constructor Summary | |
---|---|
BlenderContext()
|
Method Summary | ||
---|---|---|
void |
addConstraints(java.lang.Long ownerOMA,
java.util.List<Constraint> constraints)
This method adds a new modifier to the list. |
|
void |
addFileBlockHeader(java.lang.Long oldMemoryAddress,
FileBlockHeader fileBlockHeader)
This method adds a file block header to the map. |
|
void |
addIpo(java.lang.Long ownerOMA,
Ipo ipo)
This method adds new ipo curve for the feature. |
|
void |
addLoadedFeatures(java.lang.Long oldMemoryAddress,
java.lang.String featureName,
Structure structure,
java.lang.Object feature)
This method adds a loaded feature to the map. |
|
void |
addModifier(java.lang.Long ownerOMA,
Modifier modifier)
This method adds a new modifier to the list. |
|
void |
clearFileBlocks()
This method clears the saved block headers stored in the features map. |
|
void |
clearLoadedFeatures()
This method clears the saved features stored in the features map. |
|
void |
dispose()
|
|
AnimData |
getAnimData(java.lang.Long ownerOMA)
This method returns the animation data for the specified owner. |
|
AssetManager |
getAssetManager()
This method returns the asset manager. |
|
BlenderKey |
getBlenderKey()
This method returns the blender key. |
|
int |
getBlenderVersion()
|
|
BoneContext |
getBoneContext(java.lang.Long boneOMA)
This method returns the bone context for the given bone old memory address. |
|
java.util.List<Constraint> |
getConstraints(java.lang.Long objectOMA)
This method returns constraints for the object specified by its old memory address. |
|
Material |
getDefaultMaterial()
This metod returns the default material. |
|
DnaBlockData |
getDnaBlockData()
This method returns the dna block data. |
|
FileBlockHeader |
getFileBlock(java.lang.Long oldMemoryAddress)
This method returns the block header of a given memory address. |
|
java.util.List<FileBlockHeader> |
getFileBlocks(java.lang.Integer code)
This method returns a list of file blocks' headers of a specified code. |
|
|
getHelper(java.lang.Class<?> clazz)
|
|
BlenderInputStream |
getInputStream()
This method returns the input stream of the blend file. |
|
Ipo |
getIpo(java.lang.Long ownerOMA)
This method returns the ipo curve of the feature. |
|
java.lang.Object |
getLoadedFeature(java.lang.Long oldMemoryAddress,
BlenderContext.LoadedFeatureDataType loadedFeatureDataType)
This method returns the feature of a given memory address. |
|
java.lang.Object |
getLoadedFeature(java.lang.String featureName,
BlenderContext.LoadedFeatureDataType loadedFeatureDataType)
This method returns the feature of a given name. |
|
MeshContext |
getMeshContext(java.lang.Long meshOMA)
This method returns the mesh context for the given mesh old memory address. |
|
java.util.List<Modifier> |
getModifiers(java.lang.Long objectOMA,
java.lang.String type)
This method returns modifiers for the object specified by its old memory address and the modifier type. |
|
Skeleton |
getSkeleton(java.lang.Long skeletonOMA)
This method returns the skeleton for the specified OMA of its owner. |
|
Structure |
peekParent()
This method retreives the structure at the top of the parent's stack but does not remove it. |
|
Structure |
popParent()
This method removes the structure from the top of the parent's stack. |
|
void |
pushParent(Structure parent)
This method adds the structure to the parent stack. |
|
|
putHelper(java.lang.Class<T> clazz,
AbstractBlenderHelper helper)
This method adds a helper instance to the helpers' map. |
|
Ipo |
removeIpo(java.lang.Long ownerOma)
This method removes the ipo curve from the feature. |
|
void |
setAnimData(java.lang.Long ownerOMA,
AnimData animData)
This method sets the anim data for the specified OMA of its owner. |
|
void |
setAssetManager(AssetManager assetManager)
This method sets the asset manager. |
|
void |
setBlenderKey(BlenderKey blenderKey)
This method sets the blender key. |
|
void |
setBlenderVersion(java.lang.String blenderVersion)
This method sets the blender file version. |
|
void |
setBlockData(DnaBlockData dnaBlockData)
This method sets the dna block data. |
|
void |
setBoneContext(java.lang.Long boneOMA,
BoneContext boneContext)
This method sets the bone context for the given bone old memory address. |
|
void |
setInputStream(BlenderInputStream inputStream)
This method sets the input stream of the blend file. |
|
void |
setMeshContext(java.lang.Long meshOMA,
MeshContext meshContext)
This method sets the mesh context for the given mesh old memory address. |
|
void |
setSkeleton(java.lang.Long skeletonOMA,
Skeleton skeleton)
This method sets the skeleton for the specified OMA of its owner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.Long,java.util.List<Modifier>> modifiers
protected java.util.Map<java.lang.Long,java.util.List<Constraint>> constraints
protected java.util.Map<java.lang.Long,MeshContext> meshContexts
protected java.util.Map<java.lang.Long,BoneContext> boneContexts
Constructor Detail |
---|
public BlenderContext()
Method Detail |
---|
public void setBlenderVersion(java.lang.String blenderVersion)
blenderVersion
- the blender file versionpublic int getBlenderVersion()
public void setBlenderKey(BlenderKey blenderKey)
blenderKey
- the blender keypublic BlenderKey getBlenderKey()
public void setBlockData(DnaBlockData dnaBlockData)
dnaBlockData
- the dna block datapublic DnaBlockData getDnaBlockData()
public AssetManager getAssetManager()
public void setAssetManager(AssetManager assetManager)
assetManager
- the asset managerpublic BlenderInputStream getInputStream()
public void setInputStream(BlenderInputStream inputStream)
inputStream
- the input stream of the blend filepublic void addFileBlockHeader(java.lang.Long oldMemoryAddress, FileBlockHeader fileBlockHeader)
oldMemoryAddress
- the address of the block headerfileBlockHeader
- the block header to storepublic FileBlockHeader getFileBlock(java.lang.Long oldMemoryAddress)
oldMemoryAddress
- the address of the block header
public java.util.List<FileBlockHeader> getFileBlocks(java.lang.Integer code)
code
- the code of file blocks
public void clearFileBlocks()
public <T> void putHelper(java.lang.Class<T> clazz, AbstractBlenderHelper helper)
T
- the type of the helperclazz
- helper's class definitionhelper
- the helper instancepublic <T> T getHelper(java.lang.Class<?> clazz)
public void addLoadedFeatures(java.lang.Long oldMemoryAddress, java.lang.String featureName, Structure structure, java.lang.Object feature)
oldMemoryAddress
- the address of the featurefeatureName
- the name of the featurestructure
- the filled structure of the featurefeature
- the feature we want to storepublic java.lang.Object getLoadedFeature(java.lang.Long oldMemoryAddress, BlenderContext.LoadedFeatureDataType loadedFeatureDataType)
oldMemoryAddress
- the address of the featureloadedFeatureDataType
- the type of data we want to retreive it can be either filled
structure or already converted feature
public java.lang.Object getLoadedFeature(java.lang.String featureName, BlenderContext.LoadedFeatureDataType loadedFeatureDataType)
featureName
- the name of the featureloadedFeatureDataType
- the type of data we want to retreive it can be either filled
structure or already converted feature
public void clearLoadedFeatures()
public void pushParent(Structure parent)
parent
- the structure to be added to the stackpublic Structure popParent()
public Structure peekParent()
public void addIpo(java.lang.Long ownerOMA, Ipo ipo)
ownerOMA
- the OMA of blender feature that owns the ipoipo
- the ipo to be addedpublic Ipo removeIpo(java.lang.Long ownerOma)
ownerOma
- the OMA of blender feature that owns the ipopublic Ipo getIpo(java.lang.Long ownerOMA)
ownerOMA
- the OMA of blender feature that owns the ipopublic void addModifier(java.lang.Long ownerOMA, Modifier modifier)
ownerOMA
- the owner's old memory addressmodifier
- the object's modifierpublic java.util.List<Modifier> getModifiers(java.lang.Long objectOMA, java.lang.String type)
objectOMA
- object's old memory addresstype
- the type of the modifier
public void addConstraints(java.lang.Long ownerOMA, java.util.List<Constraint> constraints)
ownerOMA
- the owner's old memory addressconstraints
- the object's constraintspublic java.util.List<Constraint> getConstraints(java.lang.Long objectOMA)
objectOMA
- object's old memory address
public void setAnimData(java.lang.Long ownerOMA, AnimData animData)
ownerOMA
- the owner's old memory addressanimData
- the animation data for the feature specified by ownerOMApublic AnimData getAnimData(java.lang.Long ownerOMA)
ownerOMA
- the old memory address of the animation data owner
public void setSkeleton(java.lang.Long skeletonOMA, Skeleton skeleton)
skeletonOMA
- the skeleton's old memory addressskeleton
- the skeleton specified by the given OMApublic Skeleton getSkeleton(java.lang.Long skeletonOMA)
skeletonOMA
- the skeleton's old memory address
public void setMeshContext(java.lang.Long meshOMA, MeshContext meshContext)
meshOMA
- the mesh's old memory addressmeshContext
- the mesh's contextpublic MeshContext getMeshContext(java.lang.Long meshOMA)
meshOMA
- the mesh's old memory address
public void setBoneContext(java.lang.Long boneOMA, BoneContext boneContext)
boneOMA
- the bone's old memory addressboneContext
- the bones's contextpublic BoneContext getBoneContext(java.lang.Long boneOMA)
boneOMA
- the bone's old memory address
public Material getDefaultMaterial()
public void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |