20 #ifndef vtkBlockSortHelper_h 21 #define vtkBlockSortHelper_h 49 double camWorldPos[4];
56 InverseVolumeMatrix->
DeepCopy(volMatrix);
57 InverseVolumeMatrix->
Invert();
58 InverseVolumeMatrix->
MultiplyPoint(camWorldPos, CameraPosition);
79 this->CameraPosition);
84 this->CameraPosition);
92 center[0] = bounds[0] + std::abs(bounds[1] - bounds[0]) / 2.0;
93 center[1] = bounds[2] + std::abs(bounds[3] - bounds[2]) / 2.0;
94 center[2] = bounds[4] + std::abs(bounds[5] - bounds[4]) / 2.0;
118 #endif // vtkBlockSortHelper_h bool operator()(T *first, T *second)
Abstract class for a volume mapper.
represent and manipulate 4x4 transformation matrices
double * GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
abstract specification for renderers
vtkCamera * GetActiveCamera()
Get the current camera.
virtual double * GetPosition()
Set/Get the position of the camera in world coordinates.
void MultiplyPoint(const float in[4], float out[4])
Multiply a homogeneous coordinate by this matrix, i.e.
void DeepCopy(const vtkMatrix4x4 *source)
Set the elements of the matrix to the same values as the elements of the given source matrix...
BackToFront(vtkRenderer *ren, vtkMatrix4x4 *volMatrix)
static void Invert(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Matrix Inversion (adapted from Richard Carling in "Graphics Gems," Academic Press, 1990).
a virtual camera for 3D rendering
operator() for back-to-front sorting.
topologically and geometrically regular array of data
virtual vtkImageData * GetInput()
Set/Get the input data.
Collection of comparison functions for std::sort.
static float Distance2BetweenPoints(const float p1[3], const float p2[3])
Compute distance squared between two points p1 and p2.
void ComputeCenter(double const *bounds, double *center)
bool CompareByDistanceDescending(vtkImageData *first, vtkImageData *second)
Compares distances from images (first, second) to the camera position.