<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
I am trying to customize the behavior of vtkContourWidget to
constrain drawing contours on a surface, and I need to modify the
point placer to reimplement the validation. In particular, the
default contouring (in 5.10) doesn't support surfaces with multiple
components (with vtkPolygonalSurfaceContourLineInterpolator and
vtkOrientedGlyphContourRepresentation). <br>
I thought I would separate the surface into connected regions and
then validate against the region id to make sure I don't lock up the
interpolator in trying to find the path between the components
(which obviously doesn't exist).<br>
I thought I would just write my point placer and reimplement the
validating methods:<br>
<br>
<font face="Courier New, Courier, monospace">//====================================<br>
<small>class myPointPlacer : public vtkPolygonalSurfacePointPlacer<br>
{<br>
public :<br>
//...<br>
virtual int ValidateWorldPosition(double wPt[3]);<br>
virtual int ValidateDisplayPosition(vtkRenerer *, double
dispPt[2]);<br>
//....<br>
};<br>
//--------------------------------------------------<br>
int myPointPlacer::ValidateWorldPosition(double wPt[3])<br>
{<br>
vtkIdType curRegionId;<br>
// extract the curRegionId here<br>
// ...<br>
if (this->Internals->Nodes.empty()) // compiler will
complain here: "Invalid use of incomplete type"<br>
{<br>
this->regionId = curRegionId;<br>
}<br>
else<br>
{<br>
if (curRegionId != this->regionId) // point on a
different region, reject<br>
return 0;<br>
}<br>
<br>
return 1;<br>
}</small><br>
//====================================</font><br>
<br>
Alas, this won't compile because the
vtkPolygonalSurfacePointPlacerInternals is defined in
vtkPolygonalSurfacePointPlacer.cxx, and there is no header file I
could #include that would tell the compiler what this->Internals
is...<br>
<br>
How can I get around this and use the internals?<br>
Thank you for all ideas/suggestions!<br>
Using VTK 5.10.<br>
<br>
Cheers,<br>
Miro
<div style="font-size:75%"><br>
</div>
<div class="moz-signature">
</div>
</body>
</html>