73 hilbert(tetra, 0,0,m_xsize,0,0,m_ysize,m_n);
78 tetra.move(btVector3(25.0, 0, 0));
80 const double density = 0.9;
81 const double radius = 0.5 / m_n;
85 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
95 void hilbert(
tgStructure& tetra,
double x,
double y,
double xi,
double xj,
double yi,
double yj,
int n)
97 std::cout << x <<
" " << y <<
" " << xi <<
" " << xj <<
" " << yi <<
" " << yj << std::endl;
99 tgNode node(point(x + (xi + yi)/2, y + (xj + yj)/2));
102 hilbert(tetra, x, y, yi/2, yj/2, xi/2, xj/2, n-1);
103 hilbert(tetra, x+xi/2, y+xj/2 , xi/2, xj/2, yi/2, yj/2, n-1);
104 hilbert(tetra, x+xi/2+yi/2, y+xj/2+yj/2, xi/2, xj/2, yi/2, yj/2, n-1);
105 hilbert(tetra, x+xi/2+yi, y+xj/2+yj, -yi/2,-yj/2, -xi/2, -xj/2, n-1);
112 std::cout <<
"Nodes size is " << n << std::endl;
113 for(
int i = 1; i < n; i++) {
118 btVector3 point(
double x,
double y)
120 return btVector3(x, y, 0);
Definition of class tgRodInfo.
Definition of tgSubject class.
const tgNodes & getNodes() const
Definition of class tgPairs.
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="")