Loading...
Searching...
No Matches
realvirtual.MeshUtils Class Reference
Contains utility methods for meshes. More...
Static Public Member Functions | |
static Mesh | CreateMesh (Vector3[] vertices, int[][] indices, Vector3[] normals, Vector4[] tangents, Color[] colors, BoneWeight[] boneWeights, List< Vector2 >[] uvs, Matrix4x4[] bindposes, BlendShape[] blendShapes) |
Creates a new mesh. | |
static Mesh | CreateMesh (Vector3[] vertices, int[][] indices, Vector3[] normals, Vector4[] tangents, Color[] colors, BoneWeight[] boneWeights, List< Vector4 >[] uvs, Matrix4x4[] bindposes, BlendShape[] blendShapes) |
Creates a new mesh. | |
static Mesh | CreateMesh (Vector3[] vertices, int[][] indices, Vector3[] normals, Vector4[] tangents, Color[] colors, BoneWeight[] boneWeights, List< Vector2 >[] uvs2D, List< Vector3 >[] uvs3D, List< Vector4 >[] uvs4D, Matrix4x4[] bindposes, BlendShape[] blendShapes) |
Creates a new mesh. | |
static BlendShape[] | GetMeshBlendShapes (Mesh mesh) |
Returns the blend shapes of a mesh. | |
static void | ApplyMeshBlendShapes (Mesh mesh, BlendShape[] blendShapes) |
Applies and overrides the specified blend shapes on the specified mesh. | |
static List< Vector4 >[] | GetMeshUVs (Mesh mesh) |
Returns the UV sets for a specific mesh. | |
static List< Vector4 > | GetMeshUVs (Mesh mesh, int channel) |
Returns the UV list for a specific mesh and UV channel. | |
static int | GetUsedUVComponents (List< Vector4 > uvs) |
Returns the number of used UV components in a UV set. | |
static Vector2[] | ConvertUVsTo2D (List< Vector4 > uvs) |
Converts a list of 4D UVs into 2D. | |
static Vector3[] | ConvertUVsTo3D (List< Vector4 > uvs) |
Converts a list of 4D UVs into 3D. | |
Static Public Attributes | |
const int | UVChannelCount |
The count of supported UV channels. | |
Detailed Description
Contains utility methods for meshes.
Member Function Documentation
◆ ApplyMeshBlendShapes()
|
static |
Applies and overrides the specified blend shapes on the specified mesh.
- Parameters
-
mesh The mesh. blendShapes The mesh blend shapes.
◆ ConvertUVsTo2D()
|
static |
Converts a list of 4D UVs into 2D.
- Parameters
-
uvs The list of UVs.
- Returns
- The array of 2D UVs.
◆ ConvertUVsTo3D()
|
static |
Converts a list of 4D UVs into 3D.
- Parameters
-
uvs The list of UVs.
- Returns
- The array of 3D UVs.
◆ CreateMesh() [1/3]
|
static |
Creates a new mesh.
- Parameters
-
vertices The mesh vertices. indices The mesh sub-mesh indices. normals The mesh normals. tangents The mesh tangents. colors The mesh colors. boneWeights The mesh bone-weights. uvs The mesh 4D UV sets. bindposes The mesh bindposes.
- Returns
- The created mesh.
◆ CreateMesh() [2/3]
|
static |
Creates a new mesh.
- Parameters
-
vertices The mesh vertices. indices The mesh sub-mesh indices. normals The mesh normals. tangents The mesh tangents. colors The mesh colors. boneWeights The mesh bone-weights. uvs2D The mesh 2D UV sets. uvs3D The mesh 3D UV sets. uvs4D The mesh 4D UV sets. bindposes The mesh bindposes.
- Returns
- The created mesh.
◆ CreateMesh() [3/3]
|
static |
Creates a new mesh.
- Parameters
-
vertices The mesh vertices. indices The mesh sub-mesh indices. normals The mesh normals. tangents The mesh tangents. colors The mesh colors. boneWeights The mesh bone-weights. uvs The mesh 4D UV sets. bindposes The mesh bindposes.
- Returns
- The created mesh.
◆ GetMeshBlendShapes()
|
static |
Returns the blend shapes of a mesh.
- Parameters
-
mesh The mesh.
- Returns
- The mesh blend shapes.
◆ GetMeshUVs() [1/2]
|
static |
Returns the UV sets for a specific mesh.
- Parameters
-
mesh The mesh.
- Returns
- The UV sets.
◆ GetMeshUVs() [2/2]
|
static |
Returns the UV list for a specific mesh and UV channel.
- Parameters
-
mesh The mesh. channel The UV channel.
- Returns
- The UV list.
◆ GetUsedUVComponents()
|
static |
Returns the number of used UV components in a UV set.
- Parameters
-
uvs The UV set.
- Returns
- The number of used UV components.
Member Data Documentation
◆ UVChannelCount
|
static |
The count of supported UV channels.