This tutorial shows how to create a geometry model using the texture effect to show a scalar result.
Create the model and add it to the view.
Create data arrays of vertices and indices for the triangles. The part is a simple structure containing three adjacent triangles.
Build a indexed triangles part with the created vertices and indices.
Create a color legend. Set title, size, text color and position it in the bottom left corner of the view.
Create a color mapper with 16 uniform levels within the range from 0 to 100. Update the legend with this color mapper.
Create a Vec2f array of texture coordinates. Use the created scalar mapper for getting the texture coordinate for a specific scalar value.
Create a texture image and update it from the scalar mapper.
Create an EffectTexture configured for showing results with the texture created above and add the effect to the part.
Add the part to the model