37 #include "LinearMath/btVector3.h"
57 double triangle_length;
58 double triangle_height;
82 delete m_pStringController;
91 tetra.
addNode(-edge / 2.0, 0, 0);
93 tetra.
addNode( edge / 2.0, 0, 0);
97 tetra.
addNode(-edge / 2.0, height, 0);
99 tetra.
addNode( edge / 2.0, height, 0);
101 tetra.
addNode(0, height, width);
139 addNodes(s, c.triangle_length, c.triangle_height, c.prism_height);
148 s.move(btVector3(0, 10, 0));
152 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
159 structureInfo.buildInto(*
this, world);
163 allMuscles = tgCast::filter<tgModel, tgLinearString> (
getDescendants());
167 for (std::size_t i = 0; i < allMuscles.size(); i++)
169 allMuscles[i]->attach(m_pStringController);
184 throw std::invalid_argument(
"dt is not positive");
virtual void step(double dt)
virtual void setup(tgWorld &world)
Definition of class tgRodInfo.
const std::vector< tgLinearString * > & getAllMuscles() const
virtual void step(double dt)
virtual void onVisit(const tgModelVisitor &r) const
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Defines a 3 strut 9 string tensegrity model.
Contains the definition of class tgLinearString.
virtual void onVisit(tgModelVisitor &r)
Definition of class tgStructure.
Definition of class tgStructureInfo.
Definition of class tgLinearStringInfo.
Contains the definition of class tgRod $Id$.
Definition of class tgBuildSpec.
virtual void setup(tgWorld &world)
Contains the definition of the class PretensonController.
void notifyStep(double dt)
std::vector< tgModel * > getDescendants() const
void addNode(double x, double y, double z, std::string tags="")