BitHelper.getBytes C# (CSharp) Method

getBytes() public static method

public static getBytes ( Bounds, bound ) : byte[]
bound Bounds,
return byte[]
    public static byte[] getBytes(Bounds bound)
    {
        byte[] buf = new byte[24];
        getBytes(bound.center).CopyTo(buf, 0);
        getBytes(bound.size).CopyTo(buf, 12);
        return buf;
    }
    public static Bounds ToBounds(byte[] bytes, int pos)

Same methods

BitHelper::getBytes ( Color32 color ) : byte[]
BitHelper::getBytes ( Quaternion, pos ) : byte[]
BitHelper::getBytes ( Vector2 pos ) : byte[]
BitHelper::getBytes ( Vector3 pos ) : byte[]
BitHelper::getBytes ( Vector4 pos ) : byte[]
BitHelper::getBytes ( string str ) : byte[]

Usage Example

コード例 #1
0
ファイル: BoneMatrix.cs プロジェクト: liro0206/EgretUnity
 public void Save(System.IO.Stream stream, PoseBoneMatrix last)
 {
     byte[] btag = new byte[2];
     btag[0] = (byte)tag;
     btag[1] = last == null ? (byte)(PoseBoneMatrix.changetag.All) : (byte)tag;
     stream.Write(btag, 0, 2);
     if (last == null || (tag & PoseBoneMatrix.changetag.Rotate) > 0)
     {
         byte[] buf = BitHelper.getBytes(r);
         stream.Write(buf, 0, 16);
     }
     if (last == null || (tag & PoseBoneMatrix.changetag.Trans) > 0)
     {
         byte[] buf = BitHelper.getBytes(t);
         stream.Write(buf, 0, 12);
     }
     if (last == null || (tag & PoseBoneMatrix.changetag.Scale) > 0)
     {
         byte[] buf = BitHelper.getBytes(s);
         stream.Write(buf, 0, 12);
     }
 }
All Usage Examples Of BitHelper::getBytes