00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CL_Sequence__
00020 #define __CL_Sequence__
00021
00022 #include "CL_API.h"
00023 #include "CL_Track.h"
00024
00025 enum CL_BlendFunction {
00026 BLEND_LINEAR=0,
00027 BLEND_EASE_IN,
00028 BLEND_EASE_OUT,
00029 BLEND_COSINE,
00030 BLEND_CUBIC,
00031 BLEND_ADD
00032 };
00033
00034 #define BLEND_PRESERVE 0
00035 #define BLEND_OVERLAP 1
00036 #define BLEND_INSERT 2
00037
00038 class UT_Vector4;
00039 class UT_XformOrder;
00040
00041 class CL_API CL_Sequence
00042 {
00043
00044 public:
00045
00046 CL_Sequence();
00047 ~CL_Sequence();
00048
00049 static int usesBias(CL_BlendFunction func);
00050
00051 static int sequence(float *&result, CL_TrackListC &source,
00052 int blend_region, float blend_bias,
00053 float step_factor, int mirror,
00054 int blend_type, int iscycle,
00055 float cycle, CL_BlendFunction func,
00056 float partial_first = 1.0,
00057 float partial_last = 1.0,
00058 int steady_segment = 0,
00059 int *steady_index = 0);
00060
00061 static int quatSequence(float *&rx,float *&ry,float *&rz,
00062 CL_TrackListC &sourcex,
00063 CL_TrackListC &sourcey,
00064 CL_TrackListC &sourcez,
00065 int blend_region,float blend_bias,
00066 int blend_type,
00067 float stepx,float stepy,float stepz,
00068 UT_XformOrder order,
00069 CL_BlendFunction blend_function);
00070
00071 static int transSequence(float *&tx,float *&ty, float *&tz,
00072 CL_TrackListC &sourcex,
00073 CL_TrackListC &sourcey,
00074 CL_TrackListC &sourcez,
00075 int blend_region,
00076 int blend_type);
00077
00078
00079 static void getBlendValues(int nsamples,float *data,float bias,
00080 CL_BlendFunction func);
00081
00082 static void getCubicParms(float off1,float val1,float slope1,
00083 float off2,float val2,float slope2,
00084 UT_Vector4 &result);
00085
00086 static void getCubic(int nsamples, float *data,
00087 float off1,float val1, float slope1,
00088 float off2,float val2, float slope2);
00089
00090 static void blendQuaternion(float *rx,float *ry,float *rz,
00091 float rx1,float ry1,float rz1,
00092 float rx2,float ry2,float rz2,
00093 int size, float *blend, float *base,
00094 const UT_XformOrder &order);
00095
00096 static float blendTranslates(float *trans,
00097 float tp1,float tp2, float tp3,
00098 float tn1,float tn2, float tn3,
00099 int size);
00100
00101 };
00102
00103 #endif
00104