Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BSE_drawview.h « include « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e6f22a4fb67af534c163ca9d2c15074df54c7d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
 * $Id$
 *
 * ***** BEGIN GPL LICENSE BLOCK *****
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
 * All rights reserved.
 *
 * The Original Code is: all of this file.
 *
 * Contributor(s): none yet.
 *
 * ***** END GPL LICENSE BLOCK *****
 */

#ifndef BSE_DRAWVIEW_H
#define BSE_DRAWVIEW_H

struct Object;
struct BGpic;
struct rctf;
struct ScrArea;
struct ImBuf;

void default_gl_light(void);
void init_gl_stuff(void);
void circf(float x, float y, float rad);
void circ(float x, float y, float rad);

void do_viewbuts(unsigned short event);

/* View3DAfter->type */
#define V3D_XRAY	1
#define V3D_TRANSP	2
void add_view3d_after(struct View3D *v3d, struct Base *base, int type, int flag);

void backdrawview3d(int test);
void check_backbuf(void);
unsigned int sample_backbuf(int x, int y);
struct ImBuf *read_backbuf(short xmin, short ymin, short xmax, short ymax);
unsigned int sample_backbuf_rect(short mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict, unsigned int (*indextest)(unsigned int index));

void drawview3dspace(struct ScrArea *sa, void *spacedata);
void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4]);
void draw_depth(struct ScrArea *sa, void *spacedata);
void view3d_update_depths(struct View3D *v3d);

int update_time(int cfra);
void calc_viewborder(struct View3D *v3d, struct rctf *viewborder_r);
void view3d_set_1_to_1_viewborder(struct View3D *v3d);

int view3d_test_clipping(struct View3D *v3d, float *vec);
void view3d_set_clipping(struct View3D *v3d);
void view3d_clr_clipping(void);

void sumo_callback(void *obp);
void init_anim_sumo(void);
void update_anim_sumo(void);
void end_anim_sumo(void);

void inner_play_anim_loop(int init, int mode);
int play_anim(int mode);

void make_axis_color(char *col, char *col2, char axis);
char *view3d_get_name(struct View3D *v3d);

/* SMOOTHVIEW */
void smooth_view(struct View3D *v3d, float *ofs, float *quat, float *dist, float *lens);
void smooth_view_to_camera(struct View3D *v3d);
void view_settings_from_ob(struct Object *ob, float *ofs, float *quat, float *dist, float *lens);
void object_view_settings(struct Object *ob, float *lens, float *clipsta, float *clipend);

#endif /* BSE_DRAWVIEW_H */