Class vxlRenderable

A Renderable is an intermediary object between an actor and the rendering strategy that allows rendering very complex models. Think of this scenario. You have a model that has more than 65K number of vertices. Yes, it is going to happen eventually. In WebGL you can't do more than 65K indices per draw call. This is because the type of the WebGL index array is unsigned short. So, a model with more than 65K indices could not be rendered at once. In previous Voxelent versions (<0.89.3) it was required that a complex model was broken down in several JSON files. This was a way to make sure that each 'part' did not get so big as to be unable to render it. This is, each part had an index array of at most 16k elements. For example, the VTK to JSON importer (vtk2json) handles this situation and produces parts with index arrays of length = 65K. However, since version 0.89.2, it is possible to create flat shading models and also to do cell based picking. This requires generating models where triangles are not shared (so we can do flat shading). Now, if triangles are not shared, then most likely, very complex models are going to surpass the 65K limit for their index array. The renderable object encapsulates a complex model and delivers parts that abide by the 65K index rule. The renderables are requested internally by vxlRenderEngine whenever a model of BIG_OBJECT or MESH types need to be rendered.



Author: Diego Cantor.




Updates the renderable based on changes in the underlying model. After updating, the renderable parts will contain any changes to the geometry, colors or other model attributes


Type Name Description
Boolean reslice

if true, it will recreate the parts. Otherwise will use the current parts