45 const double rodDensity = 1;
46 const double rodRadius = 0.25;
67 s.move(btVector3(0, 0, 0));
82 s.move(btVector3(0, 0, 0));
87 s.move(btVector3(0, 0, 0));
93 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
94 spec.addBuilder(
"rod2",
new tgRodInfo(rodConfig2));
95 spec.addBuilder(
"box",
new tgBoxInfo(boxConfig));
104 allMuscles = tgCast::filter<tgModel, tgSpringCableActuator> (
getDescendants());
124 btVector3 com(0, 0, 0);
128 #endif // Supress compiler warning
129 for (std::size_t i = 0; i < allRods.size(); i++)
131 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.
virtual void step(double dt)
virtual void setup(tgWorld &world)
virtual btVector3 centerOfMass() const
virtual void step(double dt)
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.
Definition of class tgStructureInfo.
virtual double mass() const
For testing MuscleNP contacts.
virtual void onVisit(const tgModelVisitor &r) const
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="")