Carna Registration API Version 1.16.0
Public Member Functions | Protected Member Functions
CRA::LinkedCamera Class Reference

Implementation of Carna::Camera that is driven by a Registration and a Localizer. More...

#include <LinkedCamera.h>

Inheritance diagram for CRA::LinkedCamera:
Collaboration diagram for CRA::LinkedCamera:

List of all members.

Public Member Functions

 LinkedCamera ()
 Instantiates.
 LinkedCamera (const std::string &xrayEmptyTrf, const std::string &xrayEmptyCof, const std::string &transformationIni)
 Instantiates.
virtual ~LinkedCamera ()
 Releases acquired resources.
virtual void update (const Transformation &bearing, const Registration &registration) override
 Updates the represented scene element's bearing.
virtual void fetchCameraMatrix (Carna::base::view::Renderer &, Transformation &) override
 Obtains the camera matrix.
virtual void fetchProjectionMatrix (Carna::base::view::Renderer &, Transformation &) override
 Obtains the projection matrix.
virtual void openShutter (Carna::base::view::Renderer &) override
 Invoked before the render mode routine.
virtual void closeShutter (Carna::base::view::Renderer &) override
 Invoked after the render mode routine.
bool isInDebugMode () const
 Tells whether the camera does draw extra debugging hints.
void setInDebugMode (bool)
 Sets whether the camera does draw extra debugging hints.

Protected Member Functions

virtual void paintText (const Vector &position, const std::string &text) override
 Paints text at the given location.

Detailed Description

Implementation of Carna::Camera that is driven by a Registration and a Localizer.

Attention:
Make sure you are using at least CRA version 1.9 if you are using this class. It did not work properly before this version.
Author:
Leonid Kostrykin
Date:
23.3.12 - 25.3.13

Definition at line 47 of file LinkedCamera.h.


Constructor & Destructor Documentation

CRA::LinkedCamera::LinkedCamera ( ) [inline]

Instantiates.

Camera calibration will be done using the following files, looked up in the current working directory:

  • XRayEmpty.trf
  • XRayEmpty.cof
  • transformation.ini
Exceptions:
Carna::AssertionFailurewhen loading camera calibration files fails.

Definition at line 161 of file LinkedCamera.h.

CRA::LinkedCamera::LinkedCamera ( const std::string &  xrayEmptyTrf,
const std::string &  xrayEmptyCof,
const std::string &  transformationIni 
) [inline]

Instantiates.

Exceptions:
Carna::AssertionFailurewhen loading camera calibration files fails.

Definition at line 148 of file LinkedCamera.h.


Member Function Documentation

void CRA::LinkedCamera::closeShutter ( Carna::base::view::Renderer &  renderer) [inline, override, virtual]

Invoked after the render mode routine.

If debug mode is activated, certain additional hints are drawn.

Definition at line 234 of file LinkedCamera.h.

bool CRA::LinkedCamera::isInDebugMode ( ) const [inline]

Tells whether the camera does draw extra debugging hints.

Since:
1.8

Definition at line 254 of file LinkedCamera.h.

void CRA::LinkedCamera::openShutter ( Carna::base::view::Renderer &  renderer) [inline, override, virtual]

Invoked before the render mode routine.

Fetches matrices from supplied Registration.

Definition at line 224 of file LinkedCamera.h.

void CRA::LinkedCamera::setInDebugMode ( bool  inDebugMode) [inline]

Sets whether the camera does draw extra debugging hints.

Since:
1.8

Definition at line 261 of file LinkedCamera.h.

void CRA::LinkedCamera::update ( const Transformation &  bearing,
const Registration registration 
) [inline, override, virtual]

Updates the represented scene element's bearing.

Parameters:
bearingIs the orientation of the associated tool to the reference base.
registrationReferences the current registration.

Implements CRA::VirtualElement.

Definition at line 176 of file LinkedCamera.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator