RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.01k stars 182 forks source link

Volume indexPrefixed broken #439

Closed StasJ closed 4 years ago

StasJ commented 4 years ago

If you try to create a volume using indexPrefixed as an alternative to index, you get an error message that the parameter index is missing even though indexPrefixed is supposed to replace it.

gregjohnson commented 4 years ago

This is a documentation error that is being corrected. The corrected documentation excerpt is:

To maintain VTK data compatibility, the `index` array may be specified with cell
sizes interleaved with vertex indices in the following format: $n, id_1, ...,
id_n, m, id_1, ..., id_m$. This alternative `index` array layout can be enabled
through the `indexPrefixed` flag (in which case, the `cell.type` parameter
should be omitted).

  -------------------  ------------------  --------  ---------------------------------------
  Type                 Name                Default   Description
  -------------------  ------------------  --------  ---------------------------------------
  uint32[] / uint64[]  index                         [data] array of indices (into the
                                                     vertex array(s)) that form cells

  bool                 indexPrefixed          false  indicates that the `index` array is
                                                     provided in a VTK-compatible format,
                                                     where the indices of each cell are
                                                     prefixed with the number of vertices

So please try setting indexPrefixed as a bool, and passing your data through index.