mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
27 lines
716 B
C#
27 lines
716 B
C#
using JNGame.Math;
|
|
using UnityEngine;
|
|
|
|
namespace JNGame.Map.DotRecast.Util
|
|
{
|
|
[System.Serializable]
|
|
public class MeshData
|
|
{
|
|
public int vertexCount;
|
|
public int[] triangles;
|
|
public LVector3[] vertices;
|
|
|
|
public MeshData() { }
|
|
|
|
public MeshData(UnityEngine.Mesh mesh)
|
|
{
|
|
vertexCount = mesh.vertexCount;
|
|
triangles = mesh.triangles;
|
|
vertices = new LVector3[mesh.vertices.Length];
|
|
for (int i = 0; i < vertices.Length; i++)
|
|
{
|
|
var vertice = mesh.vertices[i];
|
|
vertices[i] = new LVector3((LFloat)vertice.x,(LFloat)vertice.y,(LFloat)vertice.z);
|
|
}
|
|
}
|
|
}
|
|
} |