-
Andrew Maclean authoredAndrew Maclean authored
CxxHowTo.md 2.27 KiB
C++ How To
Often you just need a "pointer" to an example that shows you how to do something.
Here are some snippets and examples that highlight interesting features that may help you:
Camera
Example Name | Comments | Image |
---|---|---|
CameraPosition | Get the camera position while moving the image. | |
MergeSelections | Use the same camera for all renderers. | |
ShareCamera | Use the same camera for all renderers. |
Coloring
Example Name | Comments | Image |
---|---|---|
KochanekSplineDemo | How to color the slider components. | |
MergeSelections | A nifty way to get a "harmonious" set of window colors, using vtkNamedColors and vtkColorSeries. | |
ShareCamera | Store background colors in a vector for later extraction of the red, green and blue components. |
Glyphing
Example Name | Comments | Image |
---|---|---|
QuantizePolyDataPoints | Represent a point by a glyph. |
Image
Example Name | Comments | Image |
---|---|---|
WriteImage | Write out an image of various types. |
Polydata
Example Name | Comments | Image |
---|---|---|
ReadPolyData | This snippet works for most PolyData. |
Render Windows
Example Name | Comments | Image |
---|---|---|
Model | Multiple render windows. |
Random
If you want to ensure that the same random points/colors are used in C++ and other languages then it is best to use vtkMinimalStandardRandomSequence.
Example Name | Comments | Image |
---|---|---|
ColorDisconnectedRegionsDemo | A vtkLookupTable is filled with random colors. | |
HighlightWithSilhouette | Here we use randomly positioned spheres with random colors. A vtkLookupTable is filled with random colors. |