Blender V4.3
SnapData Class Reference

#include <transform_snap_object.hh>

Inherited by SnapData_Mesh.

Public Member Functions

 SnapData (SnapObjectContext *sctx, const blender::float4x4 &obmat=blender::float4x4::identity())
 
void clip_planes_enable (SnapObjectContext *sctx, const Object *ob_eval, bool skip_occlusion_plane=false)
 
bool snap_boundbox (const blender::float3 &min, const blender::float3 &max)
 
bool snap_point (const blender::float3 &co, int index=-1)
 
bool snap_edge (const blender::float3 &va, const blender::float3 &vb, int edge_index=-1)
 
eSnapMode snap_edge_points_impl (SnapObjectContext *sctx, int edge_index, float dist_px_sq_orig)
 
void register_result (SnapObjectContext *sctx, const Object *ob_eval, const ID *id_eval)
 
virtual void get_vert_co (const int, const float **)
 
virtual void get_edge_verts_index (const int, int[2])
 
virtual void copy_vert_no (const int, float[3])
 

Static Public Member Functions

static void register_result (SnapObjectContext *sctx, const Object *ob_eval, const ID *id_eval, const blender::float4x4 &obmat, BVHTreeNearest *r_nearest)
 
static void register_result_raycast (SnapObjectContext *sctx, const Object *ob_eval, const ID *id_eval, const blender::float4x4 &obmat, const BVHTreeRayHit *hit, const bool is_in_front)
 

Public Attributes

DistProjectedAABBPrecalc nearest_precalc
 
blender::Vector< blender::float4, MAX_CLIPPLANE_LEN+1 > clip_planes
 
blender::float4x4 pmat_local
 
blender::float4x4 obmat_
 
const bool is_persp
 
bool use_backface_culling
 
BVHTreeNearest nearest_point
 

Detailed Description

Definition at line 119 of file transform_snap_object.hh.

Constructor & Destructor Documentation

◆ SnapData()

Member Function Documentation

◆ clip_planes_enable()

◆ copy_vert_no()

virtual void SnapData::copy_vert_no ( const int ,
float [3] )
inlinevirtual

Reimplemented in SnapData_Mesh.

Definition at line 159 of file transform_snap_object.hh.

Referenced by snap_edge_points_impl().

◆ get_edge_verts_index()

virtual void SnapData::get_edge_verts_index ( const int ,
int [2] )
inlinevirtual

Reimplemented in SnapData_Mesh.

Definition at line 158 of file transform_snap_object.hh.

Referenced by cb_snap_edge(), and snap_edge_points_impl().

◆ get_vert_co()

virtual void SnapData::get_vert_co ( const int ,
const float **  )
inlinevirtual

Reimplemented in SnapData_Mesh.

Definition at line 157 of file transform_snap_object.hh.

Referenced by cb_snap_vert(), and snap_edge_points_impl().

◆ register_result() [1/2]

void SnapData::register_result ( SnapObjectContext * sctx,
const Object * ob_eval,
const ID * id_eval )

Definition at line 305 of file transform_snap_object.cc.

References nearest_point, obmat_, and register_result().

◆ register_result() [2/2]

◆ register_result_raycast()

◆ snap_boundbox()

◆ snap_edge()

bool SnapData::snap_edge ( const blender::float3 & va,
const blender::float3 & vb,
int edge_index = -1 )

◆ snap_edge_points_impl()

◆ snap_point()

Member Data Documentation

◆ clip_planes

◆ is_persp

const bool SnapData::is_persp

Definition at line 126 of file transform_snap_object.hh.

◆ nearest_point

◆ nearest_precalc

◆ obmat_

blender::float4x4 SnapData::obmat_

◆ pmat_local

blender::float4x4 SnapData::pmat_local

Definition at line 124 of file transform_snap_object.hh.

Referenced by SnapData(), and snapMesh().

◆ use_backface_culling

bool SnapData::use_backface_culling

Definition at line 127 of file transform_snap_object.hh.

Referenced by snapMesh().


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