46 for(
int i = 0; i < pairs.size(); i++) {
53 std::vector<tgPair>& getPairs()
58 const std::vector<tgPair>& getPairs()
const
63 int addPair(
const tgPair& pair) {
65 return addElement(pair);
74 int addPair(
tgPair pair,
const std::string& space_separated_tags)
76 pair.addTags(space_separated_tags);
80 void setPair(
int key,
tgPair pair) {
81 setElement(key, pair);
84 void move(
const btVector3& offset)
86 std::vector<tgPair>& pairs = getPairs();
87 for(
int i = 0; i < pairs.size(); i++) {
88 pairs[i].move(offset);
92 void addRotation(
const btVector3& fixedPoint,
93 const btVector3& axis,
96 btQuaternion rotation(axis, angle);
97 addRotation(fixedPoint, rotation);
100 void addRotation(
const btVector3& fixedPoint,
101 const btVector3& fromOrientation,
102 const btVector3& toOrientation)
106 addRotation(fixedPoint, rotation);
109 void addRotation(
const btVector3& fixedPoint,
110 const btQuaternion& rotation)
112 std::vector<tgPair>& pairs = getPairs();
113 for(
int i = 0; i < pairs.size(); i++) {
114 pairs[i].addRotation(fixedPoint, rotation);
123 this->removeElements(other.getElements());
128 this->removeElements(other);
141 inline tgPairs operator-(
tgPairs lhs,
const std::vector<tgPair*>& rhs)
159 os <<
"tgPairs(" << std::endl;
160 const std::vector<tgPair>& pairs = p.getPairs();
161 for(
int i = 0; i < pairs.size(); i++) {
162 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 $Id$.
std::ostream & operator<<(std::ostream &os, const tgPairs &p)
Contains the definition of class tgUtil and overloaded operator<<() free functions.