-
Notifications
You must be signed in to change notification settings - Fork 0
/
PmxVertexMorph.cs
64 lines (51 loc) · 1.66 KB
/
PmxVertexMorph.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Decompiled with JetBrains decompiler
// Type: PmxLib.PmxVertexMorph
// Assembly: ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: CCD5B2CC-FDBA-4BE9-8BB4-450852B11426
// Assembly location: C:\illusion\Koikatu\BepInEx\plugins\PmxExport\PmxExport.dll
using System;
using System.IO;
namespace PmxLib
{
internal class PmxVertexMorph : PmxBaseMorph, IPmxObjectKey, IPmxStreamIO, ICloneable
{
public int Index;
public Vector3 Offset;
PmxObject IPmxObjectKey.ObjectKey => PmxObject.VertexMorph;
public override int BaseIndex
{
get => this.Index;
set => this.Index = value;
}
public PmxVertex RefVertex { get; set; }
public PmxVertexMorph() => this.Index = -1;
public PmxVertexMorph(int index, Vector3 offset)
: this()
{
this.Index = index;
this.Offset = offset;
}
public PmxVertexMorph(PmxVertexMorph sv)
: this()
{
this.FromPmxVertexMorph(sv);
}
public void FromPmxVertexMorph(PmxVertexMorph sv)
{
this.Index = sv.Index;
this.Offset = sv.Offset;
}
public override void FromStreamEx(Stream s, PmxElementFormat size)
{
this.Index = PmxStreamHelper.ReadElement_Int32(s, size.VertexSize, false);
this.Offset = V3_BytesConvert.FromStream(s);
}
public override void ToStreamEx(Stream s, PmxElementFormat size)
{
PmxStreamHelper.WriteElement_Int32(s, this.Index, size.VertexSize, false);
V3_BytesConvert.ToStream(s, this.Offset);
}
object ICloneable.Clone() => (object) new PmxVertexMorph(this);
public override PmxBaseMorph Clone() => (PmxBaseMorph) new PmxVertexMorph(this);
}
}