本文整理汇总了C#中EndianBinaryWriter.WriteVector3方法的典型用法代码示例。如果您正苦于以下问题:C# EndianBinaryWriter.WriteVector3方法的具体用法?C# EndianBinaryWriter.WriteVector3怎么用?C# EndianBinaryWriter.WriteVector3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EndianBinaryWriter
的用法示例。
在下文中一共展示了EndianBinaryWriter.WriteVector3方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public override void Write(EndianBinaryWriter er)
{
base.Write(er);
er.WriteVector3(CenterPosition);
er.WriteVector3(Size);
}
示例2: Write
public void Write(EndianBinaryWriter er, CGFXWriterContext c)
{
long basepos = er.BaseStream.Position;
er.Write(Type);
er.Write(Signature, Encoding.ASCII, false);
er.Write(Revision);
c.WriteStringReference(Name, er);
er.Write(Unknown2);
er.Write(Unknown3);
er.Write(Flags);
er.Write((uint)(IsBranchVisible ? 1 : 0));
er.Write(NrChildren);
er.Write(Unknown7);
er.Write(NrAnimationGroupDescriptions);
long anmgrpdescdictoffs = er.BaseStream.Position;
er.Write((uint)0);
er.WriteVector3(Scale);
er.WriteVector3(Rotation);
er.WriteVector3(Translation);
er.Write(LocalMatrix, 0, 4 * 3);
er.Write(WorldMatrix, 0, 4 * 3);
er.Write(NrMeshes);
long mshoffsoffs = er.BaseStream.Position;
er.Write((uint)0);
er.Write(NrMaterials);
long matdictoffs = er.BaseStream.Position;
er.Write((uint)0);
er.Write(NrShapes);
long shpoffsoffs = er.BaseStream.Position;
er.Write((uint)0);
er.Write(NrMeshNodes);
long mshnodedictoffs = er.BaseStream.Position;
er.Write((uint)0);
er.Write(Unknown23);
er.Write(Unknown24);
er.Write(Unknown25);
long skeletonoffs = er.BaseStream.Position;
if (Skeleton != null) er.Write((uint)0);
//seems to be padded to 8 bytes
while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);
long meshoffs = er.BaseStream.Position;
er.BaseStream.Position = mshoffsoffs;
er.Write((uint)(meshoffs - mshoffsoffs));
er.BaseStream.Position = meshoffs;
er.Write(new uint[NrMeshes], 0, (int)NrMeshes);
long shpoffs = er.BaseStream.Position;
er.BaseStream.Position = shpoffsoffs;
er.Write((uint)(shpoffs - shpoffsoffs));
er.BaseStream.Position = shpoffs;
er.Write(new uint[NrShapes], 0, (int)NrShapes);
long anmgrpdict = er.BaseStream.Position;
if (NrAnimationGroupDescriptions != 0 && AnimationInfoDict != null)
{
er.BaseStream.Position = anmgrpdescdictoffs;
er.Write((uint)(anmgrpdict - anmgrpdescdictoffs));
er.BaseStream.Position = anmgrpdict;
AnimationInfoDict.Write(er, c);
}
long matdict = er.BaseStream.Position;
if (NrMaterials != 0 && MaterialsDict != null)
{
er.BaseStream.Position = matdictoffs;
er.Write((uint)(matdict - matdictoffs));
er.BaseStream.Position = matdict;
MaterialsDict.Write(er, c);
}
long mshnoddict = er.BaseStream.Position;
if (NrMeshNodes != 0 && MeshNodeVisibilitiesDict != null)
{
er.BaseStream.Position = mshnodedictoffs;
er.Write((uint)(mshnoddict - mshnodedictoffs));
er.BaseStream.Position = mshnoddict;
MeshNodeVisibilitiesDict.Write(er, c);
}
for (int i = 0; i < NrAnimationGroupDescriptions; i++)
{
long curpos = er.BaseStream.Position;
long bpos = er.BaseStream.Position = anmgrpdict + 0x1C + i * 0x10 + 0xC;
er.Write((uint)(curpos - bpos));
er.BaseStream.Position = curpos;
AnimationGroupDescriptions[i].Write(er, c);
}
for (int i = 0; i < NrMeshes; i++)
{
while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);
long curpos = er.BaseStream.Position;
//.........这里部分代码省略.........