Blender V4.3
blender::ed::greasepencil::DrawingPlacement Class Reference

#include <ED_grease_pencil.hh>

Public Member Functions

 DrawingPlacement ()=default
 DrawingPlacement (const Scene &scene, const ARegion &region, const View3D &view3d, const Object &eval_object, const bke::greasepencil::Layer *layer)
 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)
 DrawingPlacement (const DrawingPlacement &other)
 DrawingPlacement (DrawingPlacement &&other)
DrawingPlacementoperator= (const DrawingPlacement &other)
DrawingPlacementoperator= (DrawingPlacement &&other)
 ~DrawingPlacement ()
bool use_project_to_surface () const
bool use_project_to_nearest_stroke () const
void cache_viewport_depths (Depsgraph *depsgraph, ARegion *region, View3D *view3d)
void set_origin_to_nearest_stroke (float2 co)
float3 project (float2 co) const
void project (Span< float2 > src, MutableSpan< float3 > dst) const
float3 project_with_shift (float2 co) const
float3 reproject (float3 pos) const
void reproject (Span< float3 > src, MutableSpan< float3 > dst) const
float4x4 to_world_space () const

Detailed Description

Definition at line 118 of file ED_grease_pencil.hh.

Constructor & Destructor Documentation

◆ DrawingPlacement() [1/5]

blender::ed::greasepencil::DrawingPlacement::DrawingPlacement ( )
default

◆ DrawingPlacement() [2/5]

blender::ed::greasepencil::DrawingPlacement::DrawingPlacement ( const Scene & scene,
const ARegion & region,
const View3D & view3d,
const Object & eval_object,
const bke::greasepencil::Layer * layer )

◆ DrawingPlacement() [3/5]

◆ DrawingPlacement() [4/5]

blender::ed::greasepencil::DrawingPlacement::DrawingPlacement ( const DrawingPlacement & other)

Definition at line 196 of file grease_pencil_utils.cc.

References ViewDepths::depths, DrawingPlacement(), and MEM_dupallocN.

◆ DrawingPlacement() [5/5]

blender::ed::greasepencil::DrawingPlacement::DrawingPlacement ( DrawingPlacement && other)

Definition at line 220 of file grease_pencil_utils.cc.

References DrawingPlacement().

◆ ~DrawingPlacement()

blender::ed::greasepencil::DrawingPlacement::~DrawingPlacement ( )

Definition at line 261 of file grease_pencil_utils.cc.

References ED_view3d_depths_free().

Member Function Documentation

◆ cache_viewport_depths()

void blender::ed::greasepencil::DrawingPlacement::cache_viewport_depths ( Depsgraph * depsgraph,
ARegion * region,
View3D * view3d )

◆ operator=() [1/2]

DrawingPlacement & blender::ed::greasepencil::DrawingPlacement::operator= ( const DrawingPlacement & other)

Definition at line 241 of file grease_pencil_utils.cc.

References DrawingPlacement().

◆ operator=() [2/2]

DrawingPlacement & blender::ed::greasepencil::DrawingPlacement::operator= ( DrawingPlacement && other)

Definition at line 251 of file grease_pencil_utils.cc.

References DrawingPlacement().

◆ project() [1/2]

◆ project() [2/2]

void blender::ed::greasepencil::DrawingPlacement::project ( Span< float2 > src,
MutableSpan< float3 > dst ) const

◆ project_with_shift()

float3 blender::ed::greasepencil::DrawingPlacement::project_with_shift ( float2 co) const

Projects a screen space coordinate to the local drawing space including camera shift.

Definition at line 345 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, blender::math::transform_point(), and blender::ed::greasepencil::View.

Referenced by blender::ed::greasepencil::boundary_to_curves().

◆ reproject() [1/2]

◆ reproject() [2/2]

void blender::ed::greasepencil::DrawingPlacement::reproject ( Span< float3 > src,
MutableSpan< float3 > dst ) const

◆ set_origin_to_nearest_stroke()

void blender::ed::greasepencil::DrawingPlacement::set_origin_to_nearest_stroke ( float2 co)

◆ to_world_space()

◆ use_project_to_nearest_stroke()

bool blender::ed::greasepencil::DrawingPlacement::use_project_to_nearest_stroke ( ) const

◆ use_project_to_surface()

bool blender::ed::greasepencil::DrawingPlacement::use_project_to_surface ( ) const

The documentation for this class was generated from the following files: