OP_ERROR SOP_Rain::cookMySop(OP_Context &context) { //UT_Interrupt *boss; if (error() < UT_ERROR_ABORT) { //boss = UTgetInterrupt(); //boss->opStart("Start generating rain"); fpreal now = TIME(context.getTime()); long nPoints = NPOINTS( now ); UT_Vector3 rainDirection = RAINDIRECTION(now); //rainDirection.normalize(); //TODO: check for (0,0,0) vector RainData rain( now, nPoints, BOUNDMIN (now), BOUNDMAX (now), rainDirection, DICEMIN(now), DICEMAX(now), SEED(now), SPEED (now), SPEEDVARIENCE (now)); if(rain.getAllocationState() == false || isPointsNumberChanged_ == true) { rain.allocate(nPoints); } if( rain.getAllocationState() == true && ( rain.getCachedState() == false || isParameterChanged_ == true ) ) { rain.computeInitialPositions(); rain.setCachedState(true); } if (isPointsGenerated_ == false) { printf("Generate Points procedure\n"); gdp->clearAndDestroy(); generatePoints(gdp, nPoints); isPointsGenerated_ = true; } for ( GA_Iterator pr_it(gdp->getPrimitiveRange()); !pr_it.atEnd(); ++pr_it) { GEO_Primitive* prim = gdp->getGEOPrimitive(*pr_it); GA_Range range = prim->getPointRange(); rain.shiftPositions( gdp, range); } //boss->opEnd(); } isParameterChanged_ = false; isPointsNumberChanged_ = false; //unlockInputs(); return error(); }
return; } static struct point_st all_points[256]; static struct point_st all_points_one[256]; #define NPOINTS(points) (sizeof(points)/sizeof(points[0])) /* Test that outputs a graph of the timings * when manipulating the last record byte (pad) * for AES-SHA1. */ static struct test_st test_sha1 = { .points = all_points, .npoints = NPOINTS(all_points), .text_size = 18*16, .name = "sha1", .file = "out-sha1.txt", .desc = NULL }; /* Test that outputs a graph of the timings * when manipulating the last record byte (pad) * for AES-SHA256. */ static struct test_st test_sha256 = { .points = all_points, .npoints = NPOINTS(all_points), .text_size = 17*16, .name = "sha256",