Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ofxKinect2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,6 @@ void Body::drawBone(JointType joint0, JointType joint1, int x, int y, int w, int
{
if(is_tracked)
{
ofPushStyle();
TrackingState state0 = joints[joint0].TrackingState;
TrackingState state1 = joints[joint1].TrackingState;

Expand All @@ -1283,6 +1282,7 @@ void Body::drawBone(JointType joint0, JointType joint1, int x, int y, int w, int
return;
}

ofPushStyle();
if((state0 == TrackingState_Tracked) && (state1 == TrackingState_Tracked))
{
ofSetColor(ofColor::green);
Expand Down
4 changes: 1 addition & 3 deletions src/ofxKinect2.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class ofxKinect2::Body
inline bool isTracked() const { return is_tracked;}

inline HandState getLeftHandState() const { return left_hand_state; }
inline HandState getRightHandState() const { return left_hand_state; }
inline HandState getRightHandState() const { return right_hand_state; }

inline size_t getNumJoints() { return JointType_Count; }

Expand Down Expand Up @@ -444,8 +444,6 @@ class ofxKinect2::BodyStream : public Stream
OF_DEPRECATED_MSG("Use getPixels() instead ", ofShortPixels& getPixelsRef() { return pix.getFrontBuffer(); });
OF_DEPRECATED_MSG("Use getPixels() instead ", ofShortPixels getPixelsRef(int _near, int _far, bool invert = false););

ofPoint righthand_pos_;

protected:
DoubleBuffer<ofShortPixels> pix;
vector<Body> bodies;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/MeshGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class ofxKinect2::MeshGenerator
float fovH = depth_stream.getHorizontalFieldOfView();
float fovV = depth_stream.getVerticalFieldOfView();

xzFactor = tan(fovH * 0.5) * 2;
yzFactor = tan(fovV * 0.5) * -2;
xzFactor = tan(ofDegToRad(fovH) * 0.5) * 2;
yzFactor = tan(ofDegToRad(fovV) * 0.5) * -2;
}

const ofMesh& update(const ofShortPixels& depth, const ofPixels& color = ofPixels())
Expand Down