Inviwo 0.9.12-pre
Inviwo documentation
 
Loading...
Searching...
No Matches
inviwo::util::ColumnMapper Class Reference

#include <dataframetomesh.h>

Classes

struct  Info
 
struct  OffsetAndPicking
 
struct  ScaleAndOffset
 
struct  Type
 

Public Types

using SpatialType = Type<3, vec3, OrdinalProperty<dmat4>>
 
using RealType = Type<1, float, ScaleAndOffset>
 
using IntType = Type<1, uint32_t, ScaleAndOffset>
 
using PickingType = Type<1, uint32_t, OffsetAndPicking>
 
using ColorType = Type<1, vec4, TransferFunctionProperty>
 
using Types = std::variant<SpatialType, RealType, IntType, PickingType, ColorType>
 

Public Member Functions

 ColumnMapper (std::span< Info > infos)
 
bool isModified () const
 
void updateSources (const DataFrame &df)
 
Mesh::BufferVector getBuffers (const DataFrame &df)
 

Detailed Description

This class manages the properties required for creating Buffers from a DataFrame dataset. In particular, it allows to select specific columns to be used for vertex data, normals, colors, etc. Data values can also be transformed.

Member Function Documentation

◆ getBuffers()

Mesh::BufferVector inviwo::util::ColumnMapper::getBuffers ( const DataFrame & df)

Generate mesh buffers for the given DataFrame set df based on the internal properties.

Parameters
arrayDataFrame used as data source
See also
updateSources

◆ isModified()

bool inviwo::util::ColumnMapper::isModified ( ) const

Query the isModified() status of all nested composite properties

Returns
true if any of the composite info properties is modified

◆ updateSources()

void inviwo::util::ColumnMapper::updateSources ( const DataFrame & df)

Update the internal state to match the DataFrame columns of df and their names.

Parameters
dfDataFrame used as source for generating mesh buffers and updating the internal properties.
See also
getBuffers

The documentation for this class was generated from the following file: