19 #ifndef CONTACT_TEST_MODEL_H
20 #define CONTACT_TEST_MODEL_H
27 #include "btBulletDynamicsCommon.h"
62 const double radius = 0.15;
63 const double density = 4;
66 const double stiffness = 10000.0;
67 const double damping = .01*stiffness;
68 const int segments = 16;
73 const double bigRadius = 1.0;
74 const double massLess = 0;
75 const double massive = 1.0;
88 s.
addNode(length, height + 10.0, 0);
91 s.
addPair( 0, 1,
"massive rod");
92 s.
addPair( 2, 3,
"massless rod");
103 spec.addBuilder(
"massive",
new tgRodInfo(massiveRod));
104 spec.addBuilder(
"massless",
new tgRodInfo(masslessRod));
111 structureInfo.buildInto(*
this, world);
114 allMuscles = tgCast::filter<tgModel, tgRBString> (
getDescendants());
117 std::cout <<
"StructureInfo:" << std::endl;
118 std::cout << structureInfo << std::endl;
120 std::cout <<
"Model: " << std::endl;
121 std::cout << *
this << std::endl;
126 std::cout <<
"Finished Setup!" << std::endl;
147 std::vector <tgRBString*>& getAllMuscles ()
153 std::vector<tgRBString*> allMuscles;
virtual void setup(tgWorld &world)
Definition of class tgRodInfo.
Definition of tgSubject class.
Convenience function for combining strings with ints, mostly for naming structures.
virtual void step(double dt)
Contains the definition of class tgModel. $Id$.
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Contains the definition of class tgLinearString.
Definition of class tgStructure.
Definition of class tgStructureInfo.
Contains the definition of class tgRBString. A string with small rigid bodies to create contact dynam...
Definition of class tgLinearStringInfo.
Contains the definition of class tgUtil and overloaded operator<<() free functions.
Definition of class tgBuildSpec.
Definition of class tgRigidAutoCompound.
void notifyStep(double dt)
std::vector< tgModel * > getDescendants() const
Contains the definition of class tgRBStringInfo. A string with small rigid bodies to create contact d...
void addNode(double x, double y, double z, std::string tags="")