mesh[0].Prim = prim;
mesh[0].Profile.Faces = new ArrayList<ProfileFace>();
mesh[0].Profile.Positions = new ArrayList<Vector3>();
mesh[0].Path.Points = new ArrayList<PathPoint>();
OSD facesOSD = null;
switch (LOD)
{
default:
case Highest:
facesOSD = MeshData.get("high_lod");
break;
case High:
facesOSD = MeshData.get("medium_lod");
break;
case Medium:
facesOSD = MeshData.get("low_lod");
break;
case Low:
facesOSD = MeshData.get("lowest_lod");
break;
}
if (facesOSD == null || !(facesOSD instanceof OSDArray))
{
return false;
}
OSDArray decodedMeshOsdArray = (OSDArray)facesOSD;
for (int faceNr = 0; faceNr < decodedMeshOsdArray.count(); faceNr++)
{
OSD subMeshOsd = decodedMeshOsdArray.get(faceNr);
// Decode each individual face
if (subMeshOsd instanceof OSDMap)
{
Face oface = new Face();