[vtkusers] Display only ONE GridPoly per axis in a CubeAxesActor
Kim Rosenbohm
kim.rosenbohm at posteo.de
Mon Jul 28 07:48:03 EDT 2014
I'm a VTK-noobs, so I hope someone has an idea. This is my code to
create the axes:
double axesColor[3] = {0, 0, 0};
m_axesActor->SetVisibility(1);
m_axesActor->SetCamera(m_renderer->GetActiveCamera());
m_axesActor->SetBounds(m_surfaceMapper->GetBounds());
m_axesActor->SetTickLocationToOutside();
m_axesActor->SetFlyMode(VTK_FLY_OUTER_EDGES);
m_axesActor->SetGridLineLocation(VTK_GRID_LINES_FURTHEST);
//setup x
axis
m_axesActor->DrawXGridlinesOn();
m_axesActor->GetXAxesLinesProperty()->SetColor(axesColor);
m_axesActor->GetXAxesGridlinesProperty()->SetColor(axesColor);
m_axesActor->GetXAxesGridpolysProperty()->SetColor(axesColor);
m_axesActor->GetXAxesInnerGridlinesProperty()->SetColor(axesColor);
m_axesActor->XAxisMinorTickVisibilityOff();
m_axesActor->SetXAxisLabelVisibility(1);
m_axesActor->GetTitleTextProperty(0)->SetColor(axesColor);
m_axesActor->GetLabelTextProperty(0)->SetColor(axesColor);
//setup y
axis
m_axesActor->DrawYGridlinesOn();
m_axesActor->GetYAxesLinesProperty()->SetColor(axesColor);
m_axesActor->GetYAxesGridlinesProperty()->SetColor(axesColor);
m_axesActor->GetYAxesGridpolysProperty()->SetColor(axesColor);
m_axesActor->GetYAxesInnerGridlinesProperty()->SetColor(axesColor);
m_axesActor->YAxisMinorTickVisibilityOff();
m_axesActor->SetYAxisLabelVisibility(1);
m_axesActor->GetTitleTextProperty(1)->SetColor(axesColor);
m_axesActor->GetLabelTextProperty(1)->SetColor(axesColor);
//setup z
axis
m_axesActor->DrawZGridlinesOn();
m_axesActor->GetZAxesLinesProperty()->SetColor(axesColor);
m_axesActor->GetZAxesGridlinesProperty()->SetColor(axesColor);
m_axesActor->GetZAxesGridpolysProperty()->SetColor(axesColor);
m_axesActor->GetZAxesInnerGridlinesProperty()->SetColor(axesColor);
m_axesActor->ZAxisMinorTickVisibilityOff();
m_axesActor->ZAxisLabelVisibilityOn();
m_axesActor->GetTitleTextProperty(2)->SetColor(axesColor);
m_axesActor->GetLabelTextProperty(2)->SetColor(axesColor);
m_axesActor->GetLabelTextProperty(2)->SetOrientation(-90.0);
//setup
unit strings
m_axesActor->SetXUnits("");
m_axesActor->SetYUnits("");
m_axesActor->SetZUnits("");
//add to scene
m_renderer->AddActor(m_axesActor);
Now, if I enable grid polys:
"m_axesActor->DrawXGridlPolysOn()" I get a grid of polys (which the name
states, obviously),
but I want just ONE poly in the same plane where
axes are... (Sort of like this:
http://cloud.originlab.com/www/resources/graph_gallery/images_galleries/graph_gallery_3dxyywalls_500px.gif
[5])
If there's a different way/class I need to use to achieve this,
please feel free to tell me.
Best Regards,
Kim
Am 26.07.2014 13:38
schrieb Kim Rosenbohm:
> Hi All.
>
> I want to display the axes to a
plot in a fashion so that the scales are
> always behind/below the plot
(so far so good, works) and shows ONE
> filled plane for X-Y-Z there.
>
I tried a lot of options, but found no combination that allows that. I
> always get all grid polys shown... I don't need this to work in the
same
> CubeAxesActor. If I need to use a second one that would be fine
with me.
>
> Any Ideas or do I need to roll my own class?!
>
> Best
Regards,
>
> Kim
> _______________________________________________
>
Powered by www.kitware.com [1]
>
> Visit other Kitware open-source
projects at http://www.kitware.com/opensource/opensource.html [2]
>
>
Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ [3]
>
> Follow this link to
subscribe/unsubscribe:
>
http://public.kitware.com/mailman/listinfo/vtkusers [4]
Links:
------
[1] http://www.kitware.com
[2]
http://www.kitware.com/opensource/opensource.html
[3]
http://www.vtk.org/Wiki/VTK_FAQ
[4]
http://public.kitware.com/mailman/listinfo/vtkusers
[5]
http://cloud.originlab.com/www/resources/graph_gallery/images_galleries/graph_gallery_3dxyywalls_500px.gif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140728/d5e8af1c/attachment.html>
More information about the vtkusers
mailing list