[vtkusers] Const get macros?

David Doria daviddoria+vtk at gmail.com
Mon Aug 10 16:59:38 EDT 2009


Are there const get macros? (I didn't see any in vtkSetGet.h)

I have done this:
class vtkRay
{
vtkGetVector3Macro(Origin,double);
}

and later accessed it with;
void MyFunc(const vtkRay* R)
{
const double Ray1P1[3] = R->GetOrigin();
}

and it is saying that I can't call GetOrigin on R because R is const and
GetOrigin() is not a const function.

Should I just define my own Get functions when they need to be const?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090810/fa92186a/attachment.htm>


More information about the vtkusers mailing list