I am trying to convert the WinFormsSample code to Matlab to be able to use the functions in the libraries. I am not quite sure of the order of steps to take, and also how to access the data in Matlab. I don't have much experience with object-oriented programming, so even the NatNet User's Guide is a little over my head at times. My sample code and output are shown below. Thanks!
Code: Select all
Test1 = NET.addAssembly('E:\OPTITRACK\DOCUMENTATION\NatNetSDK2.2\NatNetSDK\lib\x64\NatNetML.dll');
m_NatNet = NatNetML.NatNetClientML(1);
m_FrameOfData = NatNetML.FrameOfMocapData;
m_NatNet.Initialize('CurentIP','CurrentIP')
ver = zeros(1,4,'int32');
ver = m_NatNet.NatNetVersion()
rb = NatNetML.RigidBodyData;
rb = m_FrameOfData.RigidBodies
m_NatNet.Uninitialize()
ans =
0
ver =
System.Int32[] handle
Package: System
Properties:
Length: 4
LongLength: 4
Rank: 1
SyncRoot: [1x1 System.Int32[]]
IsReadOnly: 0
IsFixedSize: 1
IsSynchronized: 0
Methods, Events, Superclasses
rb =
NatNetML.RigidBodyData[] handle
Package: NatNetML
Properties:
Length: 1000
LongLength: 1000
Rank: 1
SyncRoot: [1x1 NatNetML.RigidBodyData[]]
IsReadOnly: 0
IsFixedSize: 1
IsSynchronized: 0
Methods, Events, Superclasses
ans =
0