最近刚接触VTK,有个需求需要再三维中渲染中文的字符,开始用 vtkVectorText 将给定的文本字符串转换为vtkPolyData的多边形模型来绘制,但是最后渲染出来的结果中,中文字符无法识别,不显示。查阅官方文档
vtkVectorText generates vtkPolyData from an input text string. Besides the ASCII alphanumeric characters a-z, A-Z, 0-9, vtkVectorText also supports ASCII punctuation marks. (The supported ASCII character set are the codes (33-126) inclusive.) The only control character supported is the line feed character “\n”, which advances to a new line.
简单的讲就是支持 常见的数字(0-9),字母(a-z,A-Z) 和(33-126)的ASCII码字符,所以无奈只能放弃这种方案。
VTK9三维场景显示中文的解决方案

最低0.47元/天 解锁文章
303

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



