void BccWorld::createRandomCurveGeometry() { const unsigned n = 15 * 15; m_allGeo = new GeometryArray; m_allGeo->create(n); BezierPatch bp; bp.resetCvs(); int i=0; bp._contorlPoints[0].y += -.2f; bp._contorlPoints[1].y += -.4f; bp._contorlPoints[2].y += -.4f; bp._contorlPoints[3].y += -.5f; bp._contorlPoints[4].y += -.5f; bp._contorlPoints[5].y += .1f; bp._contorlPoints[6].y += .5f; bp._contorlPoints[7].y += .1f; bp._contorlPoints[9].y += .5f; bp._contorlPoints[10].y += .5f; bp._contorlPoints[13].y += -.4f; bp._contorlPoints[14].y += -.85f; bp._contorlPoints[15].y += -.21f; i=0; for(;i<16;i++) { bp._contorlPoints[i] *= 80.f; bp._contorlPoints[i].y += 10.f; bp._contorlPoints[i].z -= 10.f; } RandomCurve rc; rc.create(m_allGeo, 15, 15, &bp, Vector3F(-.15f, 1.f, 0.33f), 11, 21, .9f); }
void FitTest::createRandomCurves() { const unsigned n = 15 * 15; m_allGeo->create(n); BezierPatch bp; bp.resetCvs(); int i=0; bp._contorlPoints[0].y += -.2f; bp._contorlPoints[1].y += -.4f; bp._contorlPoints[2].y += -.4f; bp._contorlPoints[3].y += -.5f; bp._contorlPoints[4].y += -.5f; bp._contorlPoints[5].y += .1f; bp._contorlPoints[6].y += .5f; bp._contorlPoints[7].y += .1f; bp._contorlPoints[9].y += .5f; bp._contorlPoints[10].y += .5f; bp._contorlPoints[13].y += -.4f; bp._contorlPoints[14].y += -.85f; bp._contorlPoints[15].y += -.21f; i=0; for(;i<16;i++) { bp._contorlPoints[i] *= 80.f; bp._contorlPoints[i].y += 10.f; bp._contorlPoints[i].z -= 10.f; } RandomCurve rc; rc.create(m_allGeo, 15, 15, &bp, Vector3F(.035f, 1.84f, 0.03f), 11, 17, .89f); }