Class f3d::mesh_view
Definition: mesh\_view.h (line 26)
Abstract class to represent a 3D surfacic mesh view in memory.
The mesh_view class represents a 3D surfacic mesh with points, faces, normals and texture coordinates. It is used to add meshes directly to the scene without having to write them to a file. The interface allows to provide a view of the mesh in memory, making it possible to visualize data without having to convert and copy to F3D internal structures. It also allows to provide an animated mesh by providing different views of the mesh at different times.
Inner classes
Members
Public types
Enumeration type data_type
Definition: mesh\_view.h (line 40)
enum data_type {
U8,
I8,
U16,
I16,
U32,
I32,
U64,
I64,
F32,
F64
}
Enumeration of supported scalar types for point and face scalars
Enumerator U8
Enumerator I8
Enumerator U16
Enumerator I16
Enumerator U32
Enumerator I32
Enumerator U64
Enumerator I64
Enumerator F32
Enumerator F64
Public functions
Function getTimeRange
virtual std::array< double, 2 > f3d::mesh_view::getTimeRange() const
Get the temporal range
Return type: std::array< double, 2 >
Function getMemoryView
virtual memory_view_t f3d::mesh_view::getMemoryView(double time) const =0
Specify the mesh data by providing a view of the mesh in memory at a given time. Make sure to add a thread synchronization mechanism if the mesh data is updated asynchronously.
Parameters:
- double time
Return type: memory_view_t
Public static functions
Function dataTypeDispatch
static decltype(auto) f3d::mesh_view::dataTypeDispatch(f3d::mesh_view::data_type t, Functor &&f)
Dispatch a functor based on the data type, used to avoid code duplication when handling data of different types.
Parameters:
- f3d::mesh_view::data_type t
- Functor && f
Return type: decltype(auto)