diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-04-02 16:38:04 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-04-02 16:39:11 -0600 |
commit | 0f5bf3c2f9fd7481d6b3c7c5364a08fe3ecdb2fb (patch) | |
tree | 33bf02cd36539a87148953764d79d914f13adc0f /include/libsurvive | |
parent | 83d304551bb0052f6b67365c558ea6d825585e39 (diff) | |
download | libsurvive-0f5bf3c2f9fd7481d6b3c7c5364a08fe3ecdb2fb.tar.gz libsurvive-0f5bf3c2f9fd7481d6b3c7c5364a08fe3ecdb2fb.tar.bz2 |
Added documentation about writing a poser
Diffstat (limited to 'include/libsurvive')
-rw-r--r-- | include/libsurvive/poser.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/libsurvive/poser.h b/include/libsurvive/poser.h index b0b1a7b..dcd0e93 100644 --- a/include/libsurvive/poser.h +++ b/include/libsurvive/poser.h @@ -30,9 +30,36 @@ typedef struct void *userdata; } PoserData; +/** + * Meant to be used by individual posers to report back their findings on the pose of an object back to the invoker of + * the call. + * + * @param poser_data the data pointer passed into the poser function invocation + * @param so The survive object which we are giving a solution for. + * @param lighthouse @deprecated The lighthouse which observed that position. Make it -1 if it was a combination of + * lighthouses. Will be removed in the future. + * @param pose The actual object pose. This is in world space, not in LH space. It must represent a transformation from + * object space of the SO to global space. + */ void PoserData_poser_raw_pose_func(PoserData *poser_data, SurviveObject *so, uint8_t lighthouse, SurvivePose *pose); + +/** + * Meant to be used by individual posers to report back their findings on the pose of a lighthouse. + * + * Note that you are free to assume the position of the lighthouse and solve for the object or vice versa. Most solvers + * assume that the object is at 0,0,0 but this isn't a hard requirement. + * + * @param poser_data the data pointer passed into the poser function invocation + * @param so The survive object which gave us the info for the solution + * @param lighthouse The lighthouse which to solve for + * @param objUp2world For use when solving for both ligthhouse positions. For the first invocation of this function, + * pass in a zero-inited SurvivePose. This function will set that to a relative transform to normalize the space. + * pass the same pose in again for the second lighthouse to get accurate results. + * @param lighthouse_pose This is the assumed or derived position of the given lighthouse. + * @param object_pose This is the assumed or derived position of the tracked object. + */ void PoserData_lighthouse_pose_func(PoserData *poser_data, SurviveObject *so, uint8_t lighthouse, - /* OUTPARAM */ SurvivePose *objUp2world, SurvivePose *lighthouse_poses, + /* OUTPARAM */ SurvivePose *objUp2world, SurvivePose *lighthouse_pose, SurvivePose *object_pose); typedef struct PoserDataIMU { |