19 #ifndef CONTACT_TEST_MODEL_H
20 #define CONTACT_TEST_MODEL_H
23 #include "core/tgLinearString.h"
27 #include "btBulletDynamicsCommon.h"
32 #include "core/tgLinearString.h"
34 #include "tgcreator/tgLinearStringInfo.h"
64 const double radius = 0.15;
65 const double density = 4;
68 const double stiffness = 10000.0;
69 const double damping = .01*stiffness;
70 const int segments = 16;
71 const tgLinearString::Config stringConfig(stiffness, damping);
75 const double bigRadius = 1.0;
76 const double massLess = 0;
77 const double massive = 1.0;
90 s.
addNode(length, height + 10.0, 0);
93 s.
addPair( 0, 1,
"massive rod");
94 s.
addPair( 2, 3,
"massless rod");
105 spec.addBuilder(
"massive",
new tgRodInfo(massiveRod));
106 spec.addBuilder(
"massless",
new tgRodInfo(masslessRod));
116 allMuscles = tgCast::filter<tgModel, tgRBString> (
getDescendants());
119 std::cout <<
"StructureInfo:" << std::endl;
120 std::cout << structureInfo << std::endl;
122 std::cout <<
"Model: " << std::endl;
123 std::cout << *
this << std::endl;
128 std::cout <<
"Finished Setup!" << std::endl;
149 std::vector <tgRBString*>& getAllMuscles ()
155 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.
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Definition of class tgStructure.
Definition of class tgStructureInfo.
Contains the definition of class tgRBString. A string with small rigid bodies to create contact dynam...
Rand seeding simular to the evolution and terrain classes.
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 buildInto(tgModel &model, tgWorld &world)
void addNode(double x, double y, double z, std::string tags="")