API / geotoolkit3d / data / loader / vtk / VTKFactory / VTKFactory
vtk.VTKFactory.VTKFactory
This class can parse vtk files and return a comprehensive json object.
This object can be used to generate Geometries and Object3D.
Note that, for now, only ASCII format is supported
Constructors
Methods
▸ create(json, options): Object3D<Object3DEventMap>[]
Creates objects 3D from the given JSON (generated by parsing a VTK dataset).
Note, that this factory will automatically apply a recenter and a rotation (to apply Z = UP paradigm) on the given vertices.
| Name | Type | Description |
|---|---|---|
json | Data | The input json object |
options | Options | The options to use to customize resulting objects |
Object3D<Object3DEventMap>[]
▸ createLines(json, options): Line<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>[]
Creates lines from the given JSON (generated by parsing a VTK dataset).
| Name | Type | Description |
|---|---|---|
json | LinesData | The input json object |
options | LinesOptions | The options to use to customize resulting objects |
Line<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>[]
l The line
▸ createMesh(json, options): Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
Creates a mesh from the given JSON (generated by parsing a VTK dataset).
| Name | Type | Description |
|---|---|---|
json | MeshData | The input json object |
options | MeshOptions | The options to use to customize resulting objects |
Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
m The mesh
▸ createPointcloud(json, options): PointCloud
Creates a pointcloud from the given JSON (generated by parsing a VTK dataset).
One can choose what attribute will be used for point size and point color based on their names.
Note that only 'scalar' attributes and FieldData with a stride of 1 can be used.
| Name | Type | Description |
|---|---|---|
json | PointcloudData | The input json object |
options | PointcloudOptions | The options to use to customize resulting objects |
p The pointcloud
▸ getClassName(): string
string
▸ Static getClassName(): string
string