45 const double rodDensity = 1;
46 const double rodRadius = 0.25;
67 s.move(btVector3(0, 0, 0));
83 s.move(btVector3(0, 0, 0));
88 s.move(btVector3(0, 0, 0));
94 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
95 spec.addBuilder(
"rod2",
new tgRodInfo(rodConfig2));
96 spec.addBuilder(
"box",
new tgBoxInfo(boxConfig));
105 allMuscles = tgCast::filter<tgModel, tgSpringCableActuator> (
getDescendants());
122 allMuscles[0]->setControlInput(10, dt);
125 btVector3 com(0, 0, 0);
128 for (std::size_t i = 0; i < allRods.size(); i++)
130 tgRod& ri = *(allRods[i]);
Create a box shape as an obstacle or add it to your tensegrity.
virtual void setup(tgWorld &world)
Definition of class tgRodInfo.
For testing MuscleNP contacts.
virtual void setup(tgWorld &world)
virtual void onVisit(const tgModelVisitor &r) const
virtual void step(double dt)
virtual btVector3 centerOfMass() const
virtual void onVisit(const tgModelVisitor &r) const
Class that interfaces with Bullet to build the boxes.
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
virtual void render(const tgRod &rod) const
Contains the definition of interface class tgModelVisitor.
Contains the definition of class tgWorld $Id$.
Contains the definition of class tgBulletUtil.
Definition of class tgStructure.
virtual ~simpleMuscleNP()
Definition of class tgStructureInfo.
virtual double mass() const
virtual void step(double dt)
Contains the definition of class tgRod.
Definition of class tgBuildSpec.
std::vector< tgModel * > getDescendants() const
void buildInto(tgModel &model, tgWorld &world)
void addNode(double x, double y, double z, std::string tags="")