RenderKit / ospray

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

Reuse vertices data for wireframe mesh #332

Closed xziayro closed 5 years ago

xziayro commented 5 years ago

Hello,

As far as I know in order to show the wireframe of a mesh, we need to build a new curve geometry and provide it vertices. However, the vertices of a curve is a vec3fa or a vec4f and thus data between the triangle mesh geometry and the curve geometry can not be shared. (maybe i'm mistaken).

It would be great to either have a possibility to show the wireframe builtin the triangle mesh geometry or to share the vertices by providing a vec3f to the curve geometry (since for wireframe the radius should be constant).

Cheers, Stéphane

johguenther commented 5 years ago

Hi Stéphane, the triangle mesh geometry also accepts vertices in vec3fa[] or vec4f[] format, thus sharing should work by simply using the same ospData object for both geometries.

Cheers, Johannes