|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.plugins.blender.AbstractBlenderHelper
public abstract class AbstractBlenderHelper
A purpose of the helper class is to split calculation code into several classes. Each helper after use should be cleared because it can hold the state of the calculations.
Field Summary | |
---|---|
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 Summary | |
---|---|
AbstractBlenderHelper(java.lang.String blenderVersion,
boolean fixUpAxis)
This constructor parses the given blender version and stores the result. |
Method Summary | |
---|---|
protected void |
applyProperties(Spatial spatial,
Properties properties)
The method applies properties to the given spatial. |
void |
clearState()
This method clears the state of the helper so that it can be used for different calculations of another feature. |
protected boolean |
isBlank(java.lang.String text)
This method should be used to check if the text is blank. |
protected Properties |
loadProperties(Structure structure,
BlenderContext blenderContext)
This method loads the properties if they are available and defined for the structure. |
abstract boolean |
shouldBeLoaded(Structure structure,
BlenderContext blenderContext)
This method analyzes the given structure and the data contained within blender context and decides if the feature should be loaded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int blenderVersion
protected boolean fixUpAxis
protected Quaternion upAxisRotationQuaternion
Constructor Detail |
---|
public AbstractBlenderHelper(java.lang.String blenderVersion, boolean fixUpAxis)
blenderVersion
- the version read from the blend filefixUpAxis
- a variable that indicates if the Y asxis is the UP axis or notMethod Detail |
---|
public void clearState()
protected boolean isBlank(java.lang.String text)
text
- the text to be checked
protected Properties loadProperties(Structure structure, BlenderContext blenderContext) throws BlenderFileException
structure
- the structure we read the properties fromblenderContext
- the blender context
BlenderFileException
- an exception is thrown when the blend file is somehow corruptedprotected void applyProperties(Spatial spatial, Properties properties)
spatial
- the spatial that is to have properties appliedproperties
- the properties to be appliedpublic abstract boolean shouldBeLoaded(Structure structure, BlenderContext blenderContext)
structure
- structure to be analyzedblenderContext
- the blender context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |