History

cleaned up code spacing

Jeffrey Ventrella committed 13 years ago

Commit fe11d921 parent 65181cb6 files · +172 −180Browse files

Showing the changes to interface/src/HandControl.cpp (1 of 6 files). Show all

Unified · Split

interface/src/HandControl.cpp+13−13
@@ -33,14 +33,14 @@ HandControl::HandControl() { · 32 unmodified lines
3333 _envelope = 0.0f;
3434 }
3535
36−void HandControl::setScreenDimensions( int width, int height ) {
36+void HandControl::setScreenDimensions(int width, int height) {
3737 _width = width;
3838 _height = height;
3939 _startX = _width / 2;
4040 _startY = _height / 2;
4141 }
4242
43−void HandControl::update( int x, int y ) {
43+void HandControl::update(int x, int y) {
4444 _lastX = _x;
4545 _lastY = _y;
4646 _x = x;
@@ -49,22 +49,22 @@ void HandControl::update( int x, int y ) { · 2 unmodified lines
4949 _velocityY = _y - _lastY;
5050
5151 // if the mouse is moving, ramp up the envelope to increase amplitude of hand movement...
52− if (( _velocityX != 0 )
53− || ( _velocityY != 0 )) {
52+ if ((_velocityX != 0)
53+ || (_velocityY != 0)) {
5454 _enabled = true;
55− if ( _envelope < 1.0 ) {
55+ if (_envelope < 1.0) {
5656 _envelope += _rampUpRate;
57− if ( _envelope >= 1.0 ) {
57+ if (_envelope >= 1.0) {
5858 _envelope = 1.0;
5959 }
6060 }
6161 }
6262
6363 // if not enabled ramp down the envelope to decrease amplitude of hand movement...
64− if ( ! _enabled ) {
65− if ( _envelope > 0.0 ) {
64+ if (! _enabled) {
65+ if (_envelope > 0.0) {
6666 _envelope -= _rampDownRate;
67− if ( _envelope <= 0.0 ) {
67+ if (_envelope <= 0.0) {
6868 _startX = _width / 2;
6969 _startY = _height / 2;
7070 _envelope = 0.0;
@@ -77,14 +77,14 @@ void HandControl::update( int x, int y ) { · 6 unmodified lines
7777 _backFront = 0.0;
7878
7979 // if envelope is greater than zero, apply mouse movement to values to be output
80− if ( _envelope > 0.0 ) {
81− _leftRight += ( ( _x - _startX ) / (float)_width ) * _envelope;
82− _downUp += ( ( _y - _startY ) / (float)_height ) * _envelope;
80+ if (_envelope > 0.0) {
81+ _leftRight += ((_x - _startX) / (float)_width ) * _envelope;
82+ _downUp += ((_y - _startY) / (float)_height) * _envelope;
8383 }
8484 }
8585
8686 glm::vec3 HandControl::getValues() {
87− return glm::vec3( _leftRight, _downUp, _backFront );
87+ return glm::vec3(_leftRight, _downUp, _backFront);
8888 }
8989
9090 void HandControl::stop() {