|
Blender V5.0
|
#include <ED_grease_pencil.hh>
Definition at line 129 of file ED_grease_pencil.hh.
|
default |
References depsgraph, DrawingPlacement(), and pos.
Referenced by DrawingPlacement(), DrawingPlacement(), DrawingPlacement(), DrawingPlacement(), operator=(), and operator=().
| blender::ed::greasepencil::DrawingPlacement::DrawingPlacement | ( | const Scene & | scene, |
| const ARegion & | region, | ||
| const View3D & | view3d, | ||
| const Object & | eval_object, | ||
| const bke::greasepencil::Layer * | layer ) |
Definition at line 49 of file grease_pencil_utils.cc.
References ToolSettings::gp_sculpt, blender::math::invert(), GP_Sculpt_Settings::lock_axis, switch(), blender::bke::greasepencil::Layer::to_world_space(), and Scene::toolsettings.
| blender::ed::greasepencil::DrawingPlacement::DrawingPlacement | ( | const Scene & | scene, |
| const ARegion & | region, | ||
| const View3D & | view3d, | ||
| const Object & | eval_object, | ||
| const bke::greasepencil::Layer * | layer, | ||
| ReprojectMode | reproject_mode, | ||
| float | surface_offset = 0.0f, | ||
| ViewDepths * | view_depths = nullptr ) |
Construct the object based on a ReprojectMode enum instead of Scene values.
Definition at line 131 of file grease_pencil_utils.cc.
References blender::ed::greasepencil::Cursor, Scene::cursor, DrawingPlacement(), ELEM, blender::ed::greasepencil::Front, blender::math::invert(), View3DCursor::location, blender::ed::greasepencil::ObjectOrigin, plane_from_point_normal_v3(), blender::ed::greasepencil::Side, blender::ed::greasepencil::Surface, switch(), blender::bke::greasepencil::Layer::to_world_space(), blender::ed::greasepencil::Top, blender::math::transform_direction(), blender::math::transpose(), and blender::ed::greasepencil::View.
| blender::ed::greasepencil::DrawingPlacement::DrawingPlacement | ( | const DrawingPlacement & | other | ) |
Definition at line 209 of file grease_pencil_utils.cc.
References ViewDepths::depths, DrawingPlacement(), and MEM_dupallocN().
| blender::ed::greasepencil::DrawingPlacement::DrawingPlacement | ( | DrawingPlacement && | other | ) |
Definition at line 233 of file grease_pencil_utils.cc.
References DrawingPlacement().
| blender::ed::greasepencil::DrawingPlacement::~DrawingPlacement | ( | ) |
Definition at line 274 of file grease_pencil_utils.cc.
References ED_view3d_depths_free().
| void blender::ed::greasepencil::DrawingPlacement::cache_viewport_depths | ( | Depsgraph * | depsgraph, |
| ARegion * | region, | ||
| View3D * | view3d ) |
Definition at line 291 of file grease_pencil_utils.cc.
References depsgraph, ED_view3d_depth_override(), use_project_to_stroke(), use_project_to_surface(), V3D_DEPTH_GPENCIL_ONLY, V3D_DEPTH_NO_GPENCIL, V3D_DEPTH_SELECTED_ONLY, and V3D_GP_FORCE_STROKE_ORDER_3D.
Referenced by blender::ed::greasepencil::fill_strokes(), and blender::ed::greasepencil::grease_pencil_primitive_invoke().
Return depth buffer if possible.
Definition at line 332 of file grease_pencil_utils.cc.
References ED_view3d_depth_read_cached().
Referenced by project_depth().
| DrawingPlacement & blender::ed::greasepencil::DrawingPlacement::operator= | ( | const DrawingPlacement & | other | ) |
Definition at line 254 of file grease_pencil_utils.cc.
References DrawingPlacement().
| DrawingPlacement & blender::ed::greasepencil::DrawingPlacement::operator= | ( | DrawingPlacement && | other | ) |
Definition at line 264 of file grease_pencil_utils.cc.
References DrawingPlacement().
Convert a screen space coordinate with depth to the local drawing space.
Definition at line 405 of file grease_pencil_utils.cc.
References ED_view3d_unproject_v3(), and blender::math::transform_point().
Definition at line 372 of file grease_pencil_utils.cc.
References project().
Projects a screen space coordinate to the local drawing space.
Definition at line 353 of file grease_pencil_utils.cc.
References ED_view3d_win_to_3d(), ED_view3d_win_to_3d_on_plane(), blender::ed::greasepencil::Surface, and blender::math::transform_point().
Referenced by blender::ed::greasepencil::calculate_texture_space(), blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw(), blender::ed::greasepencil::grease_pencil_primitive_drag_all_update(), blender::ed::greasepencil::grease_pencil_primitive_drag_update(), blender::ed::greasepencil::grease_pencil_primitive_event_modal_map(), blender::ed::greasepencil::grease_pencil_primitive_extruding_update(), blender::ed::greasepencil::grease_pencil_primitive_grab_update(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::greasepencil::grease_pencil_primitive_mouse_event(), blender::ed::greasepencil::grease_pencil_primitive_rotate_all_update(), blender::ed::greasepencil::grease_pencil_primitive_scale_all_update(), blender::ed::greasepencil::grease_pencil_primitive_update_curves(), project(), blender::ed::greasepencil::GreasePencilPenToolOperation::project(), and blender::ed::greasepencil::render_strokes().
| void blender::ed::greasepencil::DrawingPlacement::project | ( | Span< float2 > | src, |
| MutableSpan< float3 > | dst ) const |
Definition at line 396 of file grease_pencil_utils.cc.
References blender::Span< T >::index_range(), and blender::threading::parallel_for().
| std::optional< float3 > blender::ed::greasepencil::DrawingPlacement::project_depth | ( | float2 | co | ) | const |
Attempt to project from the depth buffer.
Definition at line 315 of file grease_pencil_utils.cc.
References ED_view3d_depth_unproject_v3(), ED_view3d_win_to_vector(), and get_depth().
Projects a screen space coordinate to the local drawing space including camera shift.
Definition at line 378 of file grease_pencil_utils.cc.
References ED_view3d_win_to_3d_on_plane(), ED_view3d_win_to_3d_with_shift(), blender::ed::greasepencil::Surface, and blender::math::transform_point().
Referenced by blender::ed::greasepencil::boundary_to_curves().
Projects a 3D position (in local space) to the drawing plane.
Definition at line 412 of file grease_pencil_utils.cc.
References ED_view3d_project_float_global(), RegionView3D::is_persp, isect_ray_plane_v3(), blender::math::normalize(), plane_from_point_normal_v3(), pos, blender::ed::greasepencil::Surface, blender::math::transform_point(), V3D_PROJ_TEST_NOP, and RegionView3D::viewinv.
Referenced by blender::ed::greasepencil::grease_pencil_reproject_exec(), and blender::ed::sculpt_paint::greasepencil::outline_stroke().
| void blender::ed::greasepencil::DrawingPlacement::reproject | ( | Span< float3 > | src, |
| MutableSpan< float3 > | dst ) const |
Definition at line 456 of file grease_pencil_utils.cc.
References blender::Span< T >::index_range(), and blender::threading::parallel_for().
| float4x4 blender::ed::greasepencil::DrawingPlacement::to_world_space | ( | ) | const |
Definition at line 465 of file grease_pencil_utils.cc.
Referenced by blender::ed::greasepencil::boundary_to_curves(), blender::ed::greasepencil::draw_control_points(), blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw(), and blender::ed::greasepencil::grease_pencil_primitive_update_curves().
| bool blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke | ( | ) | const |
Definition at line 286 of file grease_pencil_utils.cc.
References blender::ed::greasepencil::Stroke.
Referenced by cache_viewport_depths(), blender::ed::greasepencil::fill_strokes(), and blender::ed::greasepencil::grease_pencil_primitive_invoke().
| bool blender::ed::greasepencil::DrawingPlacement::use_project_to_surface | ( | ) | const |
Definition at line 281 of file grease_pencil_utils.cc.
References blender::ed::greasepencil::Surface.
Referenced by cache_viewport_depths(), blender::ed::greasepencil::fill_strokes(), and blender::ed::greasepencil::grease_pencil_primitive_invoke().