~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/BKE_ipo.h

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * blenlib/BKE_ipo.h (mar-2001 nzc)
3
3
 *      
4
 
 * $Id: BKE_ipo.h 14444 2008-04-16 22:40:48Z hos $ 
 
4
 * $Id: BKE_ipo.h 16800 2008-09-28 23:17:44Z aligorith $ 
5
5
 *
6
6
 * ***** BEGIN GPL LICENSE BLOCK *****
7
7
 *
31
31
#ifndef BKE_IPO_H
32
32
#define BKE_IPO_H
33
33
 
 
34
#ifdef __cplusplus
 
35
extern "C" {
 
36
#endif
 
37
 
34
38
typedef struct CfraElem {
35
39
        struct CfraElem *next, *prev;
36
40
        float cfra;
50
54
struct bActionChannel;
51
55
struct rctf;
52
56
 
 
57
/* ------------ Time Management ------------ */
 
58
 
53
59
float frame_to_float(int cfra);
54
60
 
 
61
/* ------------ IPO Management ---------- */
 
62
 
55
63
void free_ipo_curve(struct IpoCurve *icu);
56
64
void free_ipo(struct Ipo *ipo);
 
65
 
57
66
void ipo_default_v2d_cur(int blocktype, struct rctf *cur);
 
67
 
58
68
struct Ipo *add_ipo(char *name, int idcode);
59
69
struct Ipo *copy_ipo(struct Ipo *ipo);
 
70
 
60
71
void ipo_idnew(struct Ipo *ipo);
 
72
 
 
73
struct IpoCurve *find_ipocurve(struct Ipo *ipo, int adrcode);
 
74
short has_ipo_code(struct Ipo *ipo, int code);
 
75
 
 
76
/* -------------- Make Local -------------- */
 
77
 
61
78
void make_local_obipo(struct Ipo *ipo);
62
79
void make_local_matipo(struct Ipo *ipo);
63
80
void make_local_keyipo(struct Ipo *ipo);
64
81
void make_local_ipo(struct Ipo *ipo);
65
 
struct IpoCurve *find_ipocurve(struct Ipo *ipo, int adrcode);
 
82
 
 
83
/* ------------ IPO-Curve Sanity ---------------- */
66
84
 
67
85
void calchandles_ipocurve(struct IpoCurve *icu);
68
86
void testhandles_ipocurve(struct IpoCurve *icu);
69
87
void sort_time_ipocurve(struct IpoCurve *icu);
70
88
int test_time_ipocurve(struct IpoCurve *icu);
 
89
 
 
90
/* -------- IPO-Curve (Bezier) Calculations ---------- */
 
91
 
71
92
void correct_bezpart(float *v1, float *v2, float *v3, float *v4);
72
93
int findzero(float x, float q0, float q1, float q2, float q3, float *o);
73
94
void berekeny(float f1, float f2, float f3, float f4, float *o, int b);
74
95
void berekenx(float *f, float *o, int b);
 
96
 
 
97
/* -------- IPO Curve Calculation and Evaluation --------- */
 
98
 
75
99
float eval_icu(struct IpoCurve *icu, float ipotime);
76
100
void calc_icu(struct IpoCurve *icu, float ctime);
77
101
float calc_ipo_time(struct Ipo *ipo, float ctime);
78
102
void calc_ipo(struct Ipo *ipo, float ctime);
 
103
 
 
104
/* ------------ Keyframe Column Tools -------------- */
 
105
 
 
106
void add_to_cfra_elem(struct ListBase *lb, struct BezTriple *bezt);
 
107
void make_cfra_list(struct Ipo *ipo, struct ListBase *elems);
 
108
 
 
109
/* ---------------- IPO DataAPI ----------------- */
 
110
 
79
111
void write_ipo_poin(void *poin, int type, float val);
80
112
float read_ipo_poin(void *poin, int type);
 
113
 
81
114
void *give_mtex_poin(struct MTex *mtex, int adrcode );
82
 
 
 
115
void *get_pchan_ipo_poin(struct bPoseChannel *pchan, int adrcode);
83
116
void *get_ipo_poin(struct ID *id, struct IpoCurve *icu, int *type);
84
 
void *get_pchan_ipo_poin(struct bPoseChannel *pchan, int adrcode);
85
117
 
86
118
void set_icu_vars(struct IpoCurve *icu);
87
119
 
 
120
/* ---------------- IPO Execution --------------- */
 
121
 
88
122
void execute_ipo(struct ID *id, struct Ipo *ipo);
89
123
void execute_action_ipo(struct bActionChannel *achan, struct bPoseChannel *pchan);
90
124
 
95
129
void do_seq_ipo(struct Sequence *seq, int cfra);
96
130
void do_ob_ipodrivers(struct Object *ob, struct Ipo *ipo, float ctime);
97
131
 
98
 
int has_ipo_code(struct Ipo *ipo, int code);
99
132
void do_all_data_ipos(void);
100
 
int calc_ipo_spec(struct Ipo *ipo, int adrcode, float *ctime);
 
133
short calc_ipo_spec(struct Ipo *ipo, int adrcode, float *ctime);
101
134
void clear_delta_obipo(struct Ipo *ipo);
102
 
void add_to_cfra_elem(struct ListBase *lb, struct BezTriple *bezt);
103
 
void make_cfra_list(struct Ipo *ipo, struct ListBase *elems);
104
 
 
105
 
/* the sort is an IPO_Channel... */
106
 
int IPO_GetChannels(struct Ipo *ipo, short *channels);
107
 
 
108
 
float IPO_GetFloatValue(struct Ipo *ipo,
109
 
/*                                              struct IPO_Channel channel, */
110
 
                                                /* channels are shorts... bit ugly for now*/
111
 
                                                short c,
112
 
                                                float ctime);
 
135
 
 
136
/* ----------- IPO <-> GameEngine API ---------------- */
 
137
 
 
138
/* the short is an IPO_Channel... */
 
139
 
 
140
short IPO_GetChannels(struct Ipo *ipo, short *channels);
 
141
float IPO_GetFloatValue(struct Ipo *ipo, short c, float ctime);
 
142
 
 
143
#ifdef __cplusplus
 
144
};
 
145
#endif
113
146
 
114
147
#endif
115
148