Updated CustomTracker documentation

This commit is contained in:
Pascal Serrarens 2023-03-28 11:21:50 +02:00
parent cfde4632cd
commit 8e768343d8

View File

@ -14,19 +14,26 @@ namespace Passer.Humanoid {
/// BodySkeleton /// BodySkeleton
/// ------------ /// ------------
/// This option is most suited for full body tracking hardware. /// This option is most suited for full body tracking hardware.
/// An example implementation is the PerceptionNeuron extension found in the Humanoid Control Pro edition. /// An example implementation is the PerceptionNeuron extension found in the %Humanoid Control Pro edition.
/// For this, you need to implement a class derived from the BodySkeleton class. ///
/// For this, you need to implement a class derived from the Passer::Tracking::BodySkeleton class.
/// For the Perception Neuron extension, this new class is Passer::Tracking::PerceptionNeuron. /// For the Perception Neuron extension, this new class is Passer::Tracking::PerceptionNeuron.
/// This class should be used for the to the CustomTracker::bodySkeleton parameter. /// This class should be used for the to the CustomTracker::bodySkeleton parameter:
/// In the new class, you should override the BodySkeleton::start and BodySkeleton::update functions /// \image html CustomTrackerBodySkeleton.png
/// \image rtf CustomTrackerBodySkeleton.png
/// In the new class, you should override the Passer::Tracking::BodySkeleton::Start
/// and Passer::Tracking::BodySkeleton::Update functions
/// and implement the functionality to correctly start the tracking and retrieving the new body pose. /// and implement the functionality to correctly start the tracking and retrieving the new body pose.
/// This will ensure that the tracking is started and updated at the right moment. /// This will ensure that the tracking is started and updated at the right moment.
/// In the update function, you can asssign the tracking result to the correct tracking bones /// In the update function, you can asssign the tracking result to the correct tracking bones
/// of Humanoid Control. /// of %Humanoid Control.
/// You can retrieve the Humanoid Control TrackedBone using the BodySkeleton::GetBone function. /// You can retrieve the %Humanoid Control TrackedBone using the BodySkeleton::GetBone function.
/// Then you can update the position and/or the rotation of the bone. /// Then you can update the position and/or the rotation of the bone.
///
/// *Important*: a confidence value between 0 and 1 should also be set for the bone's position and/or rotation. /// *Important*: a confidence value between 0 and 1 should also be set for the bone's position and/or rotation.
/// The default confidence is 0 and in that case, the tracking information will not be used. /// The default confidence is 0 and in that case, the tracking information will not be used.
/// Next to that, the Passer::Tracking::BodySkeleton::status should reflect the current tracking status of the device.
///
/// Example of updating one bone: /// Example of updating one bone:
/// \code /// \code
/// protected void UpdateBone(Bone boneId) { /// protected void UpdateBone(Bone boneId) {
@ -52,19 +59,23 @@ namespace Passer.Humanoid {
/// SensorComponents /// SensorComponents
/// ================ /// ================
/// This option is most suited for tracking devices which can be mounted on the body. /// This option is most suited for tracking devices which can be mounted on the body.
/// An example implementation is the ViveTracker imnplementation found in the Humanoid Control Pro edition. /// An example implementation is the ViveTracker imnplementation found in the %Humanoid Control Pro edition.
///
/// For this, you need to implement a class derived from the SensorComponent class. /// For this, you need to implement a class derived from the SensorComponent class.
/// For the ViveTracker, this is the Passer::Tracking::ViveTrackerComponent. /// For the ViveTracker, this is the Passer::Tracking::ViveTrackerComponent.
/// This class should be used on the Head, Hand, Hips and/or Foot Targets in the CustomSensor::SensorComponent /// This class should be used on the Head, Hand, Hips and/or Foot Targets in the Sensor::sensorComponent
/// parameter. By selecting the bone in the dropdown, you can set to which bone the device is attached. /// parameter. Where applicable, selecting the bone in the dropdown determine to which bone the device is attached.
/// \image html CustomTrackerBodySkeleton.png
/// \image rtf CustomTrackerBodySkeleton.png
/// In the new class, you should override the SensorComponent::StartComponent and SensorComponent::UpdateComponent functions /// In the new class, you should override the SensorComponent::StartComponent and SensorComponent::UpdateComponent functions
/// and implement the functionality to correctly start the tracking and retrieve the actual pose of the device. /// and implement the functionality to correctly start the tracking and retrieve the actual pose of the device.
/// This will ensure that the tracking is started and updated at the right moment. /// This will ensure that the tracking is started and updated at the right moment.
/// ///
/// In the overridden SensorUpdate function, you should update the Transform of the SensorComponent. /// In the overridden SensorUpdate function, you should update the Transform of the SensorComponent.
///
/// *Important*: a confidence value between 0 and 1 should also be set for the device. /// *Important*: a confidence value between 0 and 1 should also be set for the device.
/// The default confidence is 0 and in that case, the tracking information will not be used. /// The default confidence is 0 and in that case, the tracking information will not be used.
/// Next to that, the status should reflect the current tracking status of the device. /// Next to that, the SensorComponent::status should reflect the current tracking status of the device.
/// Example of updating the device rotation and position: /// Example of updating the device rotation and position:
/// \code /// \code
/// public override void UpdateComponent() { /// public override void UpdateComponent() {
@ -83,7 +94,7 @@ namespace Passer.Humanoid {
/// } /// }
/// } /// }
/// \endcode /// \endcode
[System.Serializable] [System.Serializable]
public class CustomTracker : HumanoidTracker { public class CustomTracker : HumanoidTracker {
/// \copydoc HumanoidTracker::name /// \copydoc HumanoidTracker::name