LengthScaling.cpp
Go to the documentation of this file.
1 #include "LengthScaling.h"
2 
3 
4 using namespace armarx;
5 
6 
8 {
9  enable();
10 }
11 
13 {
14  setEnabled(true);
15 }
16 
18 {
19  setEnabled(false);
20 }
21 
23 {
24  _meterToMilli = enabled ? 1000 : 1;
25 }
26 
28 {
29  return _meterToMilli;
30 }
31 
33 {
34  return 1 / _meterToMilli;
35 }
armarx::LengthScaling::meterToMilli
float meterToMilli() const
Get the scaling factor for: millimeter = meter * factor.
Definition: LengthScaling.cpp:27
armarx::LengthScaling::disable
void disable()
Set scaling of meter to millimeter to 1.
Definition: LengthScaling.cpp:17
armarx::LengthScaling::milliToMeter
float milliToMeter() const
Get the scaling factor for: meter = millimeter * factor.
Definition: LengthScaling.cpp:32
enabled
std::atomic< bool > * enabled
Definition: RemoteGuiWidgetController.cpp:75
armarx::LengthScaling::setEnabled
void setEnabled(bool enabled)
Enable or disable length scaling.
Definition: LengthScaling.cpp:22
LengthScaling.h
armarx::LengthScaling::LengthScaling
LengthScaling()
Constructor. Enables scaling.
Definition: LengthScaling.cpp:7
armarx::LengthScaling::enable
void enable()
Set scaling of meter to millimeter to 1000.
Definition: LengthScaling.cpp:12
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28