示例#1
0
        public IntPtr RigidBodies; // Pointer to sRigidBodyData[RigidBodyCount]


        public        sRigidBodyData[] MarshalRigidBodies()
        {
            sRigidBodyData[] returnArray = new sRigidBodyData[RigidBodyCount];

            IntPtr buffer = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(sRigidBodyData)) * RigidBodyCount);

            for (int i = 0; i < RigidBodyCount; ++i)
            {
                returnArray[i] = (sRigidBodyData)Marshal.PtrToStructure(RigidBodies, typeof(sRigidBodyData));
                RigidBodies    = new IntPtr(RigidBodies.ToInt64() + Marshal.SizeOf(typeof(sRigidBodyData)));
            }

            Marshal.FreeCoTaskMem(buffer);

            return(returnArray);
        }
示例#2
0
 public static extern NatNetError NatNet_Frame_Skeleton_GetRigidBody(IntPtr pFrameOfMocapData, Int32 skeletonIndex, Int32 rigidBodyIndex, out sRigidBodyData rigidBodyData);
示例#3
0
 public static extern NatNetError NatNet_Client_GetPredictedRigidBodyPose(IntPtr client, Int32 rigidBodyIndex, out sRigidBodyData rigidBodyData, double dt);
示例#4
0
 public NatNetError GetPredictedRigidBodyPose(Int32 rbId, out sRigidBodyData rbData, double dt)
 {
     return(NatNetLib.NativeMethods.NatNet_Client_GetPredictedRigidBodyPose(m_clientHandle, rbId, out rbData, dt));
 }