详细说明
将场景导出为 GLTF 2.0 格式。 咱们可先去GLB官方下载glb模型 glbxz.com vtkGLTFWriter 是 vtkWriter 的具体子类,用于写入 GLTF 2.0 文件。其输入是由 CityGML 读取器生成的多块数据集。数据集包含建筑物列表、网格或点云。 对于建筑物,每个建筑物都由多个部分(多边形数据)组成,每个部分可能具有多个纹理。网格输入与一栋建筑相同。点云输入与网格输入相同,但使用 Verts 单元而不是 Polys。 材质(包括纹理)在 polydata 中被描述为字段。如果 InlineData 为 false,则我们只引用数据中引用的纹理文件,否则我们读取纹理并将其编码保存在文件中。 另请参阅vtkCityGMLReader vtkPolyData测试:vtkGLTFWriter (测试)在文件 vtkGLTFWriter.h 的第 40 行定义。
成员 Typedef 文档
◆超类
构造函数和析构函数文档
◆vtkGLTFWriter()
◆~vtkGLTFWriter()
成员函数文档
◆新()
◆IsTypeOf()
◆IsA()
◆SafeDownCast()
◆NewInstanceInternal()
◆新实例()
vtkGLTFWritervtk.org/doc/nightly/html/classvtkGLTFWriter.html
◆ PrintSelf()
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkAlgorithm.
◆ SetFileName()
指定要写入的 GLTF 文件的名称。
◆GetFileName()
指定要写入的 GLTF 文件的名称。
◆SetTextureBaseDirectory() (设置纹理基础目录)
指定纹理文件的基目录。
◆GetTextureBaseDirectory()
指定纹理文件的基目录。
◆SetPropertyTextureFile() (设置属性纹理文件)
◆GetPropertyTextureFile()
◆GetInlineData()
二进制数据是否应作为 base64 字符串包含在 json 文件中。
◆SetInlineData()
二进制数据是否应作为 base64 字符串包含在 json 文件中。
◆InlineDataOn()
二进制数据是否应作为 base64 字符串包含在 json 文件中。
◆InlineDataOff()
二进制数据是否应作为 base64 字符串包含在 json 文件中。
◆GetSaveNormal()
它会查找法线点属性并将其保存在 GLTF 文件中(如果找到名称为 NORMAL),则 Cesium 需要此属性才能在没有纹理的情况下正确渲染建筑物。
◆SetSaveNormal()
它会查找法线点属性并将其保存在 GLTF 文件中(如果找到名称为 NORMAL),则 Cesium 需要此属性才能在没有纹理的情况下正确渲染建筑物。
◆SaveNormalOn() (保存法线)
它会查找法线点属性并将其保存在 GLTF 文件中(如果找到名称为 NORMAL),则 Cesium 需要此属性才能在没有纹理的情况下正确渲染建筑物。
◆SaveNormalOff() (保存法线关闭)
它会查找法线点属性并将其保存在 GLTF 文件中(如果找到名称为 NORMAL),则 Cesium 需要此属性才能在没有纹理的情况下正确渲染建筑物。
◆获取 SaveBatchId()
它会在数据中查找名为 _BATCHID 的点数组,如果找到,则将其保存在 GLTF 文件中。 _BATCHID 是 3D Tiles b3dm 格式中使用的索引。此格式存储具有多个对象(建筑物)的网格的二进制 gltf。对象的索引范围从 0 到对象数 – 1,对象的所有点都具有相同的索引。这些索引值存储在 _BATCHID
◆SetSaveBatchId()
它会在数据中查找名为 _BATCHID 的点数组,如果找到,则将其保存在 GLTF 文件中。 _BATCHID 是 3D Tiles b3dm 格式中使用的索引。此格式存储具有多个对象(建筑物)的网格的二进制 gltf。对象的索引范围从 0 到对象数 – 1,对象的所有点都具有相同的索引。这些索引值存储在 _BATCHID
◆SaveBatchIdOn()
它会在数据中查找名为 _BATCHID 的点数组,如果找到,则将其保存在 GLTF 文件中。 _BATCHID 是 3D Tiles b3dm 格式中使用的索引。此格式存储具有多个对象(建筑物)的网格的二进制 gltf。对象的索引范围从 0 到对象数 – 1,对象的所有点都具有相同的索引。这些索引值存储在 _BATCHID
◆SaveBatchIdOff()
它会在数据中查找名为 _BATCHID 的点数组,如果找到,则将其保存在 GLTF 文件中。 _BATCHID 是 3D Tiles b3dm 格式中使用的索引。此格式存储具有多个对象(建筑物)的网格的二进制 gltf。对象的索引范围从 0 到对象数 – 1,对象的所有点都具有相同的索引。这些索引值存储在 _BATCHID
◆GetSaveTextures()
如果为 true (默认),我们将保存纹理。 除非 CopyTextures 为 true,或者您希望使用 InlineData 在 json 文件中包含二进制数据,否则我们只包含对纹理文件的引用,在这种情况下,我们必须将纹理加载到内存中,并将其编码保存在 json 文件中。 另请参阅TextureBaseDirectory (纹理基础目录)
◆SetSaveTextures() (设置保存纹理)
如果为 true (默认),我们将保存纹理。 除非 CopyTextures 为 true,或者您希望使用 InlineData 在 json 文件中包含二进制数据,否则我们只包含对纹理文件的引用,在这种情况下,我们必须将纹理加载到内存中,并将其编码保存在 json 文件中。 另请参阅TextureBaseDirectory (纹理基础目录)
◆SaveTexturesOn() (保存纹理)
如果为 true (默认),我们将保存纹理。 除非 CopyTextures 为 true,或者您希望使用 InlineData 在 json 文件中包含二进制数据,否则我们只包含对纹理文件的引用,在这种情况下,我们必须将纹理加载到内存中,并将其编码保存在 json 文件中。 另请参阅TextureBaseDirectory (纹理基础目录)
◆SaveTexturesOff() (保存纹理关闭)
如果为 true (默认),我们将保存纹理。 除非 CopyTextures 为 true,或者您希望使用 InlineData 在 json 文件中包含二进制数据,否则我们只包含对纹理文件的引用,在这种情况下,我们必须将纹理加载到内存中,并将其编码保存在 json 文件中。 另请参阅TextureBaseDirectory (纹理基础目录)
◆GetCopyTextures()
◆ SetCopyTextures()
If true we copy the textures the the same directory where FileName is saved. Default is false. See alsoTextureBaseDirectory
◆ CopyTexturesOn()
If true we copy the textures the the same directory where FileName is saved. Default is false. See alsoTextureBaseDirectory
◆ CopyTexturesOff()
If true we copy the textures the the same directory where FileName is saved. Default is false. See alsoTextureBaseDirectory
◆ GetSaveActivePointColor()
If true, the writer looks at the active scalar and if it finds a 3 or 4 component, float, unsigned char or unsigned short it stores a RGB or RGBA attribute called COLOR_0 in the GLTF file. The default is false. Note a float component has to be bewtween [0, 1] while the unsigned chars and unsigned short are OpenGL normalized integers (are either between [0, 255] for unsigned char, they are between [0, 65536] for unsigned short – they are used to quantize a float between [0, 1]).
◆ SetSaveActivePointColor()
If true, the writer looks at the active scalar and if it finds a 3 or 4 component, float, unsigned char or unsigned short it stores a RGB or RGBA attribute called COLOR_0 in the GLTF file. The default is false. Note a float component has to be bewtween [0, 1] while the unsigned chars and unsigned short are OpenGL normalized integers (are either between [0, 255] for unsigned char, they are between [0, 65536] for unsigned short – they are used to quantize a float between [0, 1]).
◆ SaveActivePointColorOn()
If true, the writer looks at the active scalar and if it finds a 3 or 4 component, float, unsigned char or unsigned short it stores a RGB or RGBA attribute called COLOR_0 in the GLTF file. The default is false. Note a float component has to be bewtween [0, 1] while the unsigned chars and unsigned short are OpenGL normalized integers (are either between [0, 255] for unsigned char, they are between [0, 65536] for unsigned short – they are used to quantize a float between [0, 1]).
◆ SaveActivePointColorOff()
If true, the writer looks at the active scalar and if it finds a 3 or 4 component, float, unsigned char or unsigned short it stores a RGB or RGBA attribute called COLOR_0 in the GLTF file. The default is false. Note a float component has to be bewtween [0, 1] while the unsigned chars and unsigned short are OpenGL normalized integers (are either between [0, 255] for unsigned char, they are between [0, 65536] for unsigned short – they are used to quantize a float between [0, 1]).
◆ GetRelativeCoordinates()
Save mesh point coordinates relative to the bounding box origin and add the corresponding translation to the root node. This is especially important for 3D Tiles as points are stored as cartesian coordinates relative to the earth center so they are stored as doubles. As GLTF can only store floats not setting this variable on results in a loss of precision of about a meter. Note that the translation information is stored in json which can store doubles.
◆ SetRelativeCoordinates()
Save mesh point coordinates relative to the bounding box origin and add the corresponding translation to the root node. This is especially important for 3D Tiles as points are stored as cartesian coordinates relative to the earth center so they are stored as doubles. As GLTF can only store floats not setting this variable on results in a loss of precision of about a meter. Note that the translation information is stored in json which can store doubles.
◆ RelativeCoordinatesOn()
Save mesh point coordinates relative to the bounding box origin and add the corresponding translation to the root node. This is especially important for 3D Tiles as points are stored as cartesian coordinates relative to the earth center so they are stored as doubles. As GLTF can only store floats not setting this variable on results in a loss of precision of about a meter. Note that the translation information is stored in json which can store doubles.
◆ RelativeCoordinatesOff()
Save mesh point coordinates relative to the bounding box origin and add the corresponding translation to the root node. This is especially important for 3D Tiles as points are stored as cartesian coordinates relative to the earth center so they are stored as doubles. As GLTF can only store floats not setting this variable on results in a loss of precision of about a meter. Note that the translation information is stored in json which can store doubles.
◆ GetBinary()
如果为 true,则另存为 GLB (二进制 GLTF)。 这是通过对 FileName 使用 .glb 扩展名和对任何其他扩展名(通常为 .gltf)取消设置来设置的
◆WriteToString()
将结果写入字符串而不是文件。
◆写入流()
将结果写入提供的 ostream。
◆GetFieldAsStringVector()
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员!
8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载
声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性
GLB下载网(glbxz.com)gltf文件下载-glb格式下载-模型制作 » GLTF Writer 类参考GLB Writer 类参考GLB/GLTF模型下载
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员!
8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载
声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性
GLB下载网(glbxz.com)gltf文件下载-glb格式下载-模型制作 » GLTF Writer 类参考GLB Writer 类参考GLB/GLTF模型下载
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 提示下载要提取码
- 分享过期和重复下载怎么办
- 模型和平台不兼容怎么办