Add JointPos prop

This commit is contained in:
Jarrod Doyle 2024-12-07 17:08:01 +00:00
parent 8cc64ae1e5
commit c96a42b883
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 26 additions and 0 deletions

View File

@ -500,3 +500,27 @@ public class PropSpotlightAndAmbient : Property
writer.Write(SpotBrightness); writer.Write(SpotBrightness);
} }
} }
public class PropJointPos : Property
{
public float[] Positions;
public override void Read(BinaryReader reader)
{
base.Read(reader);
Positions = new float[6];
for (var i = 0; i < 6; i++)
{
Positions[i] = reader.ReadSingle();
}
}
public override void Write(BinaryWriter writer)
{
base.Write(writer);
foreach (var position in Positions)
{
writer.Write(position);
}
}
}

View File

@ -155,6 +155,7 @@ public class DbFile
"P$ModelName" => new PropertyChunk<PropLabel>(), "P$ModelName" => new PropertyChunk<PropLabel>(),
"P$Scale" => new PropertyChunk<PropVector>(), "P$Scale" => new PropertyChunk<PropVector>(),
"P$RenderTyp" => new PropertyChunk<PropRenderType>(), "P$RenderTyp" => new PropertyChunk<PropRenderType>(),
"P$JointPos" => new PropertyChunk<PropJointPos>(),
"P$OTxtRepr0" => new PropertyChunk<PropString>(), "P$OTxtRepr0" => new PropertyChunk<PropString>(),
"P$OTxtRepr1" => new PropertyChunk<PropString>(), "P$OTxtRepr1" => new PropertyChunk<PropString>(),
"P$OTxtRepr2" => new PropertyChunk<PropString>(), "P$OTxtRepr2" => new PropertyChunk<PropString>(),

View File

@ -91,6 +91,7 @@ public class ObjectHierarchy
AddProp<PropLabel>("P$ModelName"); AddProp<PropLabel>("P$ModelName");
AddProp<PropVector>("P$Scale"); AddProp<PropVector>("P$Scale");
AddProp<PropRenderType>("P$RenderTyp"); AddProp<PropRenderType>("P$RenderTyp");
AddProp<PropJointPos>("P$JointPos");
AddProp<PropString>("P$OTxtRepr0"); AddProp<PropString>("P$OTxtRepr0");
AddProp<PropString>("P$OTxtRepr1"); AddProp<PropString>("P$OTxtRepr1");
AddProp<PropString>("P$OTxtRepr2"); AddProp<PropString>("P$OTxtRepr2");