void FLogistics::fillContainer(FContainer* c, int N, VRTransform* t) { for (int i=0; i<N; i++) { FProduct* p = addProduct(); t = (VRTransform*)t->duplicate(true); t->addAttachment("dynamicaly_generated", 0); p->setTransformation(t); c->add( p ); } }
FProduct* FContainer::pop() { FProduct* p = products.back(); p->getTransformation()->setMatrix(getTransformation()->getMatrix()); products.pop_back(); p->getTransformation()->show(); setMetaData("Nb: " + toString(products.size())); //p->setMetaData("ID: " + toString(p->getID())); return p; }
void FLogistics::fillContainer(FContainer* c, int N, VRTransformPtr t) { for (int i=0; i<N; i++) { FProduct* p = addProduct(); t = static_pointer_cast<VRTransform>(t->duplicate(true)); t->setVisible(true); t->setPersistency(0); p->setTransformation(t); c->add( p ); } }
FProduct* FLogistics::addProduct() { FProduct* p = new FProduct(); objects[p->getID()] = p; return p; }
FProduct* FLogistics::addProduct(OSG::VRTransformPtr t) { FProduct* p = new FProduct(); objects[p->getID()] = p; if (t) p->setTransformation(t); return p; }