public abstract class AbstractBlenderHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected BlenderContext |
blenderContext
The blender context.
|
protected int |
blenderVersion
The version of the blend file.
|
protected boolean |
fixUpAxis
This variable indicates if the Y asxis is the UP axis or not.
|
protected Quaternion |
upAxisRotationQuaternion
Quaternion used to rotate data when Y is up axis.
|
Constructor and Description |
---|
AbstractBlenderHelper(java.lang.String blenderVersion,
BlenderContext blenderContext)
This constructor parses the given blender version and stores the result.
|
Modifier and Type | Method and Description |
---|---|
void |
applyProperties(Spatial spatial,
Properties properties)
The method applies properties to the given spatial.
|
protected java.lang.Object |
loadLibrary(Structure id)
The method loads library of a given ID from linked blender file.
|
protected Properties |
loadProperties(Structure structure,
BlenderContext blenderContext)
This method loads the properties if they are available and defined for the structure.
|
protected BlenderContext blenderContext
protected final int blenderVersion
protected boolean fixUpAxis
protected Quaternion upAxisRotationQuaternion
public AbstractBlenderHelper(java.lang.String blenderVersion, BlenderContext blenderContext)
blenderVersion
- the version read from the blend fileblenderContext
- the blender contextprotected Properties loadProperties(Structure structure, BlenderContext blenderContext) throws BlenderFileException
structure
- the structure we read the properties fromblenderContext
- the blender contextBlenderFileException
- an exception is thrown when the blend file is somehow corruptedpublic void applyProperties(Spatial spatial, Properties properties)
spatial
- the spatial that is to have properties appliedproperties
- the properties to be appliedprotected java.lang.Object loadLibrary(Structure id) throws BlenderFileException
id
- the ID of the linked feature (it contains its name and blender path)BlenderFileException
- and exception is throw when problems with reading a blend file occur