level 1
wangweiger
楼主
class vtkMyCallback : public vtkCommand
{
public:
static vtkMyCallback *New()
{ return new vtkMyCallback; }
virtual void Execute(vtkObject *caller, unsigned long, void*)
{
vtkBoxWidget *widget = reinterpret_cast(caller);
widget->GetPlanes(planes);
this->volume->RemoveAllClippingPlanes();
planes->GetPlane(0,plane0);
planes->GetPlane(1,plane1);
planes->GetPlane(2,plane2);
planes->GetPlane(3,plane3);
planes->GetPlane(4,plane4);
planes->GetPlane(5,plane5);
volume->AddClippingPlane(plane0);
volume->AddClippingPlane(plane1);
volume->AddClippingPlane(plane2);
volume->AddClippingPlane(plane3);
volume->AddClippingPlane(plane4);
volume->AddClippingPlane(plane5);
}
//vtkFixedPointVolumeRayCastMapper *volume;
vtkVolumeRayCastMapper *volume;
vtkPlanes *planes;
vtkPlane *plane0;
vtkPlane *plane1;
vtkPlane *plane2;
vtkPlane *plane3;
vtkPlane *plane4;
vtkPlane *plane5;
double a[3];
};
怎么用C
#写出来啊,做一个东西,要用到C#
.net。蛋没学过C#,求大神帮忙翻译一下。。。
2013年12月10日 08点12分
1
{
public:
static vtkMyCallback *New()
{ return new vtkMyCallback; }
virtual void Execute(vtkObject *caller, unsigned long, void*)
{
vtkBoxWidget *widget = reinterpret_cast(caller);
widget->GetPlanes(planes);
this->volume->RemoveAllClippingPlanes();
planes->GetPlane(0,plane0);
planes->GetPlane(1,plane1);
planes->GetPlane(2,plane2);
planes->GetPlane(3,plane3);
planes->GetPlane(4,plane4);
planes->GetPlane(5,plane5);
volume->AddClippingPlane(plane0);
volume->AddClippingPlane(plane1);
volume->AddClippingPlane(plane2);
volume->AddClippingPlane(plane3);
volume->AddClippingPlane(plane4);
volume->AddClippingPlane(plane5);
}
//vtkFixedPointVolumeRayCastMapper *volume;
vtkVolumeRayCastMapper *volume;
vtkPlanes *planes;
vtkPlane *plane0;
vtkPlane *plane1;
vtkPlane *plane2;
vtkPlane *plane3;
vtkPlane *plane4;
vtkPlane *plane5;
double a[3];
};
怎么用C
#写出来啊,做一个东西,要用到C#
.net。蛋没学过C#,求大神帮忙翻译一下。。。