24 void testNode(
const btVector3& fixedPoint,
const btVector3& axis,
double angle)
28 std::cout <<
"[tgNode]:" << std::endl;
29 std::cout <<
"- before rotation: " << n << std::endl;
31 n.addRotation(fixedPoint, axis, angle);
33 std::cout <<
"- after rotation: " << n << std::endl;
36 void testNodes(
const btVector3& fixedPoint,
const btVector3& axis,
double angle)
38 std::cout <<
"[tgNodes]:" << std::endl;
46 std::cout <<
"- before rotation: " << nodes << std::endl;
48 nodes.addRotation(fixedPoint, axis, angle);
50 std::cout <<
"- after rotation: " << nodes << std::endl;
53 void testPair(
const btVector3& fixedPoint,
const btVector3& axis,
double angle)
57 std::cout <<
"[tgPair]:" << std::endl;
58 std::cout <<
"- before rotation: " << p << std::endl;
60 p.addRotation(fixedPoint, axis, angle);
62 std::cout <<
"- after rotation: " << p << std::endl;
65 void testPairs(
const btVector3& fixedPoint,
const btVector3& axis,
double angle)
67 std::cout <<
"[tgPairs]:" << std::endl;
77 pairs.addPair(nodes.
pair(0, 1));
78 pairs.addPair(nodes.
pair(2, 3));
79 pairs.addPair(nodes.
pair(4, 5));
81 std::cout <<
"- before rotation: " << pairs << std::endl;
83 pairs.addRotation(fixedPoint, axis, angle);
85 std::cout <<
"- after rotation: " << pairs << std::endl;
90 int main(
int argc,
char** argv)
93 btVector3 fixedPoint(0,0,0);
94 btVector3 axis(1,0,0);
95 double angle = M_PI/2.0;
97 std::cout <<
"Fixed point: " << fixedPoint << std::endl;
98 std::cout <<
"Axis: " << axis << std::endl;
99 std::cout <<
"Angle: " << angle <<
" radians" << std::endl;
101 testNode(fixedPoint, axis, angle);
102 testNodes(fixedPoint, axis, angle);
104 testPair(fixedPoint, axis, angle);
105 testPairs(fixedPoint, axis, angle);
tgPair pair(int from, int to, std::string tags="")
Definition of class tgPair.
Definition of class tgPairs.
Definition of class tgNodes.
Definition of class tgNode.
int main(int argc, char **argv)
int addNode(const btVector3 &node)