Skip to content

Class AIAC::LayerToolhead

ClassList > AIAC > LayerToolhead

Inherits the following classes: AIAC::Layer

Public Attributes

Type Name
std::shared_ptr< AIAC::ACInfoToolheadManager > ACInfoToolheadManager
The manager holding the toolheads and setting the active one.
bool IsSavePoseLog = = false
Save pose log.
bool IsShowShaded = = false
Show the silouhette of the ttool.
bool IsShowSilouhette
Show the silouhette of the ttool.
bool IsShowToolheadGOInfo
Show the GOInfo toolhead's elements.
std::shared_ptr< ttool::TTool > TTool
The ttool object.
int ToolheadStateUI
The UI state of the toolhead (None, PoseInput, Tracking)

Public Functions

Type Name
void DetectToolhead ()
std::string GetClassifierLog () const
Get the current classifier log of the ttool.
std::vector< std::string > GetClassifierToolheadList () const
cv::Matx44f GetPose () const
Get the current pose of the ttool.
std::string GetTrackingStatus () const
Get the current tracking status of the ttool.
ttool::EventType GetTtoolState () const
Get the Ttool State object of the ttool event type.
glm::mat4x4 GetWorldPose ()
Get the current pose of the ttool.
LayerToolhead ()
virtual void OnAttach () override
Is called when the layer is attached to the application.
virtual void OnFrameStart () override
Is called when frame starts.
void ReloadCameraFromFile ()
Destroy the ttool view and recreate a new ttool object.
void ReloadCameraFromMatrix (cv::Mat cameraMatrix, cv::Size cameraSize)
Destroy the ttool view and recreate a new ttool object with given camera params.
void ResetPoseFromConfig ()
Set the pose from the value in the config initially read.
void ResetToLastSavedPose ()
Reset the pose of the ttool to the last saved pose.
void SavePose ()
Save the current pose of the ttool to the config file and to the ttool model manager (as a fallback pose for the ttool) It will reset LayerToolhead state to None (i.e. stop tracking and pose input)
void SetCurrentObject (std::string name)
Set the current active object for both the ttool and acit menager.
void UpdateToolheadStateUI ()
Update the ttool state from the UI.

Public Functions inherited from AIAC::Layer

See AIAC::Layer

Type Name
virtual void OnAttach ()
Is called when the layer is attached to the application.
virtual void OnDetach ()
Is called when the layer is detached from the application (~app).
virtual void OnFrameAwake ()
Is calle before GLFW poll events, GL frame and Imgui Frame.
virtual void OnFrameEnd ()
Is called when frame ends.
virtual void OnFrameFall ()
Is called when the GLFW, GL and Imgui frame is updated and rendered.
virtual void OnFrameStart ()
Is called when frame starts.
virtual ~Layer () = default

Public Attributes Documentation

variable ACInfoToolheadManager

The manager holding the toolheads and setting the active one.

std::shared_ptr<AIAC::ACInfoToolheadManager> AIAC::LayerToolhead::ACInfoToolheadManager;


variable IsSavePoseLog

Save pose log.

bool AIAC::LayerToolhead::IsSavePoseLog;


variable IsShowShaded

Show the silouhette of the ttool.

bool AIAC::LayerToolhead::IsShowShaded;


variable IsShowSilouhette

Show the silouhette of the ttool.

bool AIAC::LayerToolhead::IsShowSilouhette;


variable IsShowToolheadGOInfo

Show the GOInfo toolhead's elements.

bool AIAC::LayerToolhead::IsShowToolheadGOInfo;


variable TTool

The ttool object.

std::shared_ptr<ttool::TTool> AIAC::LayerToolhead::TTool;


variable ToolheadStateUI

The UI state of the toolhead (None, PoseInput, Tracking)

int AIAC::LayerToolhead::ToolheadStateUI;


Public Functions Documentation

function DetectToolhead

void AIAC::LayerToolhead::DetectToolhead () 

function GetClassifierLog

Get the current classifier log of the ttool.

inline std::string AIAC::LayerToolhead::GetClassifierLog () const


function GetClassifierToolheadList

inline std::vector< std::string > AIAC::LayerToolhead::GetClassifierToolheadList () const

function GetPose

Get the current pose of the ttool.

inline cv::Matx44f AIAC::LayerToolhead::GetPose () const


function GetTrackingStatus

Get the current tracking status of the ttool.

inline std::string AIAC::LayerToolhead::GetTrackingStatus () const


function GetTtoolState

Get the Ttool State object of the ttool event type.

inline ttool::EventType AIAC::LayerToolhead::GetTtoolState () const

< Getters and setters


function GetWorldPose

Get the current pose of the ttool.

glm::mat4x4 AIAC::LayerToolhead::GetWorldPose () 

Get the world pose of the toolhead.

Returns:

The transformation matrix that transforms from the toolhead frame to the world frame


function LayerToolhead

inline AIAC::LayerToolhead::LayerToolhead () 

function OnAttach

Is called when the layer is attached to the application.

virtual void AIAC::LayerToolhead::OnAttach () override

Implements AIAC::Layer::OnAttach


function OnFrameStart

Is called when frame starts.

virtual void AIAC::LayerToolhead::OnFrameStart () override

Implements AIAC::Layer::OnFrameStart


function ReloadCameraFromFile

Destroy the ttool view and recreate a new ttool object.

void AIAC::LayerToolhead::ReloadCameraFromFile () 


function ReloadCameraFromMatrix

Destroy the ttool view and recreate a new ttool object with given camera params.

void AIAC::LayerToolhead::ReloadCameraFromMatrix (
    cv::Mat cameraMatrix,
    cv::Size cameraSize
) 


function ResetPoseFromConfig

Set the pose from the value in the config initially read.

void AIAC::LayerToolhead::ResetPoseFromConfig () 


function ResetToLastSavedPose

Reset the pose of the ttool to the last saved pose.

void AIAC::LayerToolhead::ResetToLastSavedPose () 


function SavePose

Save the current pose of the ttool to the config file and to the ttool model manager (as a fallback pose for the ttool) It will reset LayerToolhead state to None (i.e. stop tracking and pose input)

void AIAC::LayerToolhead::SavePose () 


function SetCurrentObject

Set the current active object for both the ttool and acit menager.

void AIAC::LayerToolhead::SetCurrentObject (
    std::string name
) 


function UpdateToolheadStateUI

Update the ttool state from the UI.

void AIAC::LayerToolhead::UpdateToolheadStateUI () 



The documentation for this class was generated from the following file src/AIAC/LayerToolhead.h