http://www.unknown-files.net/index.php? ... &dlid=1739

If you find a bug or have a suggestion or anything, give us a yell and ill see what I can do.
Moderator: Moderators
Code: Select all
FileStream fs = new FileStream(sfd.FileName, FileMode.Create);
if (fs != null)
{
fs.WriteByte(0); // version
BinaryWriter bw = new BinaryWriter(fs);
bw.Write((UInt32)features.Count); // number of features, 32 bit unsigned int
foreach (feature f in features)
{
bw.Write(f.type); // feature type, 32 bit int (indexes into feature type list)
bw.Write(f.x); // X position, 32 bit float
bw.Write(f.y); // Y position, 32 bit float
bw.Write(f.z); // Z position, 32 bit float
bw.Write(f.rotation); // rotation, 32 bit float, probably radians but I'm not sure.
}
}
fs.Close();