Example #1
0
	VoxelOp( std::string expr ) {
		parser.SetExpr( expr );
		parser.DefineVar( std::string( "vox" ), &voxBuff );
		parser.DefineVar( std::string( "pos_x" ), &posBuff[data::rowDim] );
		parser.DefineVar( std::string( "pos_y" ), &posBuff[data::columnDim] );
		parser.DefineVar( std::string( "pos_z" ), &posBuff[data::sliceDim] );
		parser.DefineVar( std::string( "pos_t" ), &posBuff[data::timeDim] );
	}
Example #2
0
	//constructor
	Func(std::string tag,
	     int speed_in,
	     int line_width_in,
	     double tmax_in,
	     double tinc_in,
	     double rotation_in,
	     sf::Color color_in )

		: speed( speed_in ),
		  line_width(line_width_in),
		  t (0),
		  tmax ( tmax_in ),
		  tinc ( tinc_in ),
		  rotation( rotation_in ),
		  color ( color_in )
	{
		p.DefineVar("theta", &t);
		p.SetExpr(tag);
	}