public class ObjectHelper extends AbstractBlenderHelper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARMATURE_NODE_MARKER |
static java.lang.String |
OMA_MARKER |
blenderContext, blenderVersion, fixUpAxis, upAxisRotationQuaternion
Constructor and Description |
---|
ObjectHelper(java.lang.String blenderVersion,
BlenderContext blenderContext)
This constructor parses the given blender version and stores the result.
|
Modifier and Type | Method and Description |
---|---|
Matrix4f |
getMatrix(Structure structure,
java.lang.String matrixName,
boolean fixUpAxis)
This method returns the matrix of a given name for the given structure.
|
Transform |
getTransformation(Structure objectStructure,
BlenderContext blenderContext)
This method calculates local transformation for the object.
|
boolean |
isParent(java.lang.Long supposedParentOMA,
java.lang.Long spatialOMA)
Checks if the first given OMA points to a parent of the second one.
|
java.lang.Object |
toObject(Structure objectStructure,
BlenderContext blenderContext)
This method reads the given structure and createn an object that
represents the data.
|
applyProperties, loadLibrary, loadProperties
public static final java.lang.String OMA_MARKER
public static final java.lang.String ARMATURE_NODE_MARKER
public ObjectHelper(java.lang.String blenderVersion, BlenderContext blenderContext)
blenderVersion
- the version read from the blend fileblenderContext
- the blender contextpublic java.lang.Object toObject(Structure objectStructure, BlenderContext blenderContext) throws BlenderFileException
objectStructure
- the object's structureblenderContext
- the blender contextBlenderFileException
- an exception is thrown when the given data is inapropriatepublic boolean isParent(java.lang.Long supposedParentOMA, java.lang.Long spatialOMA)
supposedParentOMA
- the OMA of the node that we suppose might be a parent of the second onespatialOMA
- the OMA of the scene's nodepublic Transform getTransformation(Structure objectStructure, BlenderContext blenderContext)
objectStructure
- the object's structurepublic Matrix4f getMatrix(Structure structure, java.lang.String matrixName, boolean fixUpAxis)
structure
- the structure with matrix datamatrixName
- the name of the matrixfixUpAxis
- tells if the Y axis is a UP axis