Example #1
0
void VRStroke::strokeStrew(VRGeometry* geo) {
    if (geo == 0) return;

    mode = 1;
    strewGeo = geo;

    clearChildren();
    for (uint i=0; i<paths.size(); i++) {
        vector<Vec3f> pnts = paths[i]->getPositions();
        for (uint j=0; j<pnts.size(); j++) {
            Vec3f p = pnts[j];
            VRGeometry* g = (VRGeometry*)geo->duplicate();
            addChild(g);
            g->translate(p);
        }
    }
}