WriteFloats() public method

public WriteFloats ( float buffer ) : void
buffer float
return void
Esempio n. 1
0
        public override ByteArray Write()
        {
            ByteArray header = new ByteArray();

            int attrib = Write3D(header);

            ByteArray data = new ByteArray();

            data.WriteUInt16(attrib);
            data.WriteBytes(header.ToArray());

            data.WriteFloats(transform);
            data.WriteFloat(fov);

            WriteTags(data);

            return data;
        }
Esempio n. 2
0
        public override ByteArray Write()
        {
            ByteArray header = new ByteArray();

            int attrib = WriteLight(header);

            ByteArray data = new ByteArray();

            data.WriteUInt16(attrib);
            data.WriteBytes(header.ToArray());

            data.WriteUInt24(color);
            data.WriteFloat(multiplier);

            data.WriteFloats(position);

            WriteTags(data);

            return data;
        }
Esempio n. 3
0
 public void Write(ByteArray data)
 {
     data.WriteUTF8(name);
     data.WriteUInt16(parentIndex + 1);
     data.WriteFloats(inverseBindMatrix);
 }
Esempio n. 4
0
        public override ByteArray Write()
        {
            ByteArray header = new ByteArray();

            int attrib = Write3D(header);

            if (materials.Count > 0)
            {
                attrib |= 256;

                header.WriteByte(materials.Count);

                if (materials.Count == 1)
                {
                    header.WriteUInt32((uint)materials[0]);
                }
                else
                {
                    for (int i = 0; i < materials.Count; i++)
                    {
                        header.WriteUInt32((uint)(materials[i] + 1));
                    }
                }
            }

            if (modifiers.Count > 0)
            {
                attrib |= 512;

                header.WriteByte(modifiers.Count);

                for (int i = 0; i < modifiers.Count; i++)
                {
                    header.WriteUInt32(modifiers[i]);
                }
            }

            ByteArray data = new ByteArray();

            data.WriteUInt16(attrib);
            data.WriteBytes(header.ToArray());

            data.WriteFloats(transform);
            data.WriteUInt32((uint)geometry);

            WriteTags(data);

            return data;
        }