Blender V5.3
blender::SDefBindPoly Struct Reference

Public Attributes

float(* coords )[3]
float(* coords_v2 )[2]
float point_v2 [2]
float weight_angular
float weight_dist_proj
float weight_dist
float weight
float scales [2]
float scale_mid
float centroid [3]
float centroid_v2 [2]
float normal [3]
float cent_edgemid_vecs_v2 [2][2]
float edgemid_angle
float point_edgemid_angles [2]
float corner_edgemid_angles [2]
float dominant_angle_weight
uint index
uint verts_num
uint loopstart
uint edge_inds [2]
uint edge_vert_inds [2]
uint corner_ind
uint dominant_edge
bool inside

Detailed Description

This represents the relationship between a point (a source coordinate) and the face-corner it's being bound to (from the target mesh).

Note
Some of these values could be de-duplicated however these are only needed once when running bind, so optimizing this structure isn't a priority.

Definition at line 95 of file MOD_surfacedeform.cc.

Member Data Documentation

◆ cent_edgemid_vecs_v2

float blender::SDefBindPoly::cent_edgemid_vecs_v2[2][2]

Vectors pointing from the centroid to the midpoints of the two edges flanking the corner vertex.

Definition at line 128 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ centroid

float blender::SDefBindPoly::centroid[3]

Center of coords

Definition at line 117 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ centroid_v2

float blender::SDefBindPoly::centroid_v2[2]

Center of coords_v2

Definition at line 119 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ coords

float(* blender::SDefBindPoly::coords)[3]

Coordinates copied directly from the modifiers input.

Definition at line 97 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), blender::computeBindWeights(), and blender::freeBindData().

◆ coords_v2

float(* blender::SDefBindPoly::coords_v2)[2]

Coordinates projected into 2D space using normal.

Definition at line 99 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), blender::computeBindWeights(), and blender::freeBindData().

◆ corner_edgemid_angles

float blender::SDefBindPoly::corner_edgemid_angles[2]

Angles between the centroid-to-corner and cent_edgemid_vecs_v2 vectors.

Definition at line 137 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ corner_ind

uint blender::SDefBindPoly::corner_ind

The index of this corner in the face (starting at zero).

Definition at line 155 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ dominant_angle_weight

float blender::SDefBindPoly::dominant_angle_weight

Weight of the bind mode based on the corner and two adjacent vertices, versus the one based on the centroid and the dominant edge.

Definition at line 142 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ dominant_edge

uint blender::SDefBindPoly::dominant_edge

Definition at line 156 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ edge_inds

uint blender::SDefBindPoly::edge_inds[2]

Definition at line 152 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ edge_vert_inds

uint blender::SDefBindPoly::edge_vert_inds[2]

Definition at line 153 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ edgemid_angle

float blender::SDefBindPoly::edgemid_angle

Angle between the cent_edgemid_vecs_v2 vectors.

Definition at line 130 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ index

uint blender::SDefBindPoly::index

Index of the input face.

Definition at line 144 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ inside

bool blender::SDefBindPoly::inside

When true point_v2 is inside coords_v2.

Definition at line 158 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ loopstart

uint blender::SDefBindPoly::loopstart

This polygons loop-start.

Note
that we could look this up from the face.

Definition at line 151 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ normal

float blender::SDefBindPoly::normal[3]

The calculated normal of coords (could be shared between faces).

Definition at line 123 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ point_edgemid_angles

float blender::SDefBindPoly::point_edgemid_angles[2]

Angles between the centroid-to-point and cent_edgemid_vecs_v2 vectors. Positive values measured towards the corner; clamped non-negative.

Definition at line 135 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ point_v2

float blender::SDefBindPoly::point_v2[2]

The point being queried projected into 2D space using normal.

Definition at line 101 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ scale_mid

float blender::SDefBindPoly::scale_mid

Distance weight from the corner vertex to the chord line, used to penalize cases with the three consecutive vertices being nearly in line.

Definition at line 115 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ scales

float blender::SDefBindPoly::scales[2]

Distances from the centroid to edges flanking the corner vertex, used to penalize small or long and narrow faces in favor of bigger and more square ones.

Definition at line 110 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ verts_num

uint blender::SDefBindPoly::verts_num

Number of vertices in this face.

Definition at line 146 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ weight

float blender::SDefBindPoly::weight

Definition at line 105 of file MOD_surfacedeform.cc.

Referenced by blender::bindVert(), and blender::computeBindWeights().

◆ weight_angular

float blender::SDefBindPoly::weight_angular

Definition at line 102 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ weight_dist

float blender::SDefBindPoly::weight_dist

Definition at line 104 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().

◆ weight_dist_proj

float blender::SDefBindPoly::weight_dist_proj

Definition at line 103 of file MOD_surfacedeform.cc.

Referenced by blender::computeBindWeights().


The documentation for this struct was generated from the following file: