41 #include "core/tgPairs.h"
73 ellipseNodes(tetra, 10, 5, 0, M_PI, m_n);
78 tetra.move(btVector3(25.0, 5.0, 0));
80 const double density = 0.9;
81 const double radius = 0.5;
85 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
95 void ellipseNodes(
tgStructure& tetra,
double a,
double b,
double startT,
double endT,
size_t n)
97 double rodL = (endT - startT) / (
double) n;
99 for(
size_t i = 0; i < n; i++)
101 double x = a * cos( startT + i * rodL);
102 double y = b * sin( startT + i * rodL);
104 tgNode node( btVector3( x, y, 0.0));
112 std::cout <<
"Nodes size is " << n << std::endl;
113 for(
int i = 1; i < n; i++) {
Definition of class tgRodInfo.
Definition of tgSubject class.
const tgNodes & getNodes() const
Contains the definition of class tgModel.
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Definition of class tgStructure.
Definition of class tgStructureInfo.
virtual void setup(tgWorld &world)
Rand seeding simular to the evolution and terrain classes.
Contains the definition of class tgRod.
Definition of class tgBuildSpec.
void buildInto(tgModel &model, tgWorld &world)
void addNode(double x, double y, double z, std::string tags="")