Class GeometryGroup
Represents a group of geometry data associated with a Unity Mesh, including vertices, normals, tangents, and blend shapes.
Inherited Members
Namespace: TriLibExporter.Objects
Assembly: Assembly-CSharp.dll
Syntax
public class GeometryGroup : ObjectBase
Constructors
GeometryGroup(AssetWriterContext, Mesh)
Initializes a new instance of the GeometryGroup class.
Declaration
public GeometryGroup(AssetWriterContext assetWriterContext, Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
AssetWriterContext | assetWriterContext | The asset writer context. |
Mesh | mesh | The Unity Mesh to represent. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Exception | Thrown if the mesh is not readable. |
Fields
BindPoses
The bind poses of the mesh.
Declaration
public Matrix4x4[] BindPoses
Field Value
Type | Description |
---|---|
Matrix4x4[] |
BlendShapes
The blend shapes associated with the mesh.
Declaration
public BlendShape[] BlendShapes
Field Value
Type | Description |
---|---|
BlendShape[] |
BoneWeights
The bone weights associated with the mesh vertices.
Declaration
public BoneWeight[] BoneWeights
Field Value
Type | Description |
---|---|
BoneWeight[] |
Colors
The vertex colors of the mesh.
Declaration
public Color[] Colors
Field Value
Type | Description |
---|---|
Color[] |
Geometries
The sub-mesh geometries of the mesh.
Declaration
public Geometry[] Geometries
Field Value
Type | Description |
---|---|
Geometry[] |
Normals
The vertex normals of the mesh.
Declaration
public Vector3[] Normals
Field Value
Type | Description |
---|---|
Vector3[] |
OverrideBoneWeightCount
Overrides the number of bone weights to consider.
Declaration
public int OverrideBoneWeightCount
Field Value
Type | Description |
---|---|
int |
Tangents
The vertex tangents of the mesh.
Declaration
public Vector4[] Tangents
Field Value
Type | Description |
---|---|
Vector4[] |
TangentsFlipped
Indicates whether the tangents have been flipped.
Declaration
public bool TangentsFlipped
Field Value
Type | Description |
---|---|
bool |
TriangleCount
The total number of triangles in the mesh.
Declaration
public int TriangleCount
Field Value
Type | Description |
---|---|
int |
UV1
The first set of UV coordinates of the mesh.
Declaration
public Vector2[] UV1
Field Value
Type | Description |
---|---|
Vector2[] |
UV2
The second set of UV coordinates of the mesh.
Declaration
public Vector2[] UV2
Field Value
Type | Description |
---|---|
Vector2[] |
UV3
The third set of UV coordinates of the mesh.
Declaration
public Vector2[] UV3
Field Value
Type | Description |
---|---|
Vector2[] |
UV4
The fourth set of UV coordinates of the mesh.
Declaration
public Vector2[] UV4
Field Value
Type | Description |
---|---|
Vector2[] |
Vertices
The vertices of the mesh.
Declaration
public Vector3[] Vertices
Field Value
Type | Description |
---|---|
Vector3[] |
Methods
GetBoneVertexIndices(int)
Retrieves the indices of vertices influenced by a specific bone.
Declaration
public IEnumerable<int> GetBoneVertexIndices(int boneIndex)
Parameters
Type | Name | Description |
---|---|---|
int | boneIndex | The index of the bone. |
Returns
Type | Description |
---|---|
IEnumerable<int> | An enumerable collection of vertex indices. |
GetBoneVertexIndicesCount(int)
Counts the number of vertices influenced by a specific bone.
Declaration
public int GetBoneVertexIndicesCount(int boneIndex)
Parameters
Type | Name | Description |
---|---|---|
int | boneIndex | The index of the bone. |
Returns
Type | Description |
---|---|
int | The count of vertices influenced by the specified bone. |
GetBoneWeights(int)
Retrieves the weights of vertices influenced by a specific bone.
Declaration
public IEnumerable<float> GetBoneWeights(int boneIndex)
Parameters
Type | Name | Description |
---|---|---|
int | boneIndex | The index of the bone. |
Returns
Type | Description |
---|---|
IEnumerable<float> | An enumerable collection of vertex weights. |
GetBoneWeightsCount(int)
Counts the number of vertex weights influenced by a specific bone.
Declaration
public int GetBoneWeightsCount(int boneIndex)
Parameters
Type | Name | Description |
---|---|---|
int | boneIndex | The index of the bone. |
Returns
Type | Description |
---|---|
int | The count of vertex weights influenced by the specified bone. |