[IGSTK-Users] Attaching Tracker To Spatial Object using RequestSetTransformAndParent Problems

Aswin Mathews aswinjohn at gmail.com
Wed Jul 9 16:46:20 EDT 2008


Hi,

I am having some issues doing my own scene graph. I have a Axes Object
serving as m_WorldReference, a Mesh Object, a Tracker, TrackerTool and a
View3d. The Tracker is connected to the m_WorldReference by
        m_Tracker->RequestSetTransformAndParent(identity, m_WorldReference);

Then, the TrackerTool is attached.
        m_TrackerTool->RequestAttachToTracker(m_Tracker);

The Mesh is connected to my tracker tool as
        m_TargetMeshObject->RequestSetTransformAndParent( identity,
m_TrackerTool);

m_MeshObjectRepresentation->RequestSetMeshObject(m_TargetMeshObject);

Now the mesh representation is added to my view3d window and the view3d is
set to m_WorldReference.

        m_LeftWindowView->RequestAddObject(m_MeshObjectRepresentation);
        m_LeftWindowView->RequestSetTransformAndParent(identity,
m_WorldReference);
        leftwindow->RequestSetView(m_LeftWindowView);

        leftwindow->RequestEnableInteractions();
        m_LeftWindowView->SetRefreshRate(60);

I start Tracking, reset my camera and start the view3d.
        m_Tracker->RequestStartTracking();

        m_LeftWindowView->RequestResetCamera();
        m_LeftWindowView->RequestStart();

The problem is that I dont see anything.
If both the parent of my MeshObject and View3d is set to the same object
(either m_WorldReference or m_TrackerTool), I can see the mesh. But when I
connect them to different objects, I dont see the mesh. My goal is to see
the mesh moving based on tracker input.

Any comments on where I might be going wrong? Also, I wrote my own tracker
class for a proprietery tracker we use in our lab. I am sure that is working
perfectly as when I try :

  coordSystemAObserver->Clear();
    //m_TrackerTool->RequestGetTransformToParent();
     m_TrackerTool->RequestComputeTransformTo( m_WorldReference );
    if (coordSystemAObserver->GotTransform())
      {
      transform = coordSystemAObserver->GetTransform();
      position = transform.GetTranslation();
      std::cout << "Trackertool :"
              << m_TrackerTool->GetTrackerToolIdentifier()
              << "\t\t  Position = (" << position[0]
              << "," << position[1] << "," << position[2]
              << ")" << std::endl;
      }

, I get the correct position reading from the tracker.

Thanks,

Aswin John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080709/21fb6040/attachment-0001.html>


More information about the IGSTK-Users mailing list