Skip to content
Merged
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
10 changes: 10 additions & 0 deletions src/libraries/utils/polhemus/polhemus_coregistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ bool PolhemusCoregistration::captureCurrentPenPositionAsHeadShape()

//=============================================================================================================

void PolhemusCoregistration::resetRegistration()
{
m_registrationValid = false;
m_headToWorld.setToIdentity();
m_headToDevice.setToIdentity();
emit registrationChanged();
}

//=============================================================================================================

bool PolhemusCoregistration::computeRegistration()
{
if (!m_pPoints->hasAllFiducials()) {
Expand Down
6 changes: 6 additions & 0 deletions src/libraries/utils/polhemus/polhemus_coregistration.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ class UTILSSHARED_EXPORT PolhemusCoregistration : public QObject
*/
bool computeRegistration();

/**
* @brief Reset the registration state (headToWorld, headToDevice) to identity.
* Call this when the user clears all fiducials.
Comment on lines +168 to +169
*/
void resetRegistration();

bool registrationValid() const { return m_registrationValid; }

//=========================================================================================================
Expand Down
Loading