Changeset 339 in flair-src for trunk/lib/FlairSimulator/src/X8.cpp


Ignore:
Timestamp:
Nov 28, 2019, 8:59:49 AM (2 years ago)
Author:
Sanahuja Guillaume
Message:

allow all blade rotations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/X8.cpp

    r214 r339  
    137137
    138138  tfl_blade = new Blade(this, vector3df(70.71, -70.71, 17.5));
    139   tfr_blade = new Blade(this, vector3df(70.71, 70.71, 17.5), true);
    140   trl_blade = new Blade(this, vector3df(-70.71, -70.71, 17.5), true);
     139  tfr_blade = new Blade(this, vector3df(70.71, 70.71, 17.5), vector3df(0, 0, 0), true);
     140  trl_blade = new Blade(this, vector3df(-70.71, -70.71, 17.5), vector3df(0, 0, 0), true);
    141141  trr_blade = new Blade(this, vector3df(-70.71, 70.71, 17.5));
    142142
    143143  bfl_blade = new Blade(this, vector3df(70.71, -70.71, -17.5));
    144   bfr_blade = new Blade(this, vector3df(70.71, 70.71, -17.5), true);
    145   brl_blade = new Blade(this, vector3df(-70.71, -70.71, -17.5), true);
     144  bfr_blade = new Blade(this, vector3df(70.71, 70.71, -17.5), vector3df(0, 0, 0), true);
     145  brl_blade = new Blade(this, vector3df(-70.71, -70.71, -17.5),  vector3df(0, 0, 0),true);
    146146  brr_blade = new Blade(this, vector3df(-70.71, 70.71, -17.5));
    147147
     
    161161void X8::AnimateModel(void) {
    162162  motor_speed_mutex->GetMutex();
    163   tfl_blade->SetRotationSpeed(K_MOT * motor_speed[0]);
    164   tfr_blade->SetRotationSpeed(-K_MOT * motor_speed[1]);
    165   trl_blade->SetRotationSpeed(-K_MOT * motor_speed[2]);
    166   trr_blade->SetRotationSpeed(K_MOT * motor_speed[3]);
    167 
    168   bfl_blade->SetRotationSpeed(-K_MOT * motor_speed[4]);
    169   bfr_blade->SetRotationSpeed(K_MOT * motor_speed[5]);
    170   brl_blade->SetRotationSpeed(K_MOT * motor_speed[6]);
    171   brr_blade->SetRotationSpeed(-K_MOT * motor_speed[7]);
     163  tfl_blade->SetRotationSpeed(K_MOT * vector3df(0, 0,motor_speed[0]));
     164  tfr_blade->SetRotationSpeed(-K_MOT * vector3df(0, 0,motor_speed[1]));
     165  trl_blade->SetRotationSpeed(-K_MOT * vector3df(0, 0,motor_speed[2]));
     166  trr_blade->SetRotationSpeed(K_MOT * vector3df(0, 0,motor_speed[3]));
     167
     168  bfl_blade->SetRotationSpeed(-K_MOT * vector3df(0, 0,motor_speed[4]));
     169  bfr_blade->SetRotationSpeed(K_MOT * vector3df(0, 0,motor_speed[5]));
     170  brl_blade->SetRotationSpeed(K_MOT * vector3df(0, 0,motor_speed[6]));
     171  brr_blade->SetRotationSpeed(-K_MOT * vector3df(0, 0,motor_speed[7]));
    172172  motor_speed_mutex->ReleaseMutex();
    173173
Note: See TracChangeset for help on using the changeset viewer.