public static bytesToVector3List ( byte bytes ) : List |
||
bytes | byte | |
Résultat | List |
public static List<Vector3> bytesToVector3List( byte[] bytes )
{
var vecs = new List<Vector3>();
for( var i = 0; i < bytes.Length; i += 12 )
{
var newVec = new Vector3( System.BitConverter.ToSingle( bytes, i ), System.BitConverter.ToSingle( bytes, i + 4 ), System.BitConverter.ToSingle( bytes, i + 8 ) );
vecs.Add( newVec );
}
return vecs;
}
static public int bytesToVector3List_s(IntPtr l) { try { System.Byte[] a1; checkType(l, 1, out a1); var ret = GoSpline.bytesToVector3List(a1); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }