com.jme3.scene.plugins.blender.file
Class DnaBlockData

java.lang.Object
  extended by com.jme3.scene.plugins.blender.file.DnaBlockData

public class DnaBlockData
extends java.lang.Object

The data block containing the description of the file.


Constructor Summary
DnaBlockData(BlenderInputStream inputStream, BlenderContext blenderContext)
          Constructor.
 
Method Summary
 Structure getStructure(int index)
          This method returns the structure of the given index.
 Structure getStructure(java.lang.String name)
          This method returns a structure of the given name.
 int getStructuresCount()
          This method returns the amount of the structures.
 boolean hasStructure(java.lang.String name)
          This method indicates if the structure of the given name exists.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DnaBlockData

public DnaBlockData(BlenderInputStream inputStream,
                    BlenderContext blenderContext)
             throws BlenderFileException
Constructor. Loads the block from the given stream during instance creation.

Parameters:
inputStream - the stream we read the block from
blenderContext - the blender context
Throws:
BlenderFileException - this exception is throw if the blend file is invalid or somehow corrupted
Method Detail

getStructuresCount

public int getStructuresCount()
This method returns the amount of the structures.

Returns:
the amount of the structures

getStructure

public Structure getStructure(int index)
This method returns the structure of the given index.

Parameters:
index - the index of the structure
Returns:
the structure of the given index

getStructure

public Structure getStructure(java.lang.String name)
This method returns a structure of the given name. If the name does not exists then null is returned.

Parameters:
name - the name of the structure
Returns:
the required structure or null if the given name is inapropriate

hasStructure

public boolean hasStructure(java.lang.String name)
This method indicates if the structure of the given name exists.

Parameters:
name - the name of the structure
Returns:
true if the structure exists and false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object