Пример #1
0
 /// <summary>
 /// Initializes a new <see cref="SKNSubmesh"/> with the spcified <see cref="SKNFile"/>
 /// </summary>
 /// <param name="name">Name of this <see cref="SKNSubmesh"/></param>
 /// <param name="indices">Indices of this <see cref="SKNSubmesh"/></param>
 /// <param name="vertices">Vertices of this <see cref="SKNSubmesh"/></param>
 /// <param name="skn"><see cref="SKNFile"/> this <see cref="SKNSubmesh"/> belongs to</param>
 public SKNSubmesh(string name, List <ushort> indices, List <SKNVertex> vertices, SKNFile skn)
 {
     this.Name     = name;
     this.Indices  = indices;
     this.Vertices = vertices;
     this._skn     = skn;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new <see cref="SKNSubmesh"/> from a <see cref="BinaryReader"/>
 /// </summary>
 /// <param name="skn"><see cref="SKNFile"/> this <see cref="SKNSubmesh"/> belongs to</param>
 /// <param name="br">The <see cref="BinaryReader"/> to read from</param>
 public SKNSubmesh(SKNFile skn, BinaryReader br)
 {
     this._skn         = skn;
     this.Name         = Encoding.ASCII.GetString(br.ReadBytes(64)).Replace("\0", "");
     this._startVertex = br.ReadUInt32();
     this._vertexCount = br.ReadUInt32();
     this._startIndex  = br.ReadUInt32();
     this._indexCount  = br.ReadUInt32();
 }
Пример #3
0
 /// <summary>
 /// Assigns the specified <see cref="SKNFile"/> to this <see cref="SKNSubmesh"/>
 /// </summary>
 /// <param name="skn"><see cref="SKNFile"/> this <see cref="SKNSubmesh"/> belongs to</param>
 public void AssignSimpleSkin(SKNFile skn)
 {
     this._skn = skn;
 }