-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpose.cpp
More file actions
62 lines (50 loc) · 888 Bytes
/
Copy pathpose.cpp
File metadata and controls
62 lines (50 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "pose.h"
#include <iostream>
Pose::Pose()
{
/*
for(int i=0; i<22; i++){
target[i] = 0;
}
gain = 0.05;
*/
clear();
}
Pose::Pose(double value[]){
for(int i=0; i<22; i++){
target[i] = value[i];
}
gain = 0.05;
}
void Pose::clear(){
for(int i=0; i<22; i++){
target[i] = 0;
}
gain = 0.05;
}
void Pose::setTarget(int i, double v){
target[i] = v;
}
void Pose::setGain(double v){
gain = v;
}
double Pose::getGain(){
return gain;
}
double* Pose::getTarget(){
return target;
}
double Pose::getTarget(int i){
if(i > 22){
std::cout << "Pose:getTarget(i) i > 22" << std::endl;
return 0;
}
return target[i];
}
Pose& Pose::operator=(const Pose& obj){
for(int i=0; i<22; i++){
this->target[i] = obj.target[i];
}
this->gain = obj.gain;
return *this;
}