Closed p4sI closed 9 years ago
Hi @p4sI thanks for spotting this
the total issue here is that Data::Body does not have a default constructor (i.e. to set tracked
to false
, etc).
Let me fix this one.
Hi, okay this makes sense. I thought booleans are false by default and wondered why it gets set to true.
bool
, int
, float
, etc have no default values in C/C++
they simply default to whatever was in memory there beforehand
therefore you should be careful always to initialise their values
thanks for the spot!
Hi,
just encountered that
bodies[i].tracked == true
after the init()-function in Body.cpp is executed. Even without a Kinect the state gets set to true. This happens after the line 47 is executed, where the bodies vector get resized from 0 to 6, see https://github.com/elliotwoods/ofxKinectForWindows2/blob/master/src/ofxKinectForWindows2/Source/Body.cpp#L47I fixed it by adding
after line 47.
PS: I'm using the 0.8.4 branch, someone should check if it happens in the master one as well