public class Ipo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AC_LOC_X |
static int |
AC_LOC_Y |
static int |
AC_LOC_Z |
static int |
AC_QUAT_W |
static int |
AC_QUAT_X |
static int |
AC_QUAT_Y |
static int |
AC_QUAT_Z |
static int |
AC_SIZE_X |
static int |
AC_SIZE_Y |
static int |
AC_SIZE_Z |
protected int |
blenderVersion
Depending on the blender version rotations are stored in degrees or
radians so we need to know the version that is used.
|
protected boolean |
fixUpAxis
This variable indicates if the Y asxis is the UP axis or not.
|
static int |
OB_ROT_X |
static int |
OB_ROT_Y |
static int |
OB_ROT_Z |
Constructor and Description |
---|
Ipo(BezierCurve[] bezierCurves,
boolean fixUpAxis,
int blenderVersion)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Track |
calculateTrack(int targetIndex,
BoneContext boneContext,
Vector3f localTranslation,
Quaternion localRotation,
Vector3f localScale,
int startFrame,
int stopFrame,
int fps,
boolean spatialTrack)
This method calculates the value of the curves as a bone track between
the specified frames.
|
double |
calculateValue(int frame)
This method calculates the ipo value for the first curve.
|
double |
calculateValue(int frame,
int curveIndex)
This method calculates the ipo value for the curve of the specified
index.
|
int |
getLastFrame()
This method returns the frame where last bezier triple center point of
the specified bezier curve is located.
|
public static final int AC_LOC_X
public static final int AC_LOC_Y
public static final int AC_LOC_Z
public static final int OB_ROT_X
public static final int OB_ROT_Y
public static final int OB_ROT_Z
public static final int AC_SIZE_X
public static final int AC_SIZE_Y
public static final int AC_SIZE_Z
public static final int AC_QUAT_W
public static final int AC_QUAT_X
public static final int AC_QUAT_Y
public static final int AC_QUAT_Z
protected boolean fixUpAxis
protected final int blenderVersion
public Ipo(BezierCurve[] bezierCurves, boolean fixUpAxis, int blenderVersion)
bezierCurves
- a table of bezier curvesfixUpAxis
- indicates if the Y is the up axis or notblenderVersion
- the blender version that is currently usedpublic double calculateValue(int frame)
frame
- the frame for which the value is calculatedpublic double calculateValue(int frame, int curveIndex)
frame
- the frame for which the value is calculatedcurveIndex
- the index of the curvepublic int getLastFrame()
public Track calculateTrack(int targetIndex, BoneContext boneContext, Vector3f localTranslation, Quaternion localRotation, Vector3f localScale, int startFrame, int stopFrame, int fps, boolean spatialTrack)
targetIndex
- the index of the target for which the method calculates the
tracks IMPORTANT! Aet to -1 (or any negative number) if you
want to load spatial animation.localTranslation
- the local translation of the object/bone that will be animated by
the tracklocalRotation
- the local rotation of the object/bone that will be animated by
the tracklocalScale
- the local scale of the object/bone that will be animated by
the trackstartFrame
- the first frame of tracks (inclusive)stopFrame
- the last frame of the tracks (inclusive)fps
- frame rate (frames per second)spatialTrack
- this flag indicates if the track belongs to a spatial or to a
bone; the difference is important because it appears that bones
in blender have the same type of coordinate system (Y as UP)
as jme while other features have different one (Z is UP)