Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLRayCastMapper Class Referenceabstract

Base class of mappers that render surfaces without geometry that a cell picker could intersect. More...

#include <Libs/MRML/DisplayableManager/vtkMRMLRayCastMapper.h>

Inheritance diagram for vtkMRMLRayCastMapper:
Collaboration diagram for vtkMRMLRayCastMapper:

Public Member Functions

virtual bool IntersectWithRay (const double p1[3], const double p2[3], double t1, double t2, vtkMatrix4x4 *toWorld, double &t, double xyz[3], double n[3])=0
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
 vtkAbstractTypeMacro (vtkMRMLRayCastMapper, vtkMapper)
 

Protected Member Functions

 vtkMRMLRayCastMapper ()=default
 
 ~vtkMRMLRayCastMapper () override=default
 

Detailed Description

Base class of mappers that render surfaces without geometry that a cell picker could intersect.

Such mappers (for example surfaces that are ray cast on the GPU) implement IntersectWithRay, so that vtkMRMLAccuratePicker can pick them: the picker asks the mapper where the pick ray hits the surface instead of intersecting the cells of the input data set.

Definition at line 34 of file vtkMRMLRayCastMapper.h.

Constructor & Destructor Documentation

◆ vtkMRMLRayCastMapper()

vtkMRMLRayCastMapper::vtkMRMLRayCastMapper ( )
protecteddefault

◆ ~vtkMRMLRayCastMapper()

vtkMRMLRayCastMapper::~vtkMRMLRayCastMapper ( )
overrideprotecteddefault

Member Function Documentation

◆ IntersectWithRay()

virtual bool vtkMRMLRayCastMapper::IntersectWithRay ( const double p1[3],
const double p2[3],
double t1,
double t2,
vtkMatrix4x4 * toWorld,
double & t,
double xyz[3],
double n[3] )
pure virtual

Intersect a ray with the rendered surface. The ray is given in the model coordinates of the prop (the coordinate system of the input of the mapper), from p1 to p2; intersections are accepted between parametric coordinates t1 and t2 (0 at p1, 1 at p2).

The ray is intersected with what the mapper renders: the mapper applies its own clipping planes as it does when rendering, so that what they clip away is not hit, and surfaces that it draws where the planes cut (caps) are. vtkMRMLAccuratePicker therefore passes the whole pick ray, not clipped by the planes as vtkCellPicker would clip it (which assumes that the region kept is where all plane functions are positive).

Parameters
toWorldTransform from model to world coordinates (the matrix of the prop), to transform the clipping planes with, which are in world coordinates. If it is nullptr then clipping planes are ignored.
tParametric coordinate of the first intersection along the ray
xyzPosition of the first intersection, in model coordinates
nSurface normal at the intersection, in model coordinates
Returns
True if the ray hits the surface between t1 and t2

Implemented in vtkSegmentationLabelmapSurfaceMapper.

◆ PrintSelf()

void vtkMRMLRayCastMapper::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ vtkAbstractTypeMacro()

vtkMRMLRayCastMapper::vtkAbstractTypeMacro ( vtkMRMLRayCastMapper ,
vtkMapper  )

The documentation for this class was generated from the following file: