Blender  V3.3
Public Attributes | List of all members
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 97 of file MOD_surfacedeform.c.

Member Data Documentation

◆ cent_edgemid_vecs_v2

float 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 124 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ centroid

float SDefBindPoly::centroid[3]

Center of coords

Definition at line 115 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ centroid_v2

float SDefBindPoly::centroid_v2[2]

Center of coords_v2

Definition at line 117 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ coords

float(* SDefBindPoly::coords)[3]

Coordinates copied directly from the modifiers input.

Definition at line 99 of file MOD_surfacedeform.c.

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

◆ coords_v2

float(* SDefBindPoly::coords_v2)[2]

Coordinates projected into 2D space using normal.

Definition at line 101 of file MOD_surfacedeform.c.

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

◆ corner_edgemid_angles

float SDefBindPoly::corner_edgemid_angles[2]

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

Definition at line 131 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ corner_ind

uint SDefBindPoly::corner_ind

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

Definition at line 147 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ dominant_angle_weight

float 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 134 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ dominant_edge

uint SDefBindPoly::dominant_edge

Definition at line 148 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ edge_inds

uint SDefBindPoly::edge_inds[2]

Definition at line 144 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ edge_vert_inds

uint SDefBindPoly::edge_vert_inds[2]

Definition at line 145 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ edgemid_angle

float SDefBindPoly::edgemid_angle

Angle between the cent_edgemid_vecs_v2 vectors.

Definition at line 126 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ index

uint SDefBindPoly::index

Index of the input polygon.

Definition at line 136 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ inside

bool SDefBindPoly::inside

When true point_v2 is inside coords_v2.

Definition at line 150 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ loopstart

uint SDefBindPoly::loopstart

This polygons loop-start.

Note
that we could look this up from the polygon.

Definition at line 143 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ normal

float SDefBindPoly::normal[3]

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

Definition at line 121 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ point_edgemid_angles

float 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 129 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ point_v2

float SDefBindPoly::point_v2[2]

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

Definition at line 103 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ scale_mid

float 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 113 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ scales

float 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.c.

Referenced by computeBindWeights().

◆ verts_num

uint SDefBindPoly::verts_num

Number of vertices in this face.

Definition at line 138 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ weight

float SDefBindPoly::weight

Definition at line 107 of file MOD_surfacedeform.c.

Referenced by bindVert(), and computeBindWeights().

◆ weight_angular

float SDefBindPoly::weight_angular

Definition at line 104 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ weight_dist

float SDefBindPoly::weight_dist

Definition at line 106 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().

◆ weight_dist_proj

float SDefBindPoly::weight_dist_proj

Definition at line 105 of file MOD_surfacedeform.c.

Referenced by computeBindWeights().


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