CMirror_Dot *p1,*p2;
p1=p2=new Cmirror_Dot;
if(buildings[i].planes[j].plane_flag==true)
{
p1->SetDot(num, visual_dot);
p1->SetPlaneDot(plane_first_dot,plane_second_dot);
num++; if(num==1)
{
mirror_dot.next_rank=p1;
mirror_dot.next_rank->parent=&mirror_dot;
queue.insert(p1);
}
else
{
p2->next_Dot=p1;
p2->next_Dot->parent=&mirror_dot; //保存父节点的指针
}
p2=p1;
p1=new CMirror_Dot; //生成镜像列表
buildings[i].planes[j].plane_flag=false; //消除面的标记
}
}
p1=p2=new Cmirror_Dot;
if(buildings[i].planes[j].plane_flag==true)
{
p1->SetDot(num, visual_dot);
p1->SetPlaneDot(plane_first_dot,plane_second_dot);
num++; if(num==1)
{
mirror_dot.next_rank=p1;
mirror_dot.next_rank->parent=&mirror_dot;
queue.insert(p1);
}
else
{
p2->next_Dot=p1;
p2->next_Dot->parent=&mirror_dot; //保存父节点的指针
}
p2=p1;
p1=new CMirror_Dot; //生成镜像列表
buildings[i].planes[j].plane_flag=false; //消除面的标记
}
}
p1=new CMirror_Dot; //如果你那段码只执行一次,就可以去掉这句。
buildings[i].planes[j].plane_flag=false;