47 for(
int i = 0; i < pairs.size(); i++) {
54 std::vector<tgPair>& getPairs()
59 const std::vector<tgPair>& getPairs()
const
64 int addPair(
const tgPair& pair) {
66 return addElement(pair);
75 int addPair(
tgPair pair,
const std::string& space_separated_tags)
77 pair.addTags(space_separated_tags);
81 void setPair(
int key,
tgPair pair) {
82 setElement(key, pair);
85 void move(
const btVector3& offset)
87 std::vector<tgPair>& pairs = getPairs();
88 for(
int i = 0; i < pairs.size(); i++) {
89 pairs[i].move(offset);
93 void addRotation(
const btVector3& fixedPoint,
94 const btVector3& axis,
97 btQuaternion rotation(axis, angle);
98 addRotation(fixedPoint, rotation);
101 void addRotation(
const btVector3& fixedPoint,
102 const btVector3& fromOrientation,
103 const btVector3& toOrientation)
107 addRotation(fixedPoint, rotation);
110 void addRotation(
const btVector3& fixedPoint,
111 const btQuaternion& rotation)
113 std::vector<tgPair>& pairs = getPairs();
114 for(
int i = 0; i < pairs.size(); i++) {
115 pairs[i].addRotation(fixedPoint, rotation);
124 this->removeElements(other.getElements());
129 this->removeElements(other);
142 inline tgPairs operator-(
tgPairs lhs,
const std::vector<tgPair*>& rhs)
160 os <<
"tgPairs(" << std::endl;
161 const std::vector<tgPair>& pairs = p.getPairs();
162 for(
int i = 0; i < pairs.size(); i++) {
163 os <<
" " << pairs[i] << std::endl;
tgPairs & operator-=(const tgPairs &other)
Definition of class tgPair.
static btQuaternion getQuaternionBetween(btVector3 a, btVector3 b)
Contains the definition of class tgTaggables.
std::ostream & operator<<(std::ostream &os, const tgPairs &p)
Contains the definition of class tgUtil and overloaded operator<<() free functions.