コード例 #1
0
        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);
        }
コード例 #2
0
 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));
 }
コード例 #3
0
 public Int32[] GetIndices(MLOD.Mesh mesh, MLOD.GeometryState geometryState)
 {
     return(GetIndices(mesh.PrimitiveType, geometryState.StartIndex, geometryState.PrimitiveCount)
            .Select(x => x - geometryState.MinVertexIndex).ToArray());
 }
コード例 #4
0
 public void SetIndices(MLOD mlod, MLOD.Mesh mesh, int geoStateIndex, Int32[] indices)
 {
     MLOD.GeometryState geometryState = mesh.GeometryStates[geoStateIndex];
     SetIndices(mlod, mesh, geometryState, indices);
 }
コード例 #5
0
 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);
 }