Section: Visualization Toolkit Volume Rendering Classes
The basic idea of this method is as follows:
1) Enumerate the triangles. At each triangle have space for some information that will be used during rendering. This includes which tetra the triangles belong to, the plane equation and the Barycentric coefficients.
2) Keep a reference to all four triangles for each tetra.
3) At the beginning of each render, do the precomputation. This includes creating an array of transformed points (in view coordinates) and computing the view dependent info per triangle (plane equations and barycentric coords in view space)
4) Find all front facing boundary triangles (a triangle is on the boundary if it belongs to only one tetra). For each triangle, find all pixels in the image that intersect the triangle, and add this to the sorted (by depth) intersection list at each pixel.
5) For each ray cast, traverse the intersection list. At each intersection, accumulate opacity and color contribution per tetra along the ray until you reach an exiting triangle (on the boundary).
To create an instance of class vtkUnstructuredGridBunykRayCastFunction, simply invoke its constructor as follows
obj = vtkUnstructuredGridBunykRayCastFunction
obj
is an instance of the vtkUnstructuredGridBunykRayCastFunction class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkUnstructuredGridBunykRayCastFunction = obj.NewInstance ()
vtkUnstructuredGridBunykRayCastFunction = obj.SafeDownCast (vtkObject o)