Exemplo n.º 1
0
 public override void receiveMatrix4x4(SimpleMatrix4x4 newMatrix)
 {
     lock (thisLock)
     {
         m_matrix = UbiMeasurementUtils.ubitrackToUnity(newMatrix);
     }
 }
 public override void receiveMatrix4x4(SimpleMatrix4x4 newMatrix)
 {
     lock (thisLock)
     {
         m_matrix = UbiMeasurementUtils.ubitrackToUnity(newMatrix);
     }
 }
        internal static Measurement <Matrix4x4> ubitrackToUnity(SimpleMatrix4x4 matrix4x4)
        {
            Matrix4x4 data = new Matrix4x4();

            ubitrack4x4MatrixToMatrix(matrix4x4, ref data);


            return(new Measurement <Matrix4x4>(data, matrix4x4.timestamp));
        }
        public static void ubitrack4x4MatrixToMatrix(SimpleMatrix4x4 ubiMatrix, ref Matrix4x4 matrix)
        {
            doubleArrayClass da = doubleArrayClass.frompointer(ubiMatrix.values);

            //for(int i=0;i<16;i++){
            for (int row = 0; row < 4; row++)
            {
                for (int col = 0; col < 4; col++)
                {
                    matrix[row, col] = (float)da.getitem(row * 4 + col);
                }
            }
        }
Exemplo n.º 5
0
	internal static Measurement<Matrix4x4> ubitrackToUnity(SimpleMatrix4x4 matrix4x4)
    {
        Matrix4x4 data = new Matrix4x4();
        ubitrack4x4MatrixToMatrix(matrix4x4, ref data);
		

        return new Measurement<Matrix4x4>(data, matrix4x4.timestamp);
    }
Exemplo n.º 6
0
	public static void ubitrack4x4MatrixToMatrix(SimpleMatrix4x4 ubiMatrix, ref Matrix4x4 matrix)
    {        
		doubleArrayClass da = doubleArrayClass.frompointer(ubiMatrix.values);
		//for(int i=0;i<16;i++){
		for(int row=0;row<4;row++)
			for(int col=0;col<4;col++){
				matrix[row,col] = (float)da.getitem(row*4+col);
			}
    }