-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ✨ Add eye and lip tracking on Vive #2695
Conversation
cd7f196
to
7172a49
Compare
7172a49
to
0bd3efc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, apart from that one subjective nit
let expression_count = if facial_tracking_type == sys::FacialTrackingTypeHTC::EYE_DEFAULT | ||
&& props.support_eye_facial_tracking.into() | ||
{ | ||
sys::FACIAL_EXPRESSION_EYE_COUNT_HTC | ||
} else if facial_tracking_type == sys::FacialTrackingTypeHTC::LIP_DEFAULT | ||
&& props.support_lip_facial_tracking.into() | ||
{ | ||
sys::FACIAL_EXPRESSION_LIP_COUNT_HTC | ||
} else { | ||
return Err(sys::Result::ERROR_FEATURE_UNSUPPORTED); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit hard to understand, maybe a match would be better? And/or actually nesting the conditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you can make this any better with a match, we are checking different variables for each branch
@@ -64,6 +85,8 @@ impl FacialTrackerHTC { | |||
))?; | |||
|
|||
if facial_expressions.is_active.into() { | |||
weights.set_len(self.expression_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm truly surprised, but apparently this is the right way to do ffi with vectors 👍
* feat: ✨ Add eye and lip tracking on Vive * log htc face data in lobby * undo debugging changes + minor refactoring * force initialization at startup --------- Co-authored-by: Awzri <[email protected]>
* feat: ✨ Add eye and lip tracking on Vive * log htc face data in lobby * undo debugging changes + minor refactoring * force initialization at startup --------- Co-authored-by: Awzri <[email protected]>
Tested and working on the Focus Vision. because of a limitation of the runtime, the tracker objects can only be initialized at startup.