FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Wizt::TriangleRenderer Class Reference

Base class for objects that render information given on the triangle of a Grid. More...

#include <TriangleRenderer.hpp>

Inheritance diagram for Wizt::TriangleRenderer:
Wizt::SkeletonOperator< SkeletonProperty > Wizt::GetSkeletonOperator Wizt::SurfaceRenderer

Public Types

using GridInspector = Fiber::GridInspector< Fiber::hasSkeletonOfGridType< Fiber::TriangularSurface > >
 

Public Member Functions

 TriangleRenderer (const string &name, int RenderCategory, const RefPtr< VCreationPreferences > &VP)
 
bool feedAnemone (Anemone &RenderAnemone, RenderBasin::ElementAttribute &SkeletonBuffer, const AnemoneCreationContext &ARC, const RefPtr< AnemoneExplorer > &AE) const override
 Feed all triangle-related data to the Render Anemone, in particular sets the Painter of the Anemone to do triangles.
 
- Public Member Functions inherited from Wizt::SkeletonOperator< SkeletonProperty >
RefPtr< Fiber::SkeletongetSkeleton (const Fiber::Grid &G) const override
 
RefPtr< Fiber::SkeletongetRefinedSkeleton (const Fiber::Grid &G, int i) const override
 

Static Public Member Functions

static RefPtr< RenderBasin::VertexAttributegetNormals (const AnemoneCreationContext &ARC)
 Query the per-vertex normal vectors for the current triangle fragment as specified via the AnemoneCreationContext and create a vertex attribute from it.
 
static void computeVertexNormals (Fiber::Representation &myVertices, Fiber::Representation &mySkeletonAsVertices, VRequest &Context)
 Compute normals in case we don't have any yet.
 

Detailed Description

Base class for objects that render information given on the triangle of a Grid.

No shader support here. Use class SurfaceRenderer for more advanced features, including FloatingOrigin.

Todo:
Current implementation does not support caching of multiple grids, e.g. time-dependent data.
Examples
CrystalSurface.cpp, EvolutionSurface.cpp, MonochromeSurface.cpp, PolychromeSurface.cpp, TransparentColoredSurface.cpp, and TransparentSurface.cpp.

Member Function Documentation

◆ computeVertexNormals()

void Wizt::TriangleRenderer::computeVertexNormals ( Fiber::Representation myVertices,
Fiber::Representation mySkeletonAsVertices,
VRequest Context 
)
static

Compute normals in case we don't have any yet.

This is a static member function just for convenience which will create a normal vector field on the vertices under the name TriangularSurface::NormalVectorFieldName .

References Fiber::TriangularSurface::NormalVectorFieldName.

◆ getNormals()

RefPtr< RenderBasin::VertexAttribute > Wizt::TriangleRenderer::getNormals ( const AnemoneCreationContext ARC)
static

Query the per-vertex normal vectors for the current triangle fragment as specified via the AnemoneCreationContext and create a vertex attribute from it.

The result can be directly fed to a RenderAnemone:

RenderAnemone.insert( getNormals( ARC ) );
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
static RefPtr< RenderBasin::VertexAttribute > getNormals(const AnemoneCreationContext &ARC)
Query the per-vertex normal vectors for the current triangle fragment as specified via the AnemoneCre...
Definition TriangleRenderer.cpp:32
The context of creating a RenderAnemone.
Definition AnemoneCreationContext.hpp:58

References Fiber::TriangularSurface::NormalVectorFieldName.