Carna Registration API Version 1.16.0
D:/Documents/mediTEC Projects/CRA/master/include/CRA/ToolByPort.h
00001 /*
00002  *  Copyright (C) 2010 - 2013 Leonid Kostrykin
00003  *
00004  *  Chair of Medical Engineering (mediTEC)
00005  *  RWTH Aachen University
00006  *  Pauwelsstr. 20
00007  *  52074 Aachen
00008  *  Germany
00009  *
00010  */
00011 
00012 #ifndef TOOLBYPORT_H_2521354512
00013 #define TOOLBYPORT_H_2521354512
00014 
00015 #include "Tool.h"
00016 
00017 namespace CRA
00018 {
00019 
00020 class Localizer;
00021 
00022 
00023 
00024 // ----------------------------------------------------------------------------------
00025 // ToolByPort
00026 // ----------------------------------------------------------------------------------
00027 
00034 class CRA_EXPORT ToolByPort : public Tool
00035 {
00036 
00037 public:
00038 
00041     ToolByPort( Localizer& localizer, const std::string& port, const std::string& name );
00042 
00045     ToolByPort( Localizer& localizer, const std::string& port );
00046 
00047 
00048     virtual const Transformation& getOrientation() const override;
00049 
00050     virtual bool isVisible() const override;
00051 
00052 
00055     const std::string& getPort() const
00056     {
00057         return port;
00058     }
00059 
00060 
00061 private:
00062 
00063     Localizer& localizer;
00064 
00065     const std::string port;
00066 
00067 
00068     mutable Transformation orientation;
00069 
00070     mutable bool visible;
00071 
00072 
00073     void updateFromLocalizer() const;
00074 
00075 }; // ToolByPort
00076 
00077 
00078 
00079 }  // namespace CRA
00080 
00081 #endif // TOOLBYPORT_H_2521354512
 All Classes Functions Variables Enumerations Enumerator