public bool ExportDataPackedAsB4(string tagName, Vector3[] vctArr)
            {
                WriteTag(tagName);
                if (vctArr == null)
                {
                    _writer.Write(0);
                    return(true);
                }

                _writer.Write(vctArr.Length);
                foreach (var vector in vctArr)
                {
                    WriteByte4(new Byte4
                    {
                        PackedValue = VF_Packer.PackNormal(vector)
                    });
                }

                return(true);
            }
Ejemplo n.º 2
0
        private static bool ExportDataPackedAsB4(this BinaryWriter writer, string tagName, Vector3[] vectorArray)
        {
            WriteTag(writer, tagName);

            if (vectorArray == null)
            {
                writer.Write(0);
                return(true);
            }

            writer.Write(vectorArray.Length);
            foreach (var vectorVal in vectorArray)
            {
                var v      = vectorVal;
                var vector = new Byte4();
                vector.PackedValue = VF_Packer.PackNormal(ref v);
                WriteByte4(writer, ref vector);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public bool ExportDataPackedAsB4(string tagName, Vector3[] vctArr)
        {
            WriteTag(tagName);

            if (vctArr == null)
            {
                m_writer.Write(0);
                return(true);
            }

            m_writer.Write(vctArr.Length);
            foreach (Vector3 vctVal in vctArr)
            {
                Vector3 v   = vctVal;
                Byte4   vct = new Byte4();
                vct.PackedValue = VF_Packer.PackNormal(ref v);
                WriteByte4(vct);
            }

            return(true);
        }