Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
600_4DField.cpp File Reference

[← Previous Example]In FiberLib Tutorial More...

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <eagle/PhysicalSpace.hpp>
#include <fiber/bundle/StorageTransformations.hpp>
#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
#include <memcore/Console.hpp>
#include <random>
#include <filesystem>
#include <chrono>
#include <thread>

Functions

int main ()

Detailed Description

[← Previous Example]

In FiberLib Tutorial

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <eagle/PhysicalSpace.hpp>
#include <fiber/bundle/StorageTransformations.hpp>
#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
#include <memcore/Console.hpp>
#include <random>
#include <filesystem>
#include <chrono>
#include <thread>
using namespace Fiber;
using namespace std;
using namespace Eagle::PhysicalSpace;
// ######################################################
// LOAD
//#######################################################
int main()
{
// IO Layer
Finit();
bool success;
Ref<LoaderParameters> LP( "GlobalRaster.f5" );
BundlePtr BP=new Bundle();
Bundle::load( success, LP,BP);
if (!success)
{
Console() << "Could not load File GlobalRaster.f5";
return 1;
}
RefPtr<Grid> G = BP[0.0]("GlobalRaster");
if (!G)
{
Console() << "No Grid";
return 1;
}
RefPtr<RegularlyFragmentedField<3> > Field4D = G("HeightField4D");
if (!Field4D)
{
Console() << "No Field4D";
return 1;
}
MultiIndex<3> FragIdxBroken = {352,153,0};
MultiIndex<3> FragIdxGood = {353,153,0};
const RefPtr<CreativeArrayBase>&CABBroken = Field4D[FragIdxBroken];
if (!CABBroken) Console() << "Cannot load broken frag " <<FragIdxBroken;
const RefPtr<CreativeArrayBase>&CABGood = Field4D[FragIdxGood];
if (!CABGood) Console() << "Cannot load good frag " <<CABGood;
return 0;
}
int main()
Demonstrates minimal usage of the FiberLib Create Bundle, insert a time slice, and safe it to a file.
Definition 010-SimpleSave.cpp:13
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
The main entity holding all information.
Definition Bundle.hpp:173
static RefPtr< Bundle > load(bool &success, const RefPtr< LoaderParameters > &ld, const RefPtr< Bundle > &B=nullptr)
Load a Bundle object or append new data to an existing Bundle.
Definition Bundle.cpp:139
A multidimensional index that is automatically a lower-dimensional index via recursion.
Definition MultiIndex.hpp:449
Definition Geodesics.cpp:10
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
STL namespace.