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