Game.Rendering.BlendWeights
Assembly: Assembly-CSharp.dll
Namespace: Game.Rendering
Type: struct
Base: System.ValueType
Summary:
Struct that groups up to eight BlendWeight entries for a vertex. Each BlendWeight typically encodes a joint/bone index and an associated influence weight used by the renderer's skinning system. This struct is a simple container used to store per-vertex blend (bone) weights in a compact form for rendering and animation data structures.
Fields
-
public BlendWeight m_Weight0
First blend weight entry (primary weight). Usually the most significant influence for the vertex. -
public BlendWeight m_Weight1
Second blend weight entry. -
public BlendWeight m_Weight2
Third blend weight entry. -
public BlendWeight m_Weight3
Fourth blend weight entry. -
public BlendWeight m_Weight4
Fifth blend weight entry. -
public BlendWeight m_Weight5
Sixth blend weight entry. -
public BlendWeight m_Weight6
Seventh blend weight entry. -
public BlendWeight m_Weight7
Eighth blend weight entry (least significant influence).
Notes: - The order of fields typically reflects descending importance (m_Weight0 being the strongest influence), but this depends on how the consuming code interprets them. - Each BlendWeight is expected to contain whatever data the engine uses to identify a bone and its influence (commonly a bone index and a float weight). - This struct is a plain data container with no behavior; it is intended to be used in arrays or vertex data structures passed to the renderer or animation jobs.
Properties
- None. This struct exposes all data as public fields.
Constructors
- Implicit default constructor (value types in C#): all fields are default-initialized.
Suggested initialization is explicit assignment of each BlendWeight when used to ensure meaningful bone indices and weights.
Methods
- None. This struct does not define methods.
Usage Example
// Example usage: construct and populate a BlendWeights struct for a vertex.
// Assume BlendWeight has a constructor or fields like (int boneIndex, float weight).
BlendWeights weights = new BlendWeights();
// populate primary influences
weights.m_Weight0 = new BlendWeight(0, 0.6f);
weights.m_Weight1 = new BlendWeight(3, 0.25f);
weights.m_Weight2 = new BlendWeight(7, 0.10f);
weights.m_Weight3 = new BlendWeight(12, 0.05f);
// remaining weights can remain default (zero weight) or be explicitly set
weights.m_Weight4 = new BlendWeight(0, 0f);
weights.m_Weight5 = new BlendWeight(0, 0f);
weights.m_Weight6 = new BlendWeight(0, 0f);
weights.m_Weight7 = new BlendWeight(0, 0f);
// Pass to a mesh or skinning routine that expects a BlendWeights per-vertex
UploadBlendWeightsToMesh(vertexIndex, weights);
If you need documentation for the BlendWeight type itself (fields, layout, semantics), provide the BlendWeight source or request it and I will document that as well.