public bool SetVertices(MLOD mlod, MLOD.Mesh mesh, MLOD.GeometryState geo, VRTF vrtf, Vertex[] vertices, float[] uvscales) { long beforeLength = mesh.StreamOffset + (geo.MinVertexIndex * vrtf.Stride); bool okay = SetVertices(mlod, mesh.VertexBufferIndex, beforeLength, geo.VertexCount, vrtf, vertices, uvscales); geo.VertexCount = vertices.Length; return(okay); }
public void SetIndices(MLOD mlod, MLOD.Mesh mesh, int geoStateIndex, Int32[] indices) { MLOD.GeometryState geometryState = mesh.GeometryStates[geoStateIndex]; SetIndices(mlod, mesh, geometryState, indices); }
public Int32[] GetIndices(MLOD.Mesh mesh, MLOD.GeometryState geometryState) { return(GetIndices(mesh.PrimitiveType, geometryState.StartIndex, geometryState.PrimitiveCount) .Select(x => x - geometryState.MinVertexIndex).ToArray()); }
public void SetIndices(MLOD mlod, MLOD.Mesh mesh, MLOD.GeometryState geometryState, Int32[] indices) { SetIndices(mlod, mesh.IndexBufferIndex, mesh.PrimitiveType, geometryState.StartIndex, geometryState.PrimitiveCount, indices.Select(x => x + geometryState.MinVertexIndex).ToArray()); geometryState.PrimitiveCount = indices.Length / IndexCountFromPrimitiveType(mesh.PrimitiveType); }
public Vertex[] GetVertices(MLOD.Mesh mesh, VRTF vrtf, MLOD.GeometryState geo, float[] uvscales) { return(GetVertices(vrtf, mesh.StreamOffset + (geo.MinVertexIndex * vrtf.Stride), geo.VertexCount, uvscales)); }