Use vtkObjectBase’s Function Delete To Free Object

Explore what will happen when we use delete on vtkSmartPointer<vtkActor> object. vtkSmartPointer<vtkActor> leftActor = vtkSmartPointer<vtkActor>::New(); leftActor->SetMapper( mapper ); //… void *ptr = leftActor.Get(); leftActor->GetProperty()->SetColor( 1, 0, 0 ); rightActor->GetProperty()->SetColor( 0, 1, 0 ); leftActor->Delete(); cout << “leftActor: ” << (void *)leftActor.Get() << endl; cout << “leftActor reference count: ” << Read more…

Wolfram – Coordinates and Graphics

Draw a circle and an inner circle Graphics[{Circle[{0, 0}, 1], Circle[{0, -0.5}, 0.5]}] Draw 10 circles which has center (i,i) and i is in {1,10} Graphics[Table[Circle[{i, i}, 0.5], {i, 10}]] Connect 10 points which is at (i,i) data = Table[{i, i}, {i, 10}] ListLinePlot[data] Or: Graphics[Line[data]] ListLinePlot[{{1, 1}, {2, 3}, {3, Read more…

The Example About vtkPolyDataNormals

The algorithm class vtkPolyDataNormals can be used to calculate normals of points and cells in polydata. The following example shows how to use it. Cube Create a cube in which every cell is a single square. All information can be found in polydata, we use vtkPolyDataNormals to handle it and Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X