描述
本例将点加载到polydata和非结构化网格中,然后将它们组合在一起。
该示例还可以扩展到显示正在合并的单元格。
#include <vtkActor.h>
#include <vtkAppendFilter.h>
#include <vtkDataSetMapper.h>
#include <vtkGlyph3DMapper.h>
#include <vtkNamedColors.h>
#include <vtkNew.h>
#include <vtkPointSource.h>
#include <vtkPoints.h>
#include <vtkPolyData.h>
#include <vtkProperty.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkSmartPointer.h>
#include <vtkSphereSource.h>
#include <vtkUnstructuredGrid.h>
namespace {
/**
* Convert points to glyphs.
*
* @param points - The points to glyph
* @param scale - The scale, used to determine the size of the glyph
* representing the point, expressed as a fraction of the largest side of the
* bounding box surrounding the points. e.g. 0.05
*
* @return The actor.
*/
vtkSmartPointer<v

本文介绍了如何将五点的PolyData与两个点的Unstructured Grid数据融合,并通过点到矢量图形的转换,展示了将这些数据集整合在一起的步骤,以及如何创建渲染窗口和交互效果。
最低0.47元/天 解锁文章
236

被折叠的 条评论
为什么被折叠?



