Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | ViewContext |
struct | ViewDepths |
Defines | |
#define | IS_CLIPPED 12000 |
#define | MAXPICKBUF 10000 |
Typedefs | |
typedef struct ViewContext | ViewContext |
typedef struct ViewDepths | ViewDepths |
typedef enum eV3DClipTest | eV3DClipTest |
Enumerations | |
enum | eV3DClipTest { V3D_CLIP_TEST_OFF = 0, V3D_CLIP_TEST_RV3D_CLIPPING = 1, V3D_CLIP_TEST_REGION = 2 } |
Functions | |
float * | give_cursor (struct Scene *scene, struct View3D *v3d) |
int | initgrabz (struct RegionView3D *rv3d, float x, float y, float z) |
void | ED_view3d_win_to_3d (struct ARegion *ar, const float depth_pt[3], const float mval[2], float out[3]) |
void | ED_view3d_win_to_delta (struct ARegion *ar, const float mval[2], float out[3]) |
void | ED_view3d_win_to_vector (struct ARegion *ar, const float mval[2], float out[3]) |
void | ED_view3d_win_to_segment_clip (struct ARegion *ar, struct View3D *v3d, const float mval[2], float ray_start[3], float ray_end[3]) |
void | ED_view3d_win_to_ray (struct ARegion *ar, struct View3D *v3d, const float mval[2], float ray_start[3], float ray_normal[3]) |
void | ED_view3d_global_to_vector (struct RegionView3D *rv3d, const float coord[3], float vec[3]) |
void | ED_view3d_to_m4 (float mat[][4], const float ofs[3], const float quat[4], const float dist) |
void | ED_view3d_from_m4 (float mat[][4], float ofs[3], float quat[4], float *dist) |
void | ED_view3d_from_object (struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens) |
void | ED_view3d_to_object (struct Object *ob, const float ofs[3], const float quat[4], const float dist) |
void | ED_view3d_depth_update (struct ARegion *ar) |
float | ED_view3d_depth_read_cached (struct ViewContext *vc, int x, int y) |
void | ED_view3d_depth_tag_update (struct RegionView3D *rv3d) |
void | ED_view3d_calc_clipping (struct BoundBox *bb, float planes[4][4], struct bglMats *mats, const struct rcti *rect) |
void | project_short (struct ARegion *ar, const float vec[3], short adr[2]) |
void | project_short_noclip (struct ARegion *ar, const float vec[3], short adr[2]) |
void | project_int (struct ARegion *ar, const float vec[3], int adr[2]) |
void | project_int_noclip (struct ARegion *ar, const float vec[3], int adr[2]) |
void | project_float (struct ARegion *ar, const float vec[3], float adr[2]) |
void | project_float_noclip (struct ARegion *ar, const float vec[3], float adr[2]) |
int | ED_view3d_clip_range_get (struct View3D *v3d, struct RegionView3D *rv3d, float *clipsta, float *clipend) |
int | ED_view3d_viewplane_get (struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, struct rctf *viewplane, float *clipsta, float *clipend) |
void | ED_view3d_ob_project_mat_get (struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]) |
void | ED_view3d_project_float (const struct ARegion *a, const float vec[3], float adr[2], float mat[4][4]) |
void | ED_view3d_calc_camera_border (struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, struct rctf *viewborder_r, short no_shift) |
void | ED_view3d_calc_camera_border_size (struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, float size_r[2]) |
void | mesh_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, eV3DClipTest clipVerts) |
void | mesh_foreachScreenEdge (struct ViewContext *vc, void(*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, eV3DClipTest clipVerts) |
void | mesh_foreachScreenFace (struct ViewContext *vc, void(*func)(void *userData, struct EditFace *efa, int x, int y, int index), void *userData) |
void | nurbs_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y), void *userData) |
void | lattice_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct BPoint *bp, int x, int y), void *userData) |
void | ED_view3d_local_clipping (struct RegionView3D *rv3d, float mat[][4]) |
int | ED_view3d_test_clipping (struct RegionView3D *rv3d, const float vec[3], const int local) |
void | ED_view3d_align_axis_to_vector (struct View3D *v3d, struct RegionView3D *rv3d, int axisidx, float vec[3]) |
float | ED_view3d_pixel_size (struct RegionView3D *rv3d, const float co[3]) |
void | drawcircball (int mode, const float cent[3], float rad, float tmat[][4]) |
void | view3d_validate_backbuf (struct ViewContext *vc) |
struct ImBuf * | view3d_read_backbuf (struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax) |
unsigned int | view3d_sample_backbuf_rect (struct ViewContext *vc, const int mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict, void *handle, unsigned int(*indextest)(void *handle, unsigned int index)) |
unsigned int | view3d_sample_backbuf (struct ViewContext *vc, int x, int y) |
int | ED_view3d_autodist (struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const int mval[2], float mouse_worldloc[3]) |
int | ED_view3d_autodist_init (struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode) |
int | ED_view3d_autodist_simple (struct ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth) |
int | ED_view3d_autodist_depth (struct ARegion *ar, const int mval[2], int margin, float *depth) |
int | ED_view3d_autodist_depth_seg (struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth) |
short | view3d_opengl_select (struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, rcti *input) |
void | view3d_set_viewcontext (struct bContext *C, struct ViewContext *vc) |
void | view3d_operator_needs_opengl (const struct bContext *C) |
void | view3d_region_operator_needs_opengl (struct wmWindow *win, struct ARegion *ar) |
int | view3d_get_view_aligned_coordinate (struct ViewContext *vc, float fp[3], const int mval[2], const short do_fallback) |
void | view3d_get_transformation (const struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob, struct bglMats *mats) |
int | edge_inside_circle (short centx, short centy, short rad, short x1, short y1, short x2, short y2) |
int | lasso_inside (int mcords[][2], short moves, int sx, int sy) |
int | lasso_inside_edge (int mcords[][2], short moves, int x0, int y0, int x1, int y1) |
struct RegionView3D * | ED_view3d_context_rv3d (struct bContext *C) |
int | ED_view3d_context_user_region (struct bContext *C, struct View3D **v3d_r, struct ARegion **ar_r) |
int | ED_operator_rv3d_user_region_poll (struct bContext *C) |
void | ED_view3d_init_mats_rv3d (struct Object *ob, struct RegionView3D *rv3d) |
void | ED_view3d_init_mats_rv3d_gl (struct Object *ob, struct RegionView3D *rv3d) |
int | ED_view3d_scene_layer_set (int lay, const int *values, int *active) |
int | ED_view3d_context_activate (struct bContext *C) |
void | ED_view3d_draw_offscreen (struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4]) |
struct ImBuf * | ED_view3d_draw_offscreen_imbuf (struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag, char err_out[256]) |
struct ImBuf * | ED_view3d_draw_offscreen_imbuf_simple (Scene *scene, struct Object *camera, int width, int height, unsigned int flag, int drawtype, char err_out[256]) |
Base * | ED_view3d_give_base_under_cursor (struct bContext *C, const int mval[2]) |
void | ED_view3d_quadview_update (struct ScrArea *sa, struct ARegion *ar, short do_clip) |
int | ED_view3d_lock (struct RegionView3D *rv3d) |
uint64_t | ED_view3d_datamask (struct Scene *scene, struct View3D *v3d) |
uint64_t | ED_view3d_screen_datamask (struct bScreen *screen) |
uint64_t | ED_view3d_object_datamask (struct Scene *scene) |
int | ED_view3d_camera_lock_check (struct View3D *v3d, struct RegionView3D *rv3d) |
void | ED_view3d_camera_lock_init (struct View3D *v3d, struct RegionView3D *rv3d) |
int | ED_view3d_camera_lock_sync (struct View3D *v3d, struct RegionView3D *rv3d) |
struct BGpic * | ED_view3D_background_image_new (struct View3D *v3d) |
void | ED_view3D_background_image_remove (struct View3D *v3d, struct BGpic *bgpic) |
void | ED_view3D_background_image_clear (struct View3D *v3d) |
Definition in file ED_view3d.h.
#define IS_CLIPPED 12000 |
Definition at line 202 of file ED_view3d.h.
Referenced by drawcursor(), ED_view3d_project_float(), ED_view3d_project_float_v3(), is_co_in_region(), key_inside_circle(), key_inside_rect(), key_test_depth(), lasso_inside(), lasso_inside_edge(), lattice_foreachScreenVert(), mesh_foreachScreenFace__mapFunc(), mesh_foreachScreenVert__mapFunc(), nurbs_foreachScreenVert(), PE_lasso_select(), project_float(), project_short(), project_short_noclip(), set_3dcursor_invoke(), view3d_cached_text_draw_end(), view3d_circle_select_exec(), view3d_get_view_aligned_coordinate(), view3d_project_short_clip(), view3d_project_short_clip_persmat(), and view3d_project_short_noclip().
#define MAXPICKBUF 10000 |
Definition at line 253 of file ED_view3d.h.
Referenced by do_armature_box_select(), do_meta_box_select(), do_object_pose_box_select(), ED_view3d_give_base_under_cursor(), get_nearest_bone(), get_nearest_editbonepoint(), mixed_bones_object_selectbuffer(), mouse_mball(), mouse_select(), and sk_selectStroke().
typedef enum eV3DClipTest eV3DClipTest |
typedef struct ViewContext ViewContext |
typedef struct ViewDepths ViewDepths |
enum eV3DClipTest |
Definition at line 79 of file ED_view3d.h.
void drawcircball | ( | int | mode, |
const float | cent[3], | ||
float | rad, | ||
float | tmat[][4] | ||
) |
Definition at line 716 of file drawobject.c.
References circball_array_fill(), and CIRCLE_RESOL.
Referenced by draw_forcefield(), draw_manipulator_rotate(), draw_manipulator_rotate_cyl(), draw_manipulator_scale(), draw_manipulator_translate(), draw_new_particle_system(), draw_object(), draw_particle(), draw_sphere_bone_wire(), drawcone(), drawlamp(), drawmball(), drawPropCircle(), drawSnapping(), and drawtube().
int ED_operator_rv3d_user_region_poll | ( | struct bContext * | C | ) |
Definition at line 497 of file view3d_view.c.
References ED_view3d_context_user_region().
Referenced by VIEW3D_OT_object_as_camera(), VIEW3D_OT_view_orbit(), VIEW3D_OT_view_persportho(), and VIEW3D_OT_viewnumpad().
void ED_view3d_align_axis_to_vector | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d, | ||
int | axisidx, | ||
float | vec[3] | ||
) |
int ED_view3d_autodist | ( | struct Scene * | scene, |
struct ARegion * | ar, | ||
struct View3D * | v3d, | ||
const int | mval[2], | ||
float | mouse_worldloc[3] | ||
) |
Definition at line 3388 of file view3d_edit.c.
References bgl_get_mats(), draw_depth(), FLT_MAX, bglMats::modelview, NULL, p, bglMats::projection, view_autodist_depth_margin(), and bglMats::viewport.
Referenced by set_3dcursor_invoke(), set_clone_cursor_invoke(), and viewops_data_create().
int ED_view3d_autodist_depth | ( | struct ARegion * | ar, |
const int | mval[2], | ||
int | margin, | ||
float * | depth | ||
) |
Definition at line 3459 of file view3d_edit.c.
References FLT_MAX, and view_autodist_depth_margin().
Referenced by gp_stroke_newfrombuffer().
int ED_view3d_autodist_depth_seg | ( | struct ARegion * | ar, |
const int | mval_sta[2], | ||
const int | mval_end[2], | ||
int | margin, | ||
float * | depth | ||
) |
Definition at line 3486 of file view3d_edit.c.
References copy_v2_v2_int(), data, depth_segment_cb(), FLT_MAX, NULL, and plot_line_v2v2i().
Referenced by gp_stroke_newfrombuffer().
int ED_view3d_autodist_init | ( | struct Scene * | scene, |
struct ARegion * | ar, | ||
struct View3D * | v3d, | ||
int | mode | ||
) |
Definition at line 3415 of file view3d_edit.c.
References draw_depth(), draw_depth_gpencil(), and NULL.
Referenced by gp_paint_strokeend(), and gp_stroke_addpoint().
int ED_view3d_autodist_simple | ( | struct ARegion * | ar, |
const int | mval[2], | ||
float | mouse_worldloc[3], | ||
int | margin, | ||
float * | force_depth | ||
) |
Definition at line 3431 of file view3d_edit.c.
References bgl_get_mats(), FLT_MAX, bglMats::modelview, p, bglMats::projection, view_autodist_depth_margin(), and bglMats::viewport.
Referenced by gp_stroke_convertcoords().
void ED_view3D_background_image_clear | ( | struct View3D * | v3d | ) |
Definition at line 3602 of file view3d_edit.c.
References View3D::bgpicbase, ED_view3D_background_image_remove(), ListBase::first, and BGpic::next.
Definition at line 3573 of file view3d_edit.c.
References View3D::bgpicbase, BGpic::blend, BLI_addtail(), ImageUser::fie_ima, BGpic::flag, BGpic::iuser, MEM_callocN(), ImageUser::ok, BGpic::size, V3D_BGPIC_EXPANDED, and BGpic::view.
Referenced by background_image_add().
Definition at line 3589 of file view3d_edit.c.
References View3D::bgpicbase, BLI_remlink(), BGpic::clip, MovieClip::id, Image::id, id_us_min(), BGpic::ima, and MEM_freeN().
Referenced by background_image_remove_exec(), and ED_view3D_background_image_clear().
void ED_view3d_calc_camera_border | ( | struct Scene * | scene, |
struct ARegion * | ar, | ||
struct View3D * | v3d, | ||
struct RegionView3D * | rv3d, | ||
struct rctf * | viewborder_r, | ||
short | no_shift | ||
) |
Definition at line 965 of file view3d_draw.c.
References FALSE, and view3d_camera_border().
Referenced by draw_bgpic(), draw_gpencil_view3d(), drawviewborder(), game_engine_exec(), gp_camera_view_subrect(), gp_paint_initstroke(), and render_border_exec().
void ED_view3d_calc_camera_border_size | ( | struct Scene * | scene, |
struct ARegion * | ar, | ||
struct View3D * | v3d, | ||
struct RegionView3D * | rv3d, | ||
float | size_r[2] | ||
) |
Definition at line 956 of file view3d_draw.c.
References TRUE, view3d_camera_border(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by view3d_center_camera_exec(), and view3d_set_1_to_1_viewborder().
void ED_view3d_calc_clipping | ( | struct BoundBox * | bb, |
float | planes[4][4], | ||
struct bglMats * | mats, | ||
const struct rcti * | rect | ||
) |
Referenced by paint_calc_redraw_planes(), and view3d_clipping_exec().
int ED_view3d_camera_lock_check | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 84 of file view3d_edit.c.
References View3D::camera, View3D::flag2, Object::id, ID::lib, NULL, RegionView3D::persp, RV3D_CAMOB, and V3D_LOCK_CAMERA.
Referenced by ED_view3d_camera_lock_init(), ED_view3d_camera_lock_sync(), view3d_all_exec(), view3d_zoom_border_invoke(), viewdolly_poll(), viewmove_apply(), vieworbit_exec(), viewrotate_invoke(), viewselected_exec(), and viewzoom_exec().
void ED_view3d_camera_lock_init | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 92 of file view3d_edit.c.
References View3D::camera, RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_from_object(), NULL, RegionView3D::ofs, and RegionView3D::viewquat.
Referenced by ndof_orbit_invoke(), ndof_pan_invoke(), smooth_view(), and viewops_data_create().
int ED_view3d_camera_lock_sync | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 100 of file view3d_edit.c.
References View3D::camera, DAG_id_tag_update(), RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_to_m4(), ED_view3d_to_object(), FALSE, Object::id, Object::imat, invert_m4_m4(), mult_m4_m4m4(), NC_OBJECT, ND_TRANSFORM, OB_RECALC_OB, object_apply_mat4(), object_tfm_protected_backup(), object_tfm_protected_restore(), Object::obmat, RegionView3D::ofs, Object::parent, Object::protectflag, TRUE, U, UserDef::uiflag, USER_CAM_LOCK_NO_PARENT, RegionView3D::viewquat, and WM_main_add_notifier().
Referenced by ndof_orbit_invoke(), ndof_pan_invoke(), view3d_smoothview_invoke(), viewdolly_apply(), viewmove_apply(), viewrotate_apply(), viewzoom_apply(), and viewzoom_exec().
int ED_view3d_clip_range_get | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d, | ||
float * | clipsta, | ||
float * | clipend | ||
) |
Definition at line 987 of file view3d_view.c.
References camera_params_from_view3d(), camera_params_init(), CameraParams::clipend, CameraParams::clipsta, and CameraParams::is_ortho.
Referenced by project_paint_view_clip().
int ED_view3d_context_activate | ( | struct bContext * | C | ) |
Definition at line 1681 of file view3d_view.c.
References bScreen::areabase, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region_set(), CTX_wm_screen(), ListBase::first, ARegion::next, ScrArea::next, NULL, ScrArea::regionbase, ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by game_engine_exec(), and screen_opengl_render_init().
struct RegionView3D* ED_view3d_context_rv3d | ( | struct bContext * | C | ) | [read] |
Definition at line 139 of file space_view3d.c.
References BKE_area_find_region_type(), CTX_wm_area(), CTX_wm_region_view3d(), NULL, ARegion::regiondata, RGN_TYPE_WINDOW, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by add_nurbs_primitive(), extrude_repeat_mesh_invoke(), render_border_exec(), screw_mesh_invoke(), sort_faces_exec(), spin_exec(), spin_invoke(), and spin_mesh_invoke().
int ED_view3d_context_user_region | ( | struct bContext * | C, |
struct View3D ** | v3d_r, | ||
struct ARegion ** | ar_r | ||
) |
Definition at line 157 of file space_view3d.c.
References CTX_wm_area(), CTX_wm_region(), ListBase::first, ARegion::next, NULL, RegionView3D::persp, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_CAMOB, RV3D_PERSP, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, and RegionView3D::viewlock.
Referenced by ED_operator_rv3d_user_region_poll(), screen_opengl_render_init(), view3d_camera_user_poll(), view3d_center_camera_exec(), view3d_setobjectascamera_exec(), view3d_zoom_1_to_1_camera_exec(), viewnumpad_exec(), vieworbit_exec(), and viewpersportho_exec().
Definition at line 2235 of file view3d_draw.c.
References CD_MASK_MCOL, CD_MASK_MTFACE, CD_MASK_ORCO, View3D::drawtype, ELEM, View3D::flag2, GAME_MAT_GLSL, Scene::gm, GameData::matmode, OB_MATERIAL, OB_SOLID, OB_TEXTURE, scene_use_new_shading_nodes(), and V3D_SOLID_TEX.
Referenced by ED_view3d_screen_datamask(), and screen_opengl_render_init().
float ED_view3d_depth_read_cached | ( | struct ViewContext * | vc, |
int | x, | ||
int | y | ||
) |
Definition at line 728 of file view3d_view.c.
References ViewContext::ar, ViewDepths::depths, RegionView3D::depths, ViewContext::rv3d, ViewDepths::w, simple_enum_gen::w, ARegion::winrct, rcti::xmin, and rcti::ymin.
void ED_view3d_depth_tag_update | ( | struct RegionView3D * | rv3d | ) |
Definition at line 741 of file view3d_view.c.
References ViewDepths::damaged, and RegionView3D::depths.
Referenced by viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), viewmove_invoke(), viewmove_modal(), viewrotate_invoke(), viewrotate_modal(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
void ED_view3d_depth_update | ( | struct ARegion * | ar | ) |
Definition at line 1931 of file view3d_draw.c.
References simple_enum_gen::d, ViewDepths::damaged, ViewDepths::depth_range, ViewDepths::depths, RegionView3D::depths, ViewDepths::h, MEM_callocN(), MEM_freeN(), MEM_mallocN(), ARegion::regiondata, ViewDepths::w, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmin, and rcti::ymin.
Referenced by PE_set_view3d_data().
void ED_view3d_draw_offscreen | ( | struct Scene * | scene, |
struct View3D * | v3d, | ||
struct ARegion * | ar, | ||
int | winx, | ||
int | winy, | ||
float | viewmat[][4], | ||
float | winmat[][4] | ||
) |
Definition at line 2347 of file view3d_draw.c.
References View3D::afterdraw_transp, View3D::afterdraw_xray, View3D::afterdraw_xraytransp, Scene::base, RenderData::color_mgt_flag, copy_v3_v3(), DRAW_CONSTCOLOR, draw_dupli_objects(), draw_dupli_objects_color(), draw_glsl_material(), draw_gpencil_view3d(), draw_object(), DRAW_SCENESET, View3D::drawtype, ED_region_pixelspace(), FALSE, ListBase::first, G, G_RENDER_OGL, GPU_free_images_anim(), gpu_update_lamps_shadows(), World::horr, Base::lay, View3D::lay, linearrgb_to_srgb_v3_v3(), Base::next, NULL, OB_DUPLI, OB_WIRE, Base::object, Scene::r, R_COLOR_MANAGEMENT, ARegion::regiondata, RegionView3D::rflag, RV3D_CLIPPING, Scene::set, SETLOOPER, TH_BACK, TH_WIRE, Object::transflag, TRUE, UI_ThemeClearColor(), UI_ThemeColorBlend(), view3d_clr_clipping(), view3d_draw_clipping(), view3d_draw_transp(), view3d_draw_xray(), view3d_draw_xraytransp(), view3d_main_area_setup_view(), view3d_set_clipping(), ARegion::winrct, ARegion::winx, ARegion::winy, Scene::world, rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and View3D::zbuf.
Referenced by ED_view3d_draw_offscreen_imbuf(), gpu_update_lamps_shadows(), and screen_opengl_render_apply().
struct ImBuf* ED_view3d_draw_offscreen_imbuf | ( | struct Scene * | scene, |
struct View3D * | v3d, | ||
struct ARegion * | ar, | ||
int | sizex, | ||
int | sizey, | ||
unsigned int | flag, | ||
char | err_out[256] | ||
) | [read] |
Definition at line 2478 of file view3d_draw.c.
References View3D::camera, camera_params_compute_matrix(), camera_params_compute_viewplane(), camera_params_from_object(), camera_params_init(), ED_view3d_draw_offscreen(), GPU_offscreen_bind(), GPU_offscreen_create(), GPU_offscreen_free(), GPU_offscreen_read_pixels(), GPU_offscreen_unbind(), IMB_allocImBuf(), IMB_rect_from_float(), NULL, RegionView3D::persp, Scene::r, ImBuf::rect, ImBuf::rect_float, ARegion::regiondata, RV3D_CAMOB, CameraParams::winmat, RenderData::xasp, and RenderData::yasp.
Referenced by ED_view3d_draw_offscreen_imbuf_simple(), and texture_paint_image_from_view_exec().
struct ImBuf* ED_view3d_draw_offscreen_imbuf_simple | ( | Scene * | scene, |
struct Object * | camera, | ||
int | width, | ||
int | height, | ||
unsigned int | flag, | ||
int | drawtype, | ||
char | err_out[256] | ||
) | [read] |
Definition at line 2533 of file view3d_draw.c.
References View3D::camera, camera_params_compute_matrix(), camera_params_compute_viewplane(), camera_params_from_object(), camera_params_init(), CameraParams::clipend, CameraParams::clipsta, copy_m4_m4(), View3D::drawtype, ED_view3d_draw_offscreen_imbuf(), View3D::far, ListBase::first, View3D::flag2, invert_m4_m4(), ListBase::last, Scene::lay, View3D::lay, CameraParams::lens, View3D::lens, mult_m4_m4m4(), View3D::near, normalize_m4(), NULL, Object::obmat, RegionView3D::persinv, RegionView3D::persmat, RegionView3D::persp, Scene::r, View3D::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_CAMOB, V3D_RENDER_OVERRIDE, RegionView3D::viewinv, RegionView3D::viewmat, CameraParams::winmat, RegionView3D::winmat, RenderData::xasp, and RenderData::yasp.
Referenced by blend_file_thumb(), ED_spacetype_sequencer(), and screen_opengl_render_apply().
void ED_view3d_from_m4 | ( | float | mat[][4], |
float | ofs[3], | ||
float | quat[4], | ||
float * | dist | ||
) |
Set the view transformation from a 4x4 matrix.
mat | The view 4x4 transformation matrix to assign. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3511 of file view3d_edit.c.
References copy_m3_m4(), invert_m4_m4(), mat4_to_quat(), mul_m3_v3(), negate_v3_v3(), normalize_m3(), and sub_v3_v3().
Referenced by ED_view3d_from_object().
void ED_view3d_from_object | ( | struct Object * | ob, |
float | ofs[3], | ||
float | quat[4], | ||
float * | dist, | ||
float * | lens | ||
) |
Set the RegionView3D members from an objects transformation and optionally lens.
ob | The object to set the view to. |
ofs | The view offset to be set, normally from RegionView3D.ofs. |
quat | The view rotation to be set, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs to be set, normally from RegionView3D.dist. |
lens | The view lens angle set for cameras and lamps, normally from View3D.lens. |
Definition at line 3552 of file view3d_edit.c.
References camera_params_from_object(), camera_params_init(), ED_view3d_from_m4(), CameraParams::lens, and Object::obmat.
Referenced by ED_view3d_camera_lock_init(), obmat_to_viewmat(), smooth_view(), view3d_align_axis_to_vector(), and viewrotate_invoke().
Definition at line 1389 of file view3d_select.c.
References Scene::base, ListBase::first, MAXPICKBUF, mixed_bones_object_selectbuffer(), mouse_select_eval_buffer(), NULL, ViewContext::scene, view3d_operator_needs_opengl(), and view3d_set_viewcontext().
Referenced by drop_named_image_invoke(), drop_named_material_invoke(), view3d_ima_bg_drop_poll(), and view3d_ima_ob_drop_poll().
void ED_view3d_global_to_vector | ( | struct RegionView3D * | rv3d, |
const float | coord[3], | ||
float | vec[3] | ||
) |
Calculate a normalized 3d direction vector from the viewpoint towards a global location. In orthographic view the resulting vector will match the view vector.
rv3d | The region (used for the window width and height). |
coord | The world-space location. |
vec | The resulting normalized vector. |
Definition at line 617 of file view3d_view.c.
References copy_v3_v3(), RegionView3D::is_persp, mul_m4_v4(), mul_v3_fl(), normalize_v3(), sub_v3_v3v3(), RegionView3D::viewinv, and RegionView3D::viewmat.
Referenced by calc_sculpt_normal(), calc_sculpt_plane(), project_brush_radius(), sculpt_update_cache_invariants(), and test_manipulator_axis().
void ED_view3d_init_mats_rv3d | ( | struct Object * | ob, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 222 of file space_view3d.c.
References ED_view3d_local_clipping(), mult_m4_m4m4(), Object::obmat, RegionView3D::persmat, RegionView3D::persmatob, RegionView3D::viewmat, and RegionView3D::viewmatob.
Referenced by armature_circle_select(), do_lasso_select_curve(), do_lasso_select_lattice(), do_lasso_select_mesh(), do_lattice_box_select(), do_mesh_box_select(), do_nurbs_box_select(), ED_view3d_init_mats_rv3d_gl(), findnearestedge(), findnearestface(), findnearestLattvert(), findnearestNurbvert(), findnearestvert(), lattice_circle_select(), mesh_circle_select(), nurbscurve_circle_select(), pose_circle_select(), sculpt_stroke_test_start(), and xsortvert_flag().
void ED_view3d_init_mats_rv3d_gl | ( | struct Object * | ob, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 232 of file space_view3d.c.
References ED_view3d_init_mats_rv3d(), glMultMatrixf, and Object::obmat.
Referenced by draw_object().
void ED_view3d_local_clipping | ( | struct RegionView3D * | rv3d, |
float | mat[][4] | ||
) |
Definition at line 3121 of file view3d_edit.c.
References calc_local_clipping(), RegionView3D::clip_local, RegionView3D::clipbb, RegionView3D::rflag, and RV3D_CLIPPING.
Referenced by ED_view3d_init_mats_rv3d(), findnearestedge__doClosest(), lattice_foreachScreenVert(), mesh_foreachScreenEdge(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), nurbs_foreachScreenVert(), and project_paint_begin().
int ED_view3d_lock | ( | struct RegionView3D * | rv3d | ) |
Definition at line 1100 of file view3d_view.c.
References cos(), FALSE, M_PI, QUATSET, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, sin(), TRUE, RegionView3D::view, and RegionView3D::viewquat.
Referenced by region_quadview_exec(), and setviewmatrixview3d().
void ED_view3d_ob_project_mat_get | ( | struct RegionView3D * | v3d, |
struct Object * | ob, | ||
float | pmat[4][4] | ||
) |
Definition at line 747 of file view3d_view.c.
References mult_m4_m4m4(), Object::obmat, RegionView3D::viewmat, and RegionView3D::winmat.
Referenced by createSlideVerts(), mesh_rip_invoke(), paint_convert_bb_to_rect(), project_paint_begin(), and sculpt_update_cache_invariants().
uint64_t ED_view3d_object_datamask | ( | struct Scene * | scene | ) |
Definition at line 2255 of file view3d_draw.c.
References Scene::basact, CD_MASK_MCOL, CD_MASK_MTFACE, CD_MASK_WEIGHT_MCOL, Object::mode, NULL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Base::object, and paint_facesel_test().
Referenced by ED_view3d_screen_datamask(), and screen_opengl_render_init().
float ED_view3d_pixel_size | ( | struct RegionView3D * | rv3d, |
const float | co[3] | ||
) |
Definition at line 1842 of file view3d_view.c.
References RegionView3D::persmat, and RegionView3D::pixsize.
Referenced by BIF_draw_manipulator(), draw_new_particle_system(), drawcentercircle(), drawlamp(), and drawSnapping().
void ED_view3d_project_float | ( | const struct ARegion * | a, |
const float | vec[3], | ||
float | adr[2], | ||
float | mat[4][4] | ||
) |
Referenced by createSlideVerts(), draw_bgpic(), mesh_rip_edgedist(), mesh_rip_invoke(), paint_convert_bb_to_rect(), and tex_strength().
Definition at line 304 of file view3d_edit.c.
References ARegion::alignment, ED_area_tag_redraw(), ListBase::last, NULL, ARegion::prev, ScrArea::regionbase, ARegion::regiondata, RegionView3D::rflag, RGN_ALIGN_QSPLIT, RV3D_BOXCLIP, RV3D_BOXVIEW, RV3D_LOCKED, TRUE, view3d_boxview_copy(), and RegionView3D::viewlock.
int ED_view3d_scene_layer_set | ( | int | lay, |
const int * | values, | ||
int * | active | ||
) |
Definition at line 1337 of file view3d_view.c.
References i.
uint64_t ED_view3d_screen_datamask | ( | struct bScreen * | screen | ) |
Definition at line 2280 of file view3d_draw.c.
References bScreen::areabase, CD_MASK_BAREMESH, ED_view3d_datamask(), ED_view3d_object_datamask(), ListBase::first, ScrArea::next, bScreen::scene, SPACE_VIEW3D, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by wm_event_do_notifiers().
int ED_view3d_test_clipping | ( | struct RegionView3D * | rv3d, |
const float | vec[3], | ||
const int | local | ||
) |
Definition at line 212 of file view3d_draw.c.
References RegionView3D::clip, RegionView3D::clip_local, and test_clipping().
Referenced by findnearestedge__doClosest(), project_paint_face_init(), project_paint_occlude_ptv_clip(), project_short(), view3d_project_short_clip(), and view3d_project_short_clip_persmat().
void ED_view3d_to_m4 | ( | float | mat[][4], |
const float | ofs[3], | ||
const float | quat[4], | ||
const float | dist | ||
) |
Calculate the view transformation matrix from RegionView3D input. The resulting matrix is equivilent to RegionView3D.viewinv
mat | The view 4x4 transformation matrix to calculate. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3540 of file view3d_edit.c.
References mul_mat3_m4_v3(), quat_to_mat4(), and sub_v3_v3v3().
Referenced by ED_view3d_camera_lock_sync(), ED_view3d_to_object(), and move_camera().
void ED_view3d_to_object | ( | struct Object * | ob, |
const float | ofs[3], | ||
const float | quat[4], | ||
const float | dist | ||
) |
Set the object transformation from RegionView3D members.
ob | The object which has the transformation assigned. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3566 of file view3d_edit.c.
References ED_view3d_to_m4(), object_apply_mat4(), and TRUE.
Referenced by ED_view3d_camera_lock_sync(), and view3d_camera_to_view_exec().
int ED_view3d_viewplane_get | ( | struct View3D * | v3d, |
struct RegionView3D * | rv3d, | ||
int | winxi, | ||
int | winyi, | ||
struct rctf * | viewplane, | ||
float * | clipsta, | ||
float * | clipend | ||
) |
Definition at line 1001 of file view3d_view.c.
References camera_params_compute_viewplane(), camera_params_from_view3d(), camera_params_init(), CameraParams::clipend, CameraParams::clipsta, CameraParams::is_ortho, and CameraParams::viewplane.
Referenced by screen_opengl_render_apply(), and setwinmatrixview3d().
void ED_view3d_win_to_3d | ( | struct ARegion * | ar, |
const float | depth_pt[3], | ||
const float | mval[2], | ||
float | out[3] | ||
) |
Calculate a 3d location from 2d window coordinates.
ar | The region (used for the window width and height). |
depth_pt | The reference location used to calculate the Z depth. |
mval | The area relative location (such as event->mval converted to floats). |
out | The resulting world-space location. |
Definition at line 663 of file view3d_view.c.
References add_v3_v3v3(), closest_to_line_v3(), copy_v3_v3(), ED_view3d_win_to_vector(), RegionView3D::is_persp, isect_line_plane_v3(), RegionView3D::persinv, ARegion::regiondata, TRUE, RegionView3D::viewinv, ARegion::winx, ARegion::winy, and zero_v3().
Referenced by armature_click_extrude_invoke(), and gp_strokepoint_convertcoords().
void ED_view3d_win_to_delta | ( | struct ARegion * | ar, |
const float | mval[2], | ||
float | out[3] | ||
) |
Calculate a 3d difference vector from 2d window offset. note that initgrabz() must be called first to determine the depth used to calculate the delta.
ar | The region (used for the window width and height). |
mval | The area relative 2d difference (such as event->mval[0] - other_x). |
out | The resulting world-space delta. |
Definition at line 695 of file view3d_view.c.
References RegionView3D::persinv, ARegion::regiondata, ARegion::winx, ARegion::winy, and RegionView3D::zfac.
Referenced by brush_edit_apply(), convertViewVec(), draw_bgpic(), gp_stroke_convertcoords(), paint_calc_object_space_radius(), sculpt_update_brush_delta(), set_3dcursor_invoke(), sk_projectDrawPoint(), view3d_get_view_aligned_coordinate(), view3d_zoom_border_exec(), view_zoom_mouseloc(), viewmove_apply(), and viewpan_exec().
void ED_view3d_win_to_ray | ( | struct ARegion * | ar, |
struct View3D * | v3d, | ||
const float | mval[2], | ||
float | ray_start[3], | ||
float | ray_normal[3] | ||
) |
Calculate a 3d viewpoint and direction vector from 2d window coordinates. This ray_start is located at the viewpoint, ray_normal is the direction towards mval. ray_start is clipped by the view near limit so points in front of it are always in view. In orthographic view the resulting ray_normal will match the view vector.
ar | The region (used for the window width and height). |
v3d | The 3d viewport (used for near clipping value). |
mval | The area relative 2d location (such as event->mval, converted into float[2]). |
ray_start | The world-space starting point of the segment. |
ray_normal | The normalized world-space direction of towards mval. |
Definition at line 608 of file view3d_view.c.
References ED_view3d_win_to_segment_clip(), normalize_v3(), and sub_v3_v3v3().
Referenced by peelObjects(), sk_interpolateDepth(), and snapObjects().
void ED_view3d_win_to_segment_clip | ( | struct ARegion * | ar, |
struct View3D * | v3d, | ||
const float | mval[2], | ||
float | ray_start[3], | ||
float | ray_end[3] | ||
) |
Calculate a 3d segment from 2d window coordinates. This ray_start is located at the viewpoint, ray_end is a far point. ray_start and ray_end are clipped by the view near and far limits so points along this line are always in view. In orthographic view all resulting segments will be parallel.
ar | The region (used for the window width and height). |
v3d | The 3d viewport (used for near and far clipping range). |
mval | The area relative 2d location (such as event->mval, converted into float[2]). |
ray_start | The world-space starting point of the segment. |
ray_end | The world-space end point of the segment. |
Definition at line 573 of file view3d_view.c.
References RegionView3D::clip, clip_line_plane(), copy_v3_v3(), ED_view3d_win_to_vector(), View3D::far, RegionView3D::is_persp, madd_v3_v3v3fl(), mul_m4_v4(), View3D::near, RegionView3D::persinv, ARegion::regiondata, RegionView3D::rflag, RV3D_CLIPPING, RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by brush_add(), ED_view3d_win_to_ray(), sculpt_stroke_get_location(), and sk_getIntersections().
void ED_view3d_win_to_vector | ( | struct ARegion * | ar, |
const float | mval[2], | ||
float | out[3] | ||
) |
Calculate a 3d direction vector from 2d window coordinates. This direction vector starts and the view in the direction of the 2d window coordinates. In orthographic view all window coordinates yield the same vector.
ar | The region (used for the window width and height). |
mval | The area relative 2d location (such as event->mval converted to floats). |
out | The resulting normalized world-space direction vector. |
Definition at line 711 of file view3d_view.c.
References copy_v3_v3(), RegionView3D::is_persp, mul_project_m4_v3(), normalize_v3(), RegionView3D::persinv, ARegion::regiondata, sub_v3_v3(), RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by ED_view3d_win_to_3d(), ED_view3d_win_to_segment_clip(), and viewops_data_create().
int edge_inside_circle | ( | short | centx, |
short | centy, | ||
short | rad, | ||
short | x1, | ||
short | y1, | ||
short | x2, | ||
short | y2 | ||
) |
Definition at line 1626 of file view3d_select.c.
References dist_to_line_segment_v2().
Referenced by armature_circle_select(), gp_stroke_eraser_strokeinside(), and mesh_circle_doSelectEdge().
Definition at line 100 of file view3d_view.c.
References Scene::cursor, View3D::cursor, and View3D::localvd.
Referenced by add_primitive_bone(), add_vertex_invoke(), armature_bone_primitive_add_exec(), armature_calc_roll_exec(), armature_click_extrude_exec(), armature_click_extrude_invoke(), armature_fill_bones_exec(), BIF_draw_manipulator(), calculateCenterCursor(), drawcursor(), dupli_extrude_cursor(), ED_object_location_from_view(), em_snap_to_cursor(), gp_get_3d_reference(), gp_strokepoint_convertcoords(), object_origin_set_exec(), project_paint_begin_clone(), screw_mesh_invoke(), set_3dcursor_invoke(), set_clone_cursor_exec(), setviewmatrixview3d(), snap_curs_to_active(), snap_curs_to_center(), snap_curs_to_grid(), snap_curs_to_sel(), snap_sel_to_curs(), spin_invoke(), spin_mesh_invoke(), uv_map_transform_center(), view3d_all_exec(), viewcenter_cursor_exec(), and Warp().
int initgrabz | ( | struct RegionView3D * | rv3d, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Definition at line 640 of file view3d_view.c.
References FALSE, NULL, RegionView3D::persmat, TRUE, and RegionView3D::zfac.
Referenced by brush_edit_init(), calculateCenter(), draw_bgpic(), gp_paint_initstroke(), paint_calc_object_space_radius(), sculpt_update_brush_delta(), set_3dcursor_invoke(), sk_projectDrawPoint(), view3d_get_view_aligned_coordinate(), view3d_zoom_border_exec(), view_zoom_mouseloc(), viewops_data_create(), and viewpan_exec().
int lasso_inside | ( | int | mcords[][2], |
short | moves, | ||
int | sx, | ||
int | sy | ||
) |
Definition at line 305 of file view3d_select.c.
References cross(), dot(), fabs(), IS_CLIPPED, len(), saacos(), and sqrt().
Referenced by do_lasso_select_armature(), do_lasso_select_curve__doSelect(), do_lasso_select_lattice__doSelect(), do_lasso_select_mesh__doSelectEdge(), do_lasso_select_mesh__doSelectFace(), do_lasso_select_mesh__doSelectVert(), do_lasso_select_meta(), do_lasso_select_objects(), lasso_inside_edge(), and PE_lasso_select().
int lasso_inside_edge | ( | int | mcords[][2], |
short | moves, | ||
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1 | ||
) |
Definition at line 353 of file view3d_select.c.
References IS_CLIPPED, isect_line_line_v2_int(), and lasso_inside().
Referenced by do_lasso_select_armature(), do_lasso_select_mesh__doSelectEdge(), and do_lasso_select_pose().
void lattice_foreachScreenVert | ( | struct ViewContext * | vc, |
void(*)(void *userData, struct BPoint *bp, int x, int y) | func, | ||
void * | userData | ||
) |
Referenced by do_lasso_select_lattice(), do_lattice_box_select(), findnearestLattvert(), and lattice_circle_select().
void mesh_foreachScreenEdge | ( | struct ViewContext * | vc, |
void(*)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index) | func, | ||
void * | userData, | ||
eV3DClipTest | clipVerts | ||
) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), findnearestedge(), and mesh_circle_select().
void mesh_foreachScreenFace | ( | struct ViewContext * | vc, |
void(*)(void *userData, struct EditFace *efa, int x, int y, int index) | func, | ||
void * | userData | ||
) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), findnearestface(), and mesh_circle_select().
void mesh_foreachScreenVert | ( | struct ViewContext * | vc, |
void(*)(void *userData, struct EditVert *eve, int x, int y, int index) | func, | ||
void * | userData, | ||
eV3DClipTest | clipVerts | ||
) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), findnearestvert(), mesh_circle_select(), and xsortvert_flag().
void nurbs_foreachScreenVert | ( | struct ViewContext * | vc, |
void(*)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y) | func, | ||
void * | userData | ||
) |
Referenced by do_lasso_select_curve(), do_nurbs_box_select(), findnearestNurbvert(), and nurbscurve_circle_select().
void project_float | ( | struct ARegion * | ar, |
const float | vec[3], | ||
float | adr[2] | ||
) |
Definition at line 949 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), IS_CLIPPED, mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by applyProject(), knife_cut_exec(), sk_getIntersections(), sk_getSelfIntersections(), and sk_interpolateDepth().
void project_float_noclip | ( | struct ARegion * | ar, |
const float | vec[3], | ||
float | adr[2] | ||
) |
Definition at line 966 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), fabs(), mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by calc_vp_strength_dl(), dupli_extrude_cursor(), EM_project_snap_verts(), projectFloatView(), and weight_sample_invoke().
void project_int | ( | struct ARegion * | ar, |
const float | vec[3], | ||
int | adr[2] | ||
) |
Definition at line 875 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by do_lasso_select_pose(), drawcursor(), gp_stroke_eraser_dostroke(), key_inside_circle(), key_inside_rect(), PE_lasso_select(), snapEdge(), snapVertex(), and updateSelectedSnapPoint().
void project_int_noclip | ( | struct ARegion * | ar, |
const float | vec[3], | ||
int | adr[2] | ||
) |
Definition at line 900 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), fabs(), mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by brush_cut(), gp_stroke_convertcoords(), projectIntView(), set_3dcursor_invoke(), and view3d_get_view_aligned_coordinate().
void project_short | ( | struct ARegion * | ar, |
const float | vec[3], | ||
short | adr[2] | ||
) |
Definition at line 844 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), ED_view3d_test_clipping(), IS_CLIPPED, mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, RegionView3D::rflag, RV3D_CLIPPING, ARegion::winx, and ARegion::winy.
Referenced by armature_circle_select(), do_lasso_select_armature(), do_lasso_select_meta(), do_lasso_select_objects(), draw_object(), key_test_depth(), mouse_select(), object_mouse_select_menu(), pose_circle_select(), and view3d_circle_select_exec().
void project_short_noclip | ( | struct ARegion * | ar, |
const float | vec[3], | ||
short | adr[2] | ||
) |
Definition at line 923 of file view3d_view.c.
References BL_NEAR_CLIP, copy_v3_v3(), IS_CLIPPED, mul_m4_v4(), RegionView3D::persmat, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by sk_detectMergeGesture(), sk_projectDrawPoint(), and sk_snapPointStroke().
void view3d_get_transformation | ( | const struct ARegion * | ar, |
struct RegionView3D * | rv3d, | ||
struct Object * | ob, | ||
struct bglMats * | mats | ||
) |
Referenced by paint_calc_redraw_planes(), paint_stroke_new(), PE_set_view3d_data(), and view3d_clipping_exec().
int view3d_get_view_aligned_coordinate | ( | struct ViewContext * | vc, |
float | fp[3], | ||
const int | mval[2], | ||
const short | do_fallback | ||
) |
Definition at line 104 of file view3d_select.c.
References ViewContext::ar, ED_view3d_win_to_delta(), FALSE, initgrabz(), IS_CLIPPED, negate_v3_v3(), RegionView3D::ofs, project_int_noclip(), ViewContext::rv3d, sub_v3_v3(), TRUE, VECSUB2D, and view3d_get_view_aligned_coordinate().
Referenced by add_vertex_invoke(), dupli_extrude_cursor(), and view3d_get_view_aligned_coordinate().
short view3d_opengl_select | ( | struct ViewContext * | vc, |
unsigned int * | buffer, | ||
unsigned int | bufsize, | ||
rcti * | input | ||
) |
Definition at line 1181 of file view3d_view.c.
References ViewContext::ar, BASACT, Scene::base, BDR_drawSketchNames(), copy_m4_m4(), DRAW_CONSTCOLOR, draw_object(), DRAW_PICKING, View3D::drawtype, Object::dt, Object::dtx, Object::dup_group, FALSE, ListBase::first, Base::flag, free_object_duplilist(), G, G_PICKSEL, View3D::lay, Base::lay, DupliObject::mat, MIN2, mult_m4_m4m4(), DupliObject::next, Base::next, NULL, DupliObject::ob, OB_ARMATURE, OB_DUPLI, OB_FROMDUPLI, OB_MBALL, OB_RESTRICT_SELECT, OB_WIRE, ViewContext::obedit, Base::object, object_duplilist(), Object::obmat, DupliObject::omat, RegionView3D::persmat, Object::restrictflag, RegionView3D::rflag, ViewContext::rv3d, RV3D_CLIPPING, ViewContext::scene, Base::selcol, setwinmatrixview3d(), Object::transflag, TRUE, Object::type, ViewContext::v3d, view3d_clr_clipping(), view3d_set_clipping(), RegionView3D::viewmat, RegionView3D::winmat, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, View3D::xray, rcti::ymax, rctf::ymax, rcti::ymin, rctf::ymin, and View3D::zbuf.
Referenced by do_armature_box_select(), do_meta_box_select(), do_object_pose_box_select(), get_nearest_bone(), get_nearest_editbonepoint(), mixed_bones_object_selectbuffer(), mouse_mball(), and sk_selectStroke().
void view3d_operator_needs_opengl | ( | const struct bContext * | C | ) |
Referenced by armature_select_linked_invoke(), brush_edit_apply(), ED_view3d_give_base_under_cursor(), game_engine_exec(), manipulator_invoke(), mesh_select_loop_invoke(), mesh_shortest_path_select_invoke(), mouse_nurb(), paint_apply(), PE_set_view3d_data(), pose_select_connected_invoke(), ringcut_invoke(), ringcut_modal(), ringsel_invoke(), sculpt_brush_stroke_init(), select_linked_pick_invoke(), set_3dcursor_invoke(), set_clone_cursor_invoke(), view3d_borderselect_exec(), view3d_circle_select_exec(), view3d_clipping_exec(), view3d_lasso_select_exec(), view3d_select_invoke(), view3d_zoom_border_exec(), viewops_data_create(), vpaint_stroke_update_step(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), and wpaint_stroke_update_step().
struct ImBuf* view3d_read_backbuf | ( | struct ViewContext * | vc, |
short | xmin, | ||
short | ymin, | ||
short | xmax, | ||
short | ymax | ||
) | [read] |
Definition at line 1369 of file view3d_draw.c.
References ViewContext::ar, B_ENDIAN, ENDIAN_ORDER, IB_rect, IMB_allocImBuf(), IMB_convert_rgba_to_abgr(), IMB_freeImBuf(), NULL, ImBuf::rect, view3d_validate_backbuf(), ARegion::winrct, ARegion::winx, ARegion::winy, WM_framebuffer_to_index(), rcti::xmin, and rcti::ymin.
Referenced by EM_init_backbuf_border(), EM_init_backbuf_circle(), EM_mask_init_backbuf_border(), sample_backbuf_area(), and view3d_sample_backbuf_rect().
Definition at line 84 of file view3d_view.c.
References glLoadMatrixf, NULL, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, ARegion::swinid, RegionView3D::viewmat, RegionView3D::winmat, and wmSubWindowSet().
Referenced by gp_paint_strokeend(), gp_stroke_addpoint(), and view3d_operator_needs_opengl().
unsigned int view3d_sample_backbuf | ( | struct ViewContext * | vc, |
int | x, | ||
int | y | ||
) |
Definition at line 1350 of file view3d_draw.c.
References ViewContext::ar, B_ENDIAN, ENDIAN_ORDER, SWITCH_INT, view3d_validate_backbuf(), ARegion::winrct, ARegion::winx, ARegion::winy, WM_framebuffer_to_index(), rcti::xmin, and rcti::ymin.
Referenced by facesel_face_pick(), findnearestface(), imapaint_pick_face(), vertsel_vert_pick(), vpaint_stroke_update_step(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), and wpaint_stroke_update_step().
unsigned int view3d_sample_backbuf_rect | ( | struct ViewContext * | vc, |
const int | mval[2], | ||
int | size, | ||
unsigned int | min, | ||
unsigned int | max, | ||
int * | dist, | ||
short | strict, | ||
void * | handle, | ||
unsigned int(*)(void *handle, unsigned int index) | indextest | ||
) |
Definition at line 1422 of file view3d_draw.c.
References distance(), IMB_freeImBuf(), ImBuf::index, size(), sqrt(), and view3d_read_backbuf().
Referenced by facesel_face_pick(), findnearestedge(), findnearestvert(), and vertsel_vert_pick().
void view3d_set_viewcontext | ( | struct bContext * | C, |
struct ViewContext * | vc | ||
) |
Definition at line 93 of file view3d_select.c.
References ViewContext::ar, CTX_data_active_object(), CTX_data_edit_object(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), ViewContext::obact, ViewContext::obedit, ViewContext::rv3d, ViewContext::scene, and ViewContext::v3d.
Referenced by add_vertex_invoke(), ED_view3d_give_base_under_cursor(), em_setup_viewcontext(), facesel_face_pick(), get_nearest_bone(), mouse_armature(), mouse_lattice(), mouse_mball(), mouse_nurb(), mouse_select(), paint_draw_cursor(), paint_stroke_new(), PE_set_view3d_data(), select_linked_pick_invoke(), sk_selectStroke(), texture_paint_init(), vertsel_vert_pick(), view3d_borderselect_exec(), view3d_circle_select_exec(), view3d_clipping_exec(), view3d_lasso_select_exec(), vpaint_stroke_test_start(), weight_paint_sample_enum_itemf(), weight_sample_group_exec(), weight_sample_invoke(), and wpaint_stroke_test_start().
void view3d_validate_backbuf | ( | struct ViewContext * | vc | ) |
Definition at line 1343 of file view3d_draw.c.
References ViewContext::ar, backdrawview3d(), View3D::flag, ViewContext::scene, ViewContext::v3d, and V3D_INVALID_BACKBUF.
Referenced by do_paintface_box_select(), do_paintvert_box_select(), mouse_mesh_loop(), mouse_mesh_shortest_path(), PE_set_view3d_data(), unified_findnearest(), view3d_read_backbuf(), and view3d_sample_backbuf().