|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | GPUMatrixUnproject_Precalc |
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
Macros | |
| #define | _GPU_MAT3_CONST_CAST(x) |
| #define | _GPU_MAT3_CAST(x) |
| #define | _GPU_MAT4_CONST_CAST(x) |
| #define | _GPU_MAT4_CAST(x) |
| #define | GPU_matrix_mul(x) |
| #define | GPU_matrix_set(x) |
| #define | GPU_matrix_projection_set(x) |
| #define | GPU_matrix_model_view_get(x) |
| #define | GPU_matrix_projection_get(x) |
| #define | GPU_matrix_model_view_projection_get(x) |
| #define | GPU_matrix_normal_get(x) |
| #define | GPU_matrix_normal_inverse_get(x) |
Variables | |
| static constexpr int | GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT = -100 |
| static constexpr int | GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT = 100 |
| #define _GPU_MAT3_CAST | ( | x | ) |
Definition at line 207 of file GPU_matrix.hh.
| #define _GPU_MAT3_CONST_CAST | ( | x | ) |
Definition at line 206 of file GPU_matrix.hh.
| #define _GPU_MAT4_CAST | ( | x | ) |
Definition at line 209 of file GPU_matrix.hh.
| #define _GPU_MAT4_CONST_CAST | ( | x | ) |
Definition at line 208 of file GPU_matrix.hh.
| #define GPU_matrix_model_view_get | ( | x | ) |
Definition at line 216 of file GPU_matrix.hh.
Referenced by blf_batch_draw_begin(), cursor_point_draw(), GPU_matrix_bind(), GPU_matrix_normal_get(), and pygpu_matrix_get_model_view_matrix().
| #define GPU_matrix_model_view_projection_get | ( | x | ) |
Definition at line 218 of file GPU_matrix.hh.
Referenced by GPU_matrix_bind().
| #define GPU_matrix_mul | ( | x | ) |
Definition at line 213 of file GPU_matrix.hh.
Referenced by arrow_draw_intern(), button2d_draw_intern(), clip_draw_grease_pencil(), clip_main_region_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), dial_3d_draw_util(), draw_distortion(), draw_plane_marker_image(), draw_stabilization_border(), draw_tracking_tracks(), blender::ed::transform::drawEdgeSlide(), blender::ed::transform::drawVertSlide(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ed_gizmo_draw_preset_geometry(), ED_mask_draw_region(), ED_view3d_init_mats_rv3d_gl(), EDBM_preselect_edgering_draw(), EDBM_preselect_elem_draw(), gizmo_axis_draw(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_primitive_draw_intern(), GPU_matrix_look_at(), GPU_matrix_rotate_3fv(), GPU_matrix_scale_1f(), GPU_matrix_scale_2f(), GPU_matrix_scale_3f(), GPU_matrix_translate_2f(), GPU_matrix_translate_3f(), move3d_draw_intern(), blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::ed::sculpt_paint::paint_cursor_drawing_setup_cursor_space(), blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), pygpu_matrix_multiply_matrix(), blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), v3d_cursor_snap_draw_fn(), blender::ed::object::voxel_size_edit_draw(), wm_software_cursor_draw_bitmap(), and wm_xr_controller_model_draw().
| #define GPU_matrix_normal_get | ( | x | ) |
Definition at line 220 of file GPU_matrix.hh.
Referenced by GPU_matrix_bind(), GPU_matrix_normal_inverse_get(), and pygpu_matrix_get_normal_matrix().
| #define GPU_matrix_normal_inverse_get | ( | x | ) |
Definition at line 221 of file GPU_matrix.hh.
| #define GPU_matrix_projection_get | ( | x | ) |
Definition at line 217 of file GPU_matrix.hh.
Referenced by blender::ed::vse::draw_cursor_2d(), drw_text_cache_draw_ex(), GPU_matrix_bind(), GPU_polygon_offset(), blender::ed::space_node::node_draw_space(), pygpu_matrix_get_projection_matrix(), ui_update_window_matrix(), and view3d_winmatrix_set().
| #define GPU_matrix_projection_set | ( | x | ) |
Definition at line 215 of file GPU_matrix.hh.
Referenced by blender::ed::vse::draw_cursor_2d(), drw_callbacks_post_scene(), drw_callbacks_pre_scene(), drw_text_cache_draw_ex(), gizmo_ruler_draw(), GPU_polygon_offset(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::space_node::node_draw_space(), pygpu_matrix_load_projection_matrix(), blender::ed::greasepencil::image_render::set_projection_matrix(), v3d_cursor_snap_draw_fn(), view3d_main_region_setup_offscreen(), view3d_main_region_setup_view(), and view3d_region_operator_needs_gpu().
| #define GPU_matrix_set | ( | x | ) |
Definition at line 214 of file GPU_matrix.hh.
Referenced by blf_batch_draw_begin(), cursor_point_draw(), do_lasso_select_mesh(), do_mesh_box_select(), drw_callbacks_post_scene(), drw_callbacks_pre_scene(), gizmo_ruler_draw(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), pygpu_matrix_load_matrix(), blender::ed::greasepencil::image_render::set_view_matrix(), v3d_cursor_snap_draw_fn(), view3d_main_region_setup_offscreen(), view3d_main_region_setup_view(), and view3d_region_operator_needs_gpu().
| void GPU_matrix_bind | ( | blender::gpu::Shader * | shader | ) |
Set uniform values for currently bound shader.
Definition at line 610 of file gpu_matrix.cc.
References GPU_matrix_model_view_get, GPU_matrix_model_view_projection_get, GPU_matrix_normal_get, GPU_matrix_projection_get, gpu_matrix_state_active_set_dirty(), GPU_shader_get_builtin_uniform(), GPU_shader_uniform_float_ex(), GPU_UNIFORM_MODELVIEW, GPU_UNIFORM_MODELVIEW_INV, GPU_UNIFORM_MVP, GPU_UNIFORM_NORMAL, GPU_UNIFORM_PROJECTION, GPU_UNIFORM_PROJECTION_INV, invert_m4(), N, and P.
Referenced by blender::gpu::VKImmediate::end(), GPU_shader_bind(), and immBindShader().
| bool GPU_matrix_dirty_get | ( | ) |
Definition at line 655 of file gpu_matrix.cc.
References blender::gpu::Context::get(), blender::gpu::Context::matrix_state, and state.
Referenced by GPU_shader_bind().
| void GPU_matrix_frustum_set | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far ) |
Definition at line 421 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), left, mat4_frustum_set(), Projection, and top.
Referenced by GPU_matrix_perspective_set(), and view3d_winmatrix_set().
| void GPU_matrix_identity_projection_set | ( | ) |
Definition at line 153 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), Projection, and unit_m4().
Referenced by blender::ed::greasepencil::image_render::clear_projection_matrix(), DRW_draw_render_loop_offscreen(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_begin(), and playanim_toscreen_ex().
| void GPU_matrix_identity_set | ( | ) |
Set the model-view to an identity matrix.
Definition at line 167 of file gpu_matrix.cc.
References gpu_matrix_state_active_set_dirty(), ModelView, and unit_m4().
Referenced by blender::ed::greasepencil::image_render::clear_view_matrix(), blender::ed::space_node::draw_nodespace_back_pix(), blender::ed::transform::drawVertSlide(), DRW_draw_render_loop_offscreen(), drw_text_cache_draw_ex(), ED_region_pixelspace(), ED_view3d_draw_offscreen(), gizmo_ruler_draw(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_begin(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::space_node::node_draw_space(), playanim_toscreen_ex(), pygpu_matrix_load_identity(), UI_block_draw(), UI_view2d_view_restore(), blender::ed::vse::update_gpu_scopes(), wmPartialViewport(), wmViewport(), and wmWindowViewport_ex().
| void GPU_matrix_look_at | ( | float | eyeX, |
| float | eyeY, | ||
| float | eyeZ, | ||
| float | centerX, | ||
| float | centerY, | ||
| float | centerZ, | ||
| float | upX, | ||
| float | upY, | ||
| float | upZ ) |
Definition at line 436 of file gpu_matrix.cc.
References GPU_matrix_mul, GPU_matrix_translate_3f(), and mat4_look_from_origin().
Definition at line 551 of file gpu_matrix.cc.
References copy_m4_m4(), and ModelView.
Definition at line 571 of file gpu_matrix.cc.
References ModelView, mul_m4_m4m4(), and Projection.
| void GPU_matrix_mul | ( | const float | m[4][4] | ) |
Definition at line 245 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), ModelView, and mul_m4_m4_post().
Definition at line 582 of file gpu_matrix.cc.
References copy_m3_m4(), GPU_matrix_model_view_get, invert_m3(), and transpose_m3().
Definition at line 597 of file gpu_matrix.cc.
References GPU_matrix_normal_get, and invert_m3().
Definition at line 413 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), left, mat4_ortho_set(), and top.
| void GPU_matrix_ortho_set | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far ) |
Definition at line 398 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), left, mat4_ortho_set(), Projection, and top.
Referenced by playanim_gpu_matrix(), blender::ed::vse::update_gpu_scopes(), view3d_winmatrix_set(), and wmOrtho2().
Definition at line 405 of file gpu_matrix.cc.
References CHECKMAT, gpu_matrix_state_active_set_dirty(), and Projection.
Referenced by gizmo_axis_draw(), and ui_draw_but_UNITVEC().
Definition at line 429 of file gpu_matrix.cc.
References GPU_matrix_frustum_set(), M_PI, and tanf.
| void GPU_matrix_pop | ( | ) |
Definition at line 125 of file gpu_matrix.cc.
References BLI_assert, gpu_matrix_state_active_set_dirty(), and ModelViewStack.
Referenced by arrow_draw_geom(), arrow_draw_intern(), blf_batch_draw_begin(), blf_draw_gpu__end(), button2d_draw_intern(), clip_draw_grease_pencil(), clip_main_region_draw(), cursor_point_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), dial_3d_draw_util(), dial_ghostarc_draw_helpline(), blender::render::hydra::DrawTexture::draw(), blender::ed::vse::draw_channel_headers(), draw_cross(), blender::ed::vse::draw_cursor_2d(), draw_distortion(), draw_fcurve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), draw_marker_areas(), draw_marker_outline(), draw_marker_slide_zones(), blender::ed::space_node::draw_nodespace_back_pix(), draw_plane_marker_image(), draw_render_info(), draw_stabilization_border(), blender::ed::vse::draw_strip_in_view(), draw_tracking_tracks(), blender::ed::transform::drawEdgeSlide(), blender::ed::transform::drawLine(), blender::ed::transform::drawPropCircle(), blender::ed::transform::drawVertSlide(), drw_text_cache_draw_ex(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ed_gizmo_draw_preset_geometry(), ED_markers_draw(), ED_mask_draw_region(), ED_region_image_metadata_draw(), ED_region_image_render_region_draw(), ED_view3d_draw_offscreen(), EDBM_preselect_edgering_draw(), EDBM_preselect_elem_draw(), gizmo_axis_draw(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_primitive_draw_intern(), gizmo_ruler_draw(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_end(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), move3d_draw_intern(), blender::ed::space_node::node_draw_space(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::ed::sculpt_paint::paint_draw_alpha_overlay(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), playanim_toscreen_ex(), pygpu_matrix_pop(), pygpu_matrix_stack_context_exit(), radial_control_paint_cursor(), radial_control_paint_tex(), region_draw_azones(), blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), tracking_segment_knot_cb(), blender::ed::transform::transform_draw_cursor_draw(), UI_block_draw(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_pie_center(), blender::ed::vse::update_gpu_scopes(), blender::ed::object::voxel_size_edit_draw(), wm_software_cursor_draw_bitmap(), wm_xr_controller_model_draw(), and wm_xr_raycast_destination_draw().
| void GPU_matrix_pop_projection | ( | ) |
Definition at line 139 of file gpu_matrix.cc.
References BLI_assert, gpu_matrix_state_active_set_dirty(), and ProjectionStack.
Referenced by action_main_region_draw_overlay(), draw_horizontal_scale_indicators(), blender::ed::space_node::draw_nodespace_back_pix(), blender::ed::vse::draw_retiming_continuity_ranges(), blender::ed::vse::draw_strip_thumbnails(), blender::ed::vse::draw_strips_background(), blender::ed::vse::draw_strips_foreground(), blender::ed::space_node::draw_tree_path(), draw_vertical_scale_indicators(), blender::ed::transform::drawSnapping(), blender::ed::transform::drawVertSlide(), drw_callbacks_post_scene_2D(), ED_time_scrub_channel_search_draw(), ED_time_scrub_draw(), ED_time_scrub_draw_current_frame(), ED_view3d_draw_offscreen(), gizmo_axis_draw(), gizmo_ruler_draw(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_end(), knifetool_draw(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), playanim_toscreen_ex(), pygpu_matrix_pop_projection(), pygpu_matrix_stack_context_exit(), blender::ed::vse::sequencer_retiming_keys_draw(), UI_block_draw(), ui_draw_but_UNITVEC(), blender::ed::vse::update_gpu_scopes(), and view2d_draw_lines_internal().
| void GPU_matrix_project_2fv | ( | const float | world[3], |
| const float | model[4][4], | ||
| const float | proj[4][4], | ||
| const int | view[4], | ||
| float | r_win[2] ) |
Definition at line 480 of file gpu_matrix.cc.
References mul_m4_v4(), mul_v2_fl(), mul_v4_m4v3(), v, and view.
Referenced by ED_view3d_project_v2().
| void GPU_matrix_project_3fv | ( | const float | world[3], |
| const float | model[4][4], | ||
| const float | proj[4][4], | ||
| const int | view[4], | ||
| float | r_win[3] ) |
Definition at line 460 of file gpu_matrix.cc.
References mul_m4_v4(), mul_v3_fl(), mul_v4_m4v3(), v, and view.
Referenced by ED_view3d_project_v3().
Definition at line 561 of file gpu_matrix.cc.
References copy_m4_m4(), and Projection.
| void GPU_matrix_projection_set | ( | const float | m[4][4] | ) |
Definition at line 160 of file gpu_matrix.cc.
References CHECKMAT, copy_m4_m4(), gpu_matrix_state_active_set_dirty(), and Projection.
| void GPU_matrix_push | ( | ) |
Push a new matrix unto the stack (copying the previous matrix).
Definition at line 118 of file gpu_matrix.cc.
References BLI_assert, copy_m4_m4(), MATRIX_STACK_DEPTH, ModelView, and ModelViewStack.
Referenced by arrow_draw_geom(), arrow_draw_intern(), blf_batch_draw_begin(), blf_draw_gpu__start(), button2d_draw_intern(), clip_draw_grease_pencil(), clip_main_region_draw(), cursor_point_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), dial_3d_draw_util(), dial_ghostarc_draw_helpline(), blender::render::hydra::DrawTexture::draw(), blender::ed::vse::draw_channel_headers(), draw_cross(), blender::ed::vse::draw_cursor_2d(), draw_distortion(), draw_fcurve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), draw_marker_areas(), draw_marker_outline(), draw_marker_slide_zones(), blender::ed::space_node::draw_nodespace_back_pix(), draw_plane_marker_image(), draw_render_info(), draw_stabilization_border(), blender::ed::vse::draw_strip_in_view(), draw_tracking_tracks(), blender::ed::transform::drawEdgeSlide(), blender::ed::transform::drawLine(), blender::ed::transform::drawPropCircle(), blender::ed::transform::drawVertSlide(), drw_text_cache_draw_ex(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ed_gizmo_draw_preset_geometry(), ED_markers_draw(), ED_mask_draw_region(), ED_region_image_metadata_draw(), ED_region_image_render_region_draw(), ED_view3d_draw_offscreen(), EDBM_preselect_edgering_draw(), EDBM_preselect_elem_draw(), gizmo_axis_draw(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_primitive_draw_intern(), gizmo_ruler_draw(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_begin(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), move3d_draw_intern(), blender::ed::space_node::node_draw_space(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::ed::sculpt_paint::paint_draw_alpha_overlay(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), playanim_toscreen_ex(), pygpu_matrix_push(), pygpu_matrix_stack_context_enter(), radial_control_paint_cursor(), radial_control_paint_tex(), region_draw_azones(), blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), tracking_segment_knot_cb(), blender::ed::transform::transform_draw_cursor_draw(), UI_block_draw(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_pie_center(), blender::ed::vse::update_gpu_scopes(), blender::ed::object::voxel_size_edit_draw(), wm_software_cursor_draw_bitmap(), wm_xr_controller_model_draw(), and wm_xr_raycast_destination_draw().
| void GPU_matrix_push_projection | ( | ) |
Definition at line 132 of file gpu_matrix.cc.
References BLI_assert, copy_m4_m4(), MATRIX_STACK_DEPTH, Projection, and ProjectionStack.
Referenced by action_main_region_draw_overlay(), draw_horizontal_scale_indicators(), blender::ed::space_node::draw_nodespace_back_pix(), blender::ed::vse::draw_retiming_continuity_ranges(), blender::ed::vse::draw_strip_thumbnails(), blender::ed::vse::draw_strips_background(), blender::ed::vse::draw_strips_foreground(), blender::ed::space_node::draw_tree_path(), draw_vertical_scale_indicators(), blender::ed::transform::drawSnapping(), blender::ed::transform::drawVertSlide(), drw_callbacks_post_scene_2D(), ED_time_scrub_channel_search_draw(), ED_time_scrub_draw(), ED_time_scrub_draw_current_frame(), ED_view3d_draw_offscreen(), gizmo_axis_draw(), gizmo_ruler_draw(), GPU_viewport_stereo_composite(), blender::ed::greasepencil::image_render::image_render_begin(), knifetool_draw(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), playanim_toscreen_ex(), pygpu_matrix_push_projection(), pygpu_matrix_stack_context_enter(), blender::ed::vse::sequencer_retiming_keys_draw(), UI_block_draw(), ui_draw_but_UNITVEC(), blender::ed::vse::update_gpu_scopes(), and view2d_draw_lines_internal().
| void GPU_matrix_reset | ( | ) |
To Identity transform & empty stack.
Definition at line 85 of file gpu_matrix.cc.
References blender::gpu::Context::get(), gpu_matrix_state_active_set_dirty(), blender::gpu::Context::matrix_state, ModelView, Projection, state, and unit_m4().
Referenced by pygpu_matrix_reset(), and screen_opengl_render_doit().
| void GPU_matrix_rotate_2d | ( | float | deg | ) |
Definition at line 252 of file gpu_matrix.cc.
References DEG2RADF, ModelView, and rotate_m4().
Referenced by blf_draw_gpu__start(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), and radial_control_paint_tex().
Axis of rotation should be a unit vector.
Definition at line 260 of file gpu_matrix.cc.
References GPU_matrix_rotate_3fv(), x, y, and z().
Referenced by dial_ghostarc_draw_helpline(), and radial_control_paint_cursor().
Axis of rotation should be a unit vector.
Definition at line 266 of file gpu_matrix.cc.
References axis_angle_to_mat4(), DEG2RADF, and GPU_matrix_mul.
Referenced by GPU_matrix_rotate_3f().
| void GPU_matrix_rotate_axis | ( | float | deg, |
| char | axis ) |
Definition at line 273 of file gpu_matrix.cc.
References CHECKMAT, DEG2RADF, gpu_matrix_state_active_set_dirty(), ModelView, and rotate_m4().
Referenced by blender::ed::transform::transform_draw_cursor_draw().
| void GPU_matrix_scale_1f | ( | float | factor | ) |
Scale the model-view matrix.
Definition at line 208 of file gpu_matrix.cc.
References GPU_matrix_mul, and scale_m4_fl().
Referenced by blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), gizmo_axis_draw(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), pygpu_matrix_scale_uniform(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), wm_xr_controller_model_draw(), and wm_xr_raycast_destination_draw().
Definition at line 215 of file gpu_matrix.cc.
References GPU_matrix_mul, x, and y.
Referenced by button2d_draw_intern(), clip_main_region_draw(), blender::render::hydra::DrawTexture::draw(), draw_cross(), blender::ed::vse::draw_cursor_2d(), draw_distortion(), draw_fcurve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), draw_render_info(), draw_stabilization_border(), draw_tracking_tracks(), blender::ed::transform::drawPropCircle(), blender::ed::transform::drawVertSlide(), ED_markers_draw(), ED_mask_draw_region(), ED_region_image_metadata_draw(), ED_region_image_render_region_draw(), GPU_matrix_scale_2fv(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), playanim_toscreen_ex(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), tracking_segment_knot_cb(), and ui_draw_but_WAVEFORM().
| void GPU_matrix_scale_2fv | ( | const float | vec[2] | ) |
Definition at line 225 of file gpu_matrix.cc.
References GPU_matrix_scale_2f().
Referenced by pygpu_matrix_scale(), and radial_control_paint_cursor().
Definition at line 230 of file gpu_matrix.cc.
References GPU_matrix_mul, x, y, and z().
Referenced by arrow_draw_geom(), and GPU_matrix_scale_3fv().
| void GPU_matrix_scale_3fv | ( | const float | vec[3] | ) |
Definition at line 240 of file gpu_matrix.cc.
References GPU_matrix_scale_3f().
Referenced by blf_draw_gpu__start(), and pygpu_matrix_scale().
| void GPU_matrix_set | ( | const float | m[4][4] | ) |
Definition at line 146 of file gpu_matrix.cc.
References CHECKMAT, copy_m4_m4(), gpu_matrix_state_active_set_dirty(), and ModelView.
Definition at line 173 of file gpu_matrix.cc.
References GPU_matrix_mul, unit_m4(), x, and y.
Referenced by button2d_draw_intern(), clip_main_region_draw(), blender::render::hydra::DrawTexture::draw(), blender::ed::vse::draw_cursor_2d(), draw_distortion(), draw_fcurve(), draw_fcurve_curve_keys(), draw_fcurve_curve_samples(), draw_render_info(), draw_stabilization_border(), draw_tracking_tracks(), ED_image_draw_cursor(), ED_mask_draw_region(), ED_region_image_metadata_draw(), ED_region_image_render_region_draw(), GPU_matrix_translate_2fv(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::paint_draw_alpha_overlay(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), playanim_toscreen_ex(), radial_control_paint_cursor(), region_draw_azones(), screen_opengl_render_doit(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), tracking_segment_knot_cb(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), and ui_draw_pie_center().
| void GPU_matrix_translate_2fv | ( | const float | vec[2] | ) |
Definition at line 182 of file gpu_matrix.cc.
References GPU_matrix_translate_2f().
Referenced by clip_draw_grease_pencil(), draw_cross(), draw_marker_areas(), draw_marker_outline(), draw_marker_slide_zones(), ED_image_draw_cursor(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), and pygpu_matrix_translate().
Definition at line 187 of file gpu_matrix.cc.
References CHECKMAT, GPU_matrix_mul, gpu_matrix_state_active_set_dirty(), ModelView, translate_m4(), unit_m4(), x, y, and z().
Referenced by arrow_draw_geom(), blf_draw_gpu__start(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), GPU_matrix_look_at(), GPU_matrix_translate_3fv(), and blender::ed::transform::transform_draw_cursor_draw().
| void GPU_matrix_translate_3fv | ( | const float | vec[3] | ) |
Definition at line 203 of file gpu_matrix.cc.
References GPU_matrix_translate_3f().
Referenced by gizmo_axis_draw(), pygpu_matrix_translate(), and wm_xr_raycast_destination_draw().
| bool GPU_matrix_unproject_3fv | ( | const float | win[3], |
| const float | model_inverted[4][4], | ||
| const float | proj[4][4], | ||
| const int | view[4], | ||
| float | r_world[3] ) |
The same result could be obtained as follows:
But that solution loses much precision. Therefore, get the same result without inverting the project view matrix.
Definition at line 499 of file gpu_matrix.cc.
References FLT_MAX, in, is_finite_v3(), isinf, mul_v3_m4v3(), out, view, and zero_v3().
Referenced by ED_view3d_unproject_v3(), and gizmo_find_intersected_3d_intern().
| bool GPU_matrix_unproject_precalc | ( | GPUMatrixUnproject_Precalc * | unproj_precalc, |
| const float | model[4][4], | ||
| const float | proj[4][4], | ||
| const int | view[4] ) |
Definition at line 721 of file gpu_matrix.cc.
References GPU_matrix_projection_get, GPU_matrix_projection_set, and GPU_polygon_offset_calc().
Referenced by annotation_draw_strokes(), blender::ed::greasepencil::image_render::draw_grease_pencil_strokes(), ED_view3d_polygon_offset(), and knifetool_draw().
Own working polygon offset.
Definition at line 690 of file gpu_matrix.cc.
References float, and UNUSED_VARS.
Referenced by GPU_polygon_offset(), blender::draw::View::OffsetData::polygon_offset_factor(), and blender::draw::View::OffsetData::winmat_polygon_offset().
|
staticconstexpr |
Definition at line 227 of file GPU_matrix.hh.
Referenced by wmGetProjectionMatrix(), and wmOrtho2().
|
staticconstexpr |
Definition at line 226 of file GPU_matrix.hh.
Referenced by gizmo_axis_draw(), ui_draw_but_UNITVEC(), wmGetProjectionMatrix(), and wmOrtho2().