Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (6 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.cpp

    r10 r15  
    2727using namespace flair::gui;
    2828
    29 namespace flair
    30 {
    31 namespace filter
    32 {
     29namespace flair {
     30namespace filter {
    3331
    34 TrajectoryGenerator2DCircle::TrajectoryGenerator2DCircle(const LayoutPosition* position,string name) : IODevice(position->getLayout(),name)
    35 {
    36     pimpl_=new TrajectoryGenerator2DCircle_impl(this,position,name);
    37     AddDataToLog(pimpl_->output);
     32TrajectoryGenerator2DCircle::TrajectoryGenerator2DCircle(
     33    const LayoutPosition *position, string name)
     34    : IODevice(position->getLayout(), name) {
     35  pimpl_ = new TrajectoryGenerator2DCircle_impl(this, position, name);
     36  AddDataToLog(pimpl_->output);
    3837}
    3938
     39TrajectoryGenerator2DCircle::~TrajectoryGenerator2DCircle() { delete pimpl_; }
    4040
    41 TrajectoryGenerator2DCircle::~TrajectoryGenerator2DCircle()
    42 {
    43     delete pimpl_;
     41bool TrajectoryGenerator2DCircle::IsRunning(void) const {
     42  return pimpl_->is_running;
    4443}
    4544
    46 bool TrajectoryGenerator2DCircle::IsRunning(void) const
    47 {
    48     return pimpl_->is_running;
     45cvmatrix *TrajectoryGenerator2DCircle::Matrix(void) const {
     46  return pimpl_->output;
    4947}
    5048
    51 cvmatrix *TrajectoryGenerator2DCircle::Matrix(void) const
    52 {
    53     return pimpl_->output;
     49void TrajectoryGenerator2DCircle::StartTraj(const Vector2D &start_pos,
     50                                            float nb_lap) {
     51  pimpl_->StartTraj(start_pos, nb_lap);
    5452}
    5553
    56 void TrajectoryGenerator2DCircle::StartTraj(const Vector2D &start_pos,float nb_lap)
    57 {
    58     pimpl_->StartTraj(start_pos,nb_lap);
     54void TrajectoryGenerator2DCircle::FinishTraj(void) { pimpl_->FinishTraj(); }
     55
     56void TrajectoryGenerator2DCircle::StopTraj(void) { pimpl_->is_running = false; }
     57
     58void TrajectoryGenerator2DCircle::GetPosition(Vector2D &point) const {
     59  point.x = pimpl_->output->Value(0, 0);
     60  point.y = pimpl_->output->Value(0, 1);
    5961}
    6062
    61 void TrajectoryGenerator2DCircle::FinishTraj(void)
    62 {
    63     pimpl_->FinishTraj();
     63void TrajectoryGenerator2DCircle::SetCenter(const Vector2D &value) {
     64  pimpl_->pos_off = value;
    6465}
    6566
    66 void TrajectoryGenerator2DCircle::StopTraj(void)
    67 {
    68     pimpl_->is_running=false;
     67void TrajectoryGenerator2DCircle::GetSpeed(Vector2D &point) const {
     68  point.x = pimpl_->output->Value(1, 0);
     69  point.y = pimpl_->output->Value(1, 1);
    6970}
    7071
    71 void TrajectoryGenerator2DCircle::GetPosition(Vector2D &point) const
    72 {
    73     point.x=pimpl_->output->Value(0,0);
    74     point.y=pimpl_->output->Value(0,1);
     72void TrajectoryGenerator2DCircle::SetCenterSpeed(const Vector2D &value) {
     73  pimpl_->vel_off = value;
    7574}
    7675
    77 void TrajectoryGenerator2DCircle::SetCenter(const Vector2D &value)
    78 {
    79     pimpl_->pos_off=value;
    80 }
    81 
    82 void TrajectoryGenerator2DCircle::GetSpeed(Vector2D &point) const
    83 {
    84     point.x=pimpl_->output->Value(1,0);
    85     point.y=pimpl_->output->Value(1,1);
    86 }
    87 
    88 void TrajectoryGenerator2DCircle::SetCenterSpeed(const Vector2D &value)
    89 {
    90     pimpl_->vel_off=value;
    91 }
    92 
    93 void TrajectoryGenerator2DCircle::Update(Time time)
    94 {
    95     pimpl_->Update(time);
    96     ProcessUpdate(pimpl_->output);
     76void TrajectoryGenerator2DCircle::Update(Time time) {
     77  pimpl_->Update(time);
     78  ProcessUpdate(pimpl_->output);
    9779}
    9880
Note: See TracChangeset for help on using the changeset viewer.