Пример #1
0
bool FAT::create_root_directory()
{
    unsigned char buffer[BLOCK_SIZE] = { 0 };

    m_root = new DirectoryEntry(true, "", 0, 2*DirectoryEntry::DIRECTORY_ENTRY_SIZE);
    m_root->get_data(buffer);
    if (::write(m_fd, buffer, BLOCK_SIZE) != BLOCK_SIZE)
        return false;

    DirectoryEntry cur_dir(true, ".", 0, 2*DirectoryEntry::DIRECTORY_ENTRY_SIZE);
    DirectoryEntry up(true, "..", 0, 2*DirectoryEntry::DIRECTORY_ENTRY_SIZE);

    //  Write root to 1st block
    m_free_blocks[0] = true;
    cur_dir.get_data(buffer);
    up.get_data(buffer + DirectoryEntry::DIRECTORY_ENTRY_SIZE);
    if (::write(m_fd, buffer, BLOCK_SIZE) != BLOCK_SIZE)
        return false;

    ::lseek(m_fd, TABLE_SIZE*sizeof(unsigned int), SEEK_SET);
    if (::write(m_fd, m_free_blocks, BLOCK_SIZE) != BLOCK_SIZE)
        return false;

    return true;
}
Пример #2
0
void MusicLibrary::reloadLibraries(QString dir){

    QDir cur_dir(dir);

    artists.append(cur_dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot));

}
Пример #3
0
int DirContent::gen_dir_content(QListViewItem *item)
{
  qDebug("in gen_dirs_content(QListViewItem *item)");
  if (item==0) 
  {
    opendir_=false;
    qDebug("no point a item");
    return -1;
  }

  FOListViewItem *cur_item=(FOListViewItem*)item;

  std::string opendir_fp=(cur_item->get_fullpath());
  return gen_dir_content(cur_item->get_fullpath());


  int open_dir_status=open_dir(opendir_fp.c_str());
  if (open_dir_status==OPENDIR_FAIL || open_dir_status==ALREADY_OPEN) 
  { 
    qDebug("OPENDIR_FAIL or ALREADY_OPEN");
    opendir_=false;
    return -2;
  }
  opendir_=true;

    dn_=cur_item->get_fullpath();

  // because clear() will delete all item, so after claer(),
  // don't use item object;
  clear();
  gen_items(files_, false);
  gen_items(dirs_, true);


  set_dirname(dn_);
  file_monitor_->monitor_file(dn_.c_str());
  qDebug("set_dirname: %s", dn_.c_str());
  emit cur_dir(dn_);
  return 0;
}
Пример #4
0
void SettingsDialog::selectPath()
{
    QDir cur_dir(ui->dataPathEdit->text());
    if (!cur_dir.exists())
        cur_dir.mkdir(cur_dir.absolutePath());

    QString path = QFileDialog::getExistingDirectory(
                this,
                tr("Choose path to store game"),
                cur_dir.absolutePath()
    );

    QDir new_dir(path);
    if (path.isEmpty() || cur_dir == new_dir)
        return;

    qDebug() << "SettingsDialog::selectPath() validating path" << path;
    QFileInfo fi(path);
    if (fi.isWritable()) {
        if (!QDir().rmdir(path)) {
            QMessageBox::critical(
                        this,
                        tr("Unable to use selected directory"),
                        tr("Unable to use selected directory\n\nDirectory is not empty, we need empty directory to relocate game data.")
            );
            return;
        }
        QDir().mkdir(path);
        ui->dataPathEdit->setText(path);
    } else {
        QMessageBox::critical(
                    this,
                    tr("Unable to use selected directory"),
                    tr("Unable to use selected directory\n\nDirectory is not writable, make sure that you are not using system directory.")
        );
    }
}
Пример #5
0
QList<Dataset*> Bingham::bingham2Tensor( DatasetBingham* ds )
{
    qDebug() << "start bingham to dwi";
    std::vector< std::vector<float> >* data = ds->getData();

    std::vector<ColumnVector> signals1;
    std::vector<ColumnVector> signals2;
    std::vector<ColumnVector> signals3;

    signals1.resize( data->size() );
    signals2.resize( data->size() );
    signals3.resize( data->size() );

    float kernel[4] = { 258.747, -82.5396, 18.716, -2.35225 };

    int gradientsSize = __GRADIENTS_60_SIZE;
    int tessGradientsSize = tess::__TESS_THREE_V_SIZE;

    ColumnVector v( gradientsSize );
    v = 0.0;
    for ( unsigned int i = 0; i < data->size(); ++i )
    {
        signals1[i] = v;
        signals2[i] = v;
        signals3[i] = v;
    }

    std::vector< std::vector<ColumnVector>* > sigs;
    sigs.push_back( &signals1 );
    sigs.push_back( &signals2 );
    sigs.push_back( &signals3 );

    ColumnVector m1( 3 );
    ColumnVector m2( 3 );
    float k1;
    float k2;
    float f0;

    //****************************************************************************
    std::vector<QVector3D>bvecs;
    std::vector<float>bvals;

    const int max_ord = 10; //((-3+static_cast<int>(sqrt(8*((*sh.get(0,0,0)).size())+1)))/2);


    Matrix gradients( gradientsSize, 3 );
    Matrix tessGradients( tessGradientsSize, 3 );

    for ( int i = 0; i < gradientsSize; ++i )
    {
        gradients( i + 1, 1 ) = __GRADIENTS_60[ i * 3 ];
        gradients( i + 1, 2 ) = __GRADIENTS_60[ i * 3 + 1 ];
        gradients( i + 1, 3 ) = __GRADIENTS_60[ i * 3 + 2 ];

        QVector3D v( __GRADIENTS_60[ i * 3 ], __GRADIENTS_60[ i * 3+1 ], __GRADIENTS_60[ i * 3 + 2] );
        bvecs.push_back( v );
        bvals.push_back( 1000 );
    }


    for ( int i = 0; i < tessGradientsSize; ++i )
    {
        tessGradients( i + 1, 1 ) = tess::__TESS_THREE_V[ i * 3 ];
        tessGradients( i + 1, 2 ) = tess::__TESS_THREE_V[ i * 3 + 1 ];
        tessGradients( i + 1, 3 ) = tess::__TESS_THREE_V[ i * 3 + 2 ];
    }

    Matrix base( FMath::sh_base( gradients, max_ord ) );
    Matrix inv_base( FMath::pseudoInverse( FMath::sh_base( tessGradients, max_ord ) ) );

    for ( unsigned int i = 0; i < data->size(); ++i ) // for all voxels
    {
        for ( int k = 0; k < 3; ++k ) // for all 3 bingham peaks
        {
            ColumnVector sig( gradientsSize );
            sig = 0.0;

            f0 = data->at( i )[ k * 9 + 8 ];

            if ( f0 > 0.0 )
            {
                m1( 1 ) = data->at( i )[ k * 9 ];
                m1( 2 ) = data->at( i )[ k * 9 + 1 ];
                m1( 3 ) = data->at( i )[ k * 9 + 2 ];
                m2( 1 ) = data->at( i )[ k * 9 + 3 ];
                m2( 2 ) = data->at( i )[ k * 9 + 4 ];
                m2( 3 ) = data->at( i )[ k * 9 + 5 ];
                k1 = data->at( i )[ k * 9 + 6 ];
                k2 = data->at( i )[ k * 9 + 7 ];

                ColumnVector tmp( tessGradientsSize );
                tmp = 0.0;

                for ( int l = 0; l < tessGradientsSize; ++l )
                {
                    ColumnVector cur_dir(3);
                    cur_dir(1) = tess::__TESS_THREE_V[l*3];
                    cur_dir(2) = tess::__TESS_THREE_V[l*3+1];
                    cur_dir(3) = tess::__TESS_THREE_V[l*3+2];

                    tmp( l + 1 ) = f0 * exp( - ( k1 * FMath::iprod(cur_dir,m1) *
                                                      FMath::iprod(cur_dir,m1) +
                                                      k2 * FMath::iprod(cur_dir,m2) *
                                                      FMath::iprod(cur_dir,m2) ) );

                }
                // transform to spherical harmonic space
                ColumnVector sh_signal = inv_base * tmp;

                //do the convolution
                for( int order(0), j(0), m(0); order <= max_ord; order+=2, ++m )
                {
                    for( int degree( -order ); degree <= order; ++degree, ++j )
                    {
                        sh_signal(j+1) = sh_signal( j+1 ) * ( kernel[m] / boost::math::spherical_harmonic_r( order, 0, 0, 0 ) );
                    }
                }

                // back transform to signal space
                ColumnVector tmp1 = base * sh_signal;
                for ( int ii = 0; ii < tmp.Nrows(); ++ii )
                {
                    if ( tmp( ii + 1 ) > 1.0 )
                    {
                        tmp( ii + 1 ) = 1.0;
                    }
                }
                sigs[k]->at( i ) = tmp1;
            }

        }
    }

    std::vector<float> b0Data( data->size(), 220 );
    QList<Dataset*> dsout;
    for ( int i = 0; i < 3; ++i )
    {
//        Writer writer( ds, QFileInfo() );
//        DatasetDWI* out = new DatasetDWI( QDir( "dwifrombingham" ), *(sigs[i]), b0Data, bvals, bvecs, writer.createHeader( gradientsSize + 1 ) );
//
//        dsout.push_back( out );
    }

    qDebug() << "finished bingham to dwi";

    return dsout;
}
Пример #6
0
void DirContent::gen_dir_content(QListViewItem *item)
{
  qDebug("in gen_dirs_content");
  if (item==0) 
  {
    opendir_=false;
    qDebug("no point a item");
    return;
  }

  FOListViewItem *cur_item=(FOListViewItem*)item;

  /*
  if ( cur_item -> is_open()) 
  {
    qDebug("already open");
    return;
  }
  */

  qDebug("dirname: %s", cur_item->dirname().c_str());
  qDebug("basename: %s", cur_item->basename().c_str());
  qDebug("qstring basename: %s", cur_item->text(0).ascii());


  std::string opendir_fp=(cur_item->get_fullpath());

  if (open_dir(opendir_fp.c_str())==OPENDIR_FAIL) 
  { 
    opendir_=false;
    return;
  }
  opendir_=true;

  /*
  if (cur_item->basename()=="../")
    dn_=cur_item->dirname();
  else
  */
    dn_=cur_item->get_fullpath();

  // because clear() will delete all item, so after claer(),
  // don't use item object;
  clear();
  gen_items(files_, false);
  gen_items(dirs_, true);


  set_dirname(dn_);
  qDebug("set_dirname: %s", dn_.c_str());
  emit cur_dir(dn_);

  //parent()->parent()->setCaption(dn.c_str()); // not yet convert to unicode
  //qApp->setCaption(dn.c_str()); // not yet convert to unicode


    //if (S_ISDIR(buf.st_mode))
     // qstr=qstr + "/";


#if 0
  DIR * dir;
  
  dir=opendir(opendir_fp.c_str());

  if (!dir)
  {
    qDebug("opendir fail: %s", opendir_fp.c_str());
    perror(opendir_fp.c_str());
    //dir_err_msg();
    return;
    //return -1;
  }


  //std::string s=cur_item->dirname() + "/" + cur_item->basename();
  std::string s=cur_item->get_fullpath();
  set_dirname(s);
  qDebug("set_dirname: %s", s.c_str());



  struct dirent *dir_ent;
  while((dir_ent=readdir(dir))!=0)
  {
    struct stat buf;
    if (strcmp(dir_ent->d_name,"?")==0)
    {
      qDebug("?");
      continue;
    }

    if (stat(std::string(opendir_fp  + "/" + dir_ent->d_name).c_str(), &buf)!=0)
    {
      qDebug("stat error");
      continue;
    }

    QString qstr;
    bool can_unicode=true;

    if (DS::big5str_to_qstr(dir_ent->d_name, qstr)!=0) // convert to unicode error
    {
       can_unicode=false;
       qstr="?";
    }

    if (S_ISDIR(buf.st_mode))
      qstr=qstr + "/";

    DirContentViewItem *node = new DirContentViewItem(this, qstr);
    if (can_unicode==false)
      node->save_fn(dir_ent->d_name);


    //dir_content.push_back(dir_ent->d_name);
  }
  closedir(dir);
#endif
}
Пример #7
0
int main()
{
	boost::filesystem::path cur_dir(".");
	walk(cur_dir, 7);
	return 0;
}
Пример #8
0
glm::vec3 CTracer::TraceRay(SRay ray)
{
	int max_iter = 400;
	int straight_iters_num = 7;
	double time_step = 4;	// in seconds
	double eps = 1e-5;
	double ztol = 1e-7;

	glm::vec4 disk_color(-1, -1, -1, -1);
	bool crossed_disk = false;
	bool crossed_other = false;
	glm::vec3 color(0, 0, 1);
	glm::vec4 other_color;
	
	glm::dvec3 cur_pos(m_camera.m_pos), cur_speed(ray.m_dir / glm::length(ray.m_dir) * light_speed);
	int iter = 0;
	glm::dvec3 cur_dir(0.0, 0.0, 0.0);
	glm::dvec3 prev_dir(0.0, 0.0, 0.0);
	Segment segm;
	SRay changed;
	double cam_to_bh = glm::length(m_camera.m_pos - black_hole.center);
	glm::dvec3 accel;
	int last_iter_straight = -1;
	double cur_pos_abs_sq;
	//while (iter < max_iter) {
	while (true) {
		// simple:
		//cur_pos += ray.m_dir * light_speed * time_step;
		//cur_speed = ray.m_dir / glm::length(ray.m_dir) * light_speed;
		// with acceleration:
		cur_pos_abs_sq = glm::dot(cur_pos, cur_pos);
		accel = -(cur_pos / glm::length(cur_pos)) * grav_const * black_hole.mass / cur_pos_abs_sq;		// assuming coordinates center is in center of black hole.
		//fout << "accel: " << accel.x << ' ' << accel.y << ' ' << accel.z << ", module: " << glm::length(accel) << std::endl;
		segm.start = cur_pos;
		//changed.m_start = cur_pos;
		cur_pos += (cur_speed + accel * time_step / 2.0) * time_step;
		cur_speed += accel * time_step;
		cur_speed *= light_speed / glm::length(cur_speed);
		// choosing non-uniform time step
		//time_step = 2 / glm::length(accel);
	
		// Checking intersection for segment.
		segm.end = cur_pos;
		auto intersn = intersection(segm);
		if (intersn.first == SPHERE_INTERSN) {
			other_color = intersn.second;
			crossed_other = true;
			if (!alpha_blending_enable) {
				return rgb_cut(other_color);
			}
			break;
		}
		else if (intersn.first == DISK_INTERSN
			&& intersn.second.w > ztol) {
			if (!crossed_disk) {
				disk_color = intersn.second;
				crossed_disk = true;
				if (!alpha_blending_enable) {
					return rgb_cut(disk_color);
				}
			}
			else {
				// encountered disk previously. 
				// It is impossible to come to this point if alpha blending is disabled.
				disk_color = alpha_blend(disk_color, intersn.second);
			}
		}
		
		// another way is to compute cross product
		//if (glm::dot(cur_pos, cur_pos) > 3 * (cam_to_bh + black_hole.radius) * (cam_to_bh + black_hole.radius) ||
		//if	(glm::dot(cur_speed, prev_dir) < (1 - eps) * light_speed * light_speed) {		// speeds must be of length light_speed
									    														// has put light_speed^2 in the right side of equation
		if (glm::length(glm::cross(cur_speed, prev_dir)) < eps * light_speed * light_speed &&
			glm::dot(cur_pos, cur_pos) > 2 * (cam_to_bh + black_hole.radius) * (cam_to_bh + black_hole.radius)) {
			if (last_iter_straight == -1) {
				last_iter_straight = iter;
			}
			else if (iter - last_iter_straight > straight_iters_num) {
				glm::dvec2 spher(0, 0);
				glm::dvec3 dir_normd = cur_speed / glm::length(cur_speed);
				spher.x = atan2(dir_normd.x, dir_normd.y) + PI;		// (at least in MS library) atan2 returns value in [-pi, pi]
				spher.y = asin(dir_normd.z);
				//fout << "final iter no: " << iter << std::endl;
				//fout << "spher coords: " << spher.y << ' ' << spher.x << std::endl;
				std::pair<unsigned, unsigned> stars_shape = img_shape(1);
				double H = stars_shape.second;
				spher.x *= H / PI;	// transforming [0, 2pi) to [0, 2H)
				spher.y = (spher.y + PI / 2.0) * H / PI;		// transforming [-pi/2, pi/2] to [0, H]
				spher.x = glm::clamp(spher.x, 0.0, 2 * H - 1);
				spher.y = glm::clamp(spher.y, 0.0, H - 1);
				//fout << "ray start: " << ray.m_start.x << ' ' << ray.m_start.y << ' ' << ray.m_start.z << std::endl;
				//fout << "ray dir: " << ray.m_dir.x << ' ' << ray.m_dir.y << ' ' << ray.m_dir.z << std::endl;
				//fout << "spher coords: " << spher.y << ' ' << spher.x << std::endl;
				
				other_color = img_get_pxl_rgba(1, int(spher.x), int(spher.y));
				other_color.w = 1;
				crossed_other = true;
				break;
			}
		}
		prev_dir = cur_speed;
		
		iter++;
	}
	//fout << "min dist to black hole: " << *min_element(dist_to_bh.begin(), dist_to_bh.end()) << std::endl;
	//std::cout << alpha_blending_enable << std::endl;
	if (!alpha_blending_enable) {
		color = rgb_cut(other_color);
	}
	else {
		if (crossed_disk) {
			if (!crossed_other) {
				color = rgb_cut(disk_color);
			}
			else {
				// Alpha-blending
				color = rgb_cut(alpha_blend(disk_color, other_color));
			}
		}
		else {
			color = rgb_cut(other_color);
		}
	}
	
	return color;
}
void er_maketexture(const std::string &source_image_dir, 
					const std::string &source_image_name, 
					const std::string &source_image_ext)
{
	char	tmp[ EI_MAX_FILE_NAME_LEN ];
	ei_get_current_directory(tmp);
	std::string cur_dir(tmp);
	cur_dir = boost::replace_all_copy( cur_dir, "\\", "/" );

	char	output_filename[ EI_MAX_FILE_NAME_LEN ];



	ei_context();
	ei_verbose( 6 );
	ei_link( "eiIMG" );
	ei_link( "eiSHADER" );
	ei_link( "eiSHADER_maya" );

	//############################### option #;
	ei_options("perspShape_option");
	ei_contrast(0.05);
	ei_samples(0,2);
	ei_filter(4,3);
	//transform motion=0, deform motion=0;
	ei_motion(0);
	ei_trace_depth(4,4,4,4,4,4);
	ei_displace(0);
	ei_face(3);
	ei_end_options();
	// maya settings: focal=35, aperture = 46.8, aspect=1.33333;
	//Depth of Field on camera "|persp|perspShape" is turned off in Maya;

	//############################### camera #;
	ei_camera("|persp|perspShape_object");
	//beauty channel;
	ei_output( (cur_dir+"/er_maketexture_output.bmp").c_str(), "bmp",1);
	printf("rendering result:%s\n",(cur_dir+"/er_maketexture_output.bmp").c_str());
	//mode=rgb;
	ei_output_variable("color",11);
	ei_end_output();
	// AOV;
	// AOV end;
	ei_focal(35);
	ei_aperture(36);
	ei_aspect(1.33333);
	ei_resolution(800,600);
	ei_clip(0.1,10000);
	ei_end_camera();
	//----------------------------------;
	ei_instance("|persp|perspShape");
	ei_element("|persp|perspShape_object");
	ei_transform(0.999945,0,-0.0104718,0,   -0.0104706,0.015038,-0.999832,0,   0.000157475,0.999887,0.0150372,0,   -2.6803,10.6466,-0.386112,1);
	ei_end_instance();
	//;
	ei_shader("maya_place2dTexture", "place2dTexture1");
	ei_shader_param_int("liq_UserDefinedU",0);
	ei_shader_param_int("liq_UserDefinedV",0);
	ei_shader_param_vector("i_uvCoord",0,0,0);
	ei_shader_param_scalar("i_coverageU", 1);
	ei_shader_param_scalar("i_coverageV", 1);
	ei_shader_param_bool("i_mirrorU", 0);
	ei_shader_param_bool("i_mirrorV", 0);
	ei_shader_param_scalar("i_noiseU", 0);
	ei_shader_param_scalar("i_noiseV", 0);
	ei_shader_param_scalar("i_offsetU", 0);
	ei_shader_param_scalar("i_offsetV", 0);
	ei_shader_param_scalar("i_repeatU", 1);
	ei_shader_param_scalar("i_repeatV", 1);
	ei_shader_param_scalar("i_rotateFrame", 0);
	ei_shader_param_scalar("i_rotateUV", 0);
	ei_shader_param_bool("i_stagger", 0);
	ei_shader_param_scalar("i_translateFrameU", 0);
	ei_shader_param_scalar("i_translateFrameV", 0);
	ei_shader_param_bool("i_wrapU", 1);
	ei_shader_param_bool("i_wrapV", 1);
	ei_shader_param_vector("o_outUV", 0, 0, 0);
	ei_end_shader();

	//make texture
	const std::string src_image_fullpath(source_image_dir+"/"+source_image_name);
	std::string des_image_fullpath(cur_dir+"/"+source_image_name);

	if(source_image_ext != "tex")
	{
		des_image_fullpath += ".tex";
		ei_make_texture( 
			src_image_fullpath.c_str(),
			des_image_fullpath.c_str(),
			EI_TEX_WRAP_CLAMP, EI_TEX_WRAP_CLAMP, EI_FILTER_BOX, 1.0f, 1.0f);
	}
	printf("des image:%s\n", des_image_fullpath.c_str());

	ei_texture( src_image_fullpath.c_str() );
	ei_file_texture( des_image_fullpath.c_str(), eiFALSE);
	ei_end_texture();


	ei_shader("maya_file", "file1");
	ei_shader_param_scalar("i_alphaGain", 1);
	ei_shader_param_bool("i_alphaIsLuminance", 0);
	ei_shader_param_scalar("i_alphaOffset", 0);
	ei_shader_param_vector("i_colorGain", 1, 1, 1);
	ei_shader_param_vector("i_colorOffset", 0, 0, 0);
	ei_shader_param_vector("i_defaultColor", 0.5, 0.5, 0.5);
	ei_shader_link_param("i_uvCoord", "place2dTexture1", "o_outUV");
	ei_shader_param_texture("i_fileTextureName", src_image_fullpath.c_str() );
	ei_shader_param_index("i_filterType", 3);
	ei_shader_param_scalar("i_filter", 1);
	ei_shader_param_scalar("i_filterOffset", 0);
	ei_shader_param_bool("i_invert", 0);
	ei_shader_param_bool("i_fileHasAlpha", 0);
	ei_shader_param_scalar("o_outAlpha", 1);
	ei_shader_param_vector("o_outColor", 0, 0, 0);
	ei_shader_param_vector("o_outTransparency", 0, 0, 0);
	ei_end_shader();

	ei_shader("maya_phong", "phong1");
	ei_shader_param_vector("i_ambientColor", 0, 0, 0);
	ei_shader_link_param("i_color", "file1", "o_outColor");
	ei_shader_param_vector("i_transparency", 0, 0, 0);
	ei_shader_param_vector("i_incandescence", 0, 0, 0);
	ei_shader_param_int("liq_UserDefinedNormal", 0);
	ei_shader_param_vector("i_normalCamera", 1, 1, 1);
	ei_shader_param_scalar("i_diffuse", 0.8);
	ei_shader_param_scalar("i_translucence", 0);
	ei_shader_param_scalar("i_translucenceDepth", 0.5);
	ei_shader_param_scalar("i_translucenceFocus", 0.5);
	ei_shader_param_scalar("i_cosinePower", 20);
	ei_shader_param_vector("i_specularColor", 0.5, 0.5, 0.5);
	ei_shader_param_scalar("i_reflectivity", 0.5);
	ei_shader_param_vector("i_reflectedColor", 0, 0, 0);
	ei_shader_param_index("i_matteOpacityMode", 2);
	ei_shader_param_scalar("i_matteOpacity", 1);
	ei_shader_param_index("i_reflectionLimit", 1);
	ei_shader_param_vector("o_outColor", 0, 0, 0);
	ei_shader_param_vector("o_outTransparency", 0, 0, 0);
	ei_end_shader();

	ei_material("phong1SG");
	ei_surface_shader("phong1");
	ei_end_material();

	//worldPrologue;

	// Renderer::exportLight("_pointLight1_pointLightShape1");;

	// Renderer::exportPointLight();
	ei_shader("pointlight", "|pointLight1|pointLightShape1_shader");
	ei_shader_param_vector("lightcolor",1,1,1);
	ei_shader_param_scalar("intensity",1);
	ei_end_shader();
	ei_light("|pointLight1|pointLightShape1_object");
	ei_light_shader("|pointLight1|pointLightShape1_shader" );
	ei_origin(0,0,0);
	ei_end_light();
	ei_instance("|pointLight1|pointLightShape1");
	ei_element("|pointLight1|pointLightShape1_object");
	ei_transform(1,0,0,0,   0,1,0,0,   0,0,1,0,   0,5.23026,0,1);
	{;
	eiInt tag = 0;
	ei_declare("|pPlane2_lightgroup",0,4, &tag);
	};
	ei_end_instance();

	// Renderer::exportLight("_pointLight2_pointLightShape2");;

	// Renderer::exportPointLight();
	ei_shader("pointlight", "|pointLight2|pointLightShape2_shader");
	ei_shader_param_vector("lightcolor",1,1,1);
	ei_shader_param_scalar("intensity",1);
	ei_end_shader();
	ei_light("|pointLight2|pointLightShape2_object");
	ei_light_shader("|pointLight2|pointLightShape2_shader" );
	ei_origin(0,0,0);
	ei_end_light();
	ei_instance("|pointLight2|pointLightShape2");
	ei_element("|pointLight2|pointLightShape2_object");
	ei_transform(1,0,0,0,   0,1,0,0,   0,0,1,0,   -5.18346,1.22941,0,1);
	{;
	eiInt tag = 0;
	ei_declare("|pPlane2_lightgroup",0,4, &tag);
	};
	ei_end_instance();

	// Renderer::exportOneGeometry_Mesh(|pPlane2|pPlaneShape11,0,0);

	//############################### mesh #;
	//shape full path name=|pPlane2|pPlaneShape11;
	ei_object("poly","|pPlane2|pPlaneShape11");
	{;
	eiTag tag;
	//### vertex positions, fnMesh.numVertices()=9;
	tag = ei_tab(EI_TYPE_VECTOR, 1, 1024);
	ei_pos_list(tag);
	ei_tab_add_vector(-0.5,-1.11022e-016,0.5);
	ei_tab_add_vector(0,-1.11022e-016,0.5);
	ei_tab_add_vector(0.5,-1.11022e-016,0.5);
	ei_tab_add_vector(-0.5,0,0);
	ei_tab_add_vector(0,0,0);
	ei_tab_add_vector(0.5,0,0);
	ei_tab_add_vector(-0.5,1.11022e-016,-0.5);
	ei_tab_add_vector(0,1.11022e-016,-0.5);
	ei_tab_add_vector(0.5,1.11022e-016,-0.5);
	ei_end_tab();
	//### N ###;
	tag = eiNULL_TAG;
	ei_declare("N",2,6, &tag);
	tag = ei_tab(EI_TYPE_VECTOR, 1, 1024);
	ei_variable("N", &tag);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_tab_add_vector(0,1,2.22045e-016);
	ei_end_tab();
	//### N ### end;
	//### UV(map1), size=9;
	tag = eiNULL_TAG;
	ei_declare("uv",2,6, &tag);
	tag = ei_tab(EI_TYPE_VECTOR2, 1, 1024);
	ei_variable("uv", &tag);
	ei_tab_add_vector2(0,0);
	ei_tab_add_vector2(0.5,0);
	ei_tab_add_vector2(1,0);
	ei_tab_add_vector2(0,0.5);
	ei_tab_add_vector2(0.5,0.5);
	ei_tab_add_vector2(1,0.5);
	ei_tab_add_vector2(0,1);
	ei_tab_add_vector2(0.5,1);
	ei_tab_add_vector2(1,1);
	ei_end_tab();
	//### triangles, size=4;
	tag = ei_tab(EI_TYPE_INDEX, 1, 1024);
	ei_triangle_list(tag);
	ei_tab_add_index(0);
	ei_tab_add_index(1);
	ei_tab_add_index(3);
	ei_tab_add_index(3);
	ei_tab_add_index(1);
	ei_tab_add_index(4);
	ei_tab_add_index(1);
	ei_tab_add_index(2);
	ei_tab_add_index(4);
	ei_tab_add_index(4);
	ei_tab_add_index(2);
	ei_tab_add_index(5);
	ei_tab_add_index(3);
	ei_tab_add_index(4);
	ei_tab_add_index(6);
	ei_tab_add_index(6);
	ei_tab_add_index(4);
	ei_tab_add_index(7);
	ei_tab_add_index(4);
	ei_tab_add_index(5);
	ei_tab_add_index(7);
	ei_tab_add_index(7);
	ei_tab_add_index(5);
	ei_tab_add_index(8);
	ei_end_tab();
	}//|pPlane2|pPlaneShape11;
	ei_end_object();
	//--------------------------;
	//ribNode->name=|pPlane2|pPlaneShape11;
	//ribNode's transform node=|pPlane2;
	//ribNode->object(0)->getDataPtr()->getFullPathName()=|pPlane2|pPlaneShape11;
	ei_instance("|pPlane2");
	ei_mtl("phong1SG");
	//shape name=|pPlane2|pPlaneShape11;
	//shape full path name=|pPlane2|pPlaneShape11;
	ei_element("|pPlane2|pPlaneShape11");
	ei_transform(9.6133,0,0,0,   0,1,0,0,   0,0,8.02763,0,   -2.76716,0,-0.566055,1);
	//ribNode->doDef=205, ribNode->doMotion=205;
	ei_motion(1);
	{//light group(light-link group);
	const char *tag = NULL;
	ei_declare("lightgroup",0,1, &tag);
	tag = ei_token("|pPlane2_lightgroup");;
	ei_variable("lightgroup", &tag);
	};
	ei_end_instance();
	//;

	//Renderer::worldEpilogue();
	ei_instgroup("perspShape");
	//camera;
	ei_add_instance("|persp|perspShape");
	//light(s);
	ei_add_instance("|pointLight1|pointLightShape1");
	ei_add_instance("|pointLight2|pointLightShape2");
	//mesh(s);
	ei_add_instance("|pPlane2");
	ei_end_instgroup( );
	//ei_set_connection( &(MayaConnection::getInstance()->connection.base );
	ei_render("perspShape", "|persp|perspShape", "perspShape_option");
	ei_end_context();

}