NDDEM
Public Member Functions | Public Attributes | List of all members
Texturing< d > Class Template Reference

Handles all the computation for the textures. More...

#include <Texturing.h>

Public Member Functions

int initialise (map< string, string > args)
 Loads all the data for the requested simulation in memory. More...
 
int clean ()
 Clean the data to get ready for another simulation rendering. More...
 
int set_grid (int nb)
 Set the grid in latitude-longitude. More...
 
void spaceloop (v1d View, uint tsint, int nrotate, int dim)
 Run all the rendering in the current location, at all timesteps. More...
 
void timeloop (v1d View, uint tsint, int nrotate)
 Run all the rendering for the curent timestep, for all other location in dimensions higher than 3D view (ie. 4th dim, 5dim etc), varying only 1 dimension at a time. More...
 
void hereandnow (v1d View, uint tsint, int nrotate)
 Render the current location at the current timestep. More...
 
int MasterRender ()
 Handle the rendering threads. More...
 
int SetNewViewPoint (map< string, string > args)
 Modify the current location and/or timestep en render. More...
 
bool isrendered ()
 Verify if the current location/timestep is already rendered. More...
 
void Render (vector< string > &filerendered, cv1d &View, int nrotate, int time, cv2d &X, cv1d &R, cv2d &A)
 Do the actual rendering of the textures. More...
 
int viewpermute (v1d &View)
 Rotate the viewpoint so that the rendered view is using the first 3 dimensions. Effectively unused since the visualisation only handles the rendring of the first 3 dimensions currently. More...
 
void rescale (v1f &c, cv1f sum)
 Coloring rescaling. More...
 
void filepathname (char *path, int n, int time, cv1d &View)
 Generates the proper texture name. More...
 
void filepathname (char *path, int time, cv1d &View)
 Generates the proper texture name. More...
 
int write_vtkmap (map< string, string > args)
 Outputs the texture as a vtk surface. More...
 
int write_colormap_vtk_base ()
 Output the colormap as a vtk volume. More...
 
int write_colormap_nrrd_base (map< string, string > args)
 Output the texture as an NRRD file. More...
 

Public Attributes

int Nlambda =32
 Resolution in latitude. More...
 
int Ntheta =32
 Resolution in longitude. More...
 
vector< vector< float > > colors
 Colors vector for the different dimensions. More...
 
const vector< vector< float > > allcolorslist
 Default colors. More...
 
const vector< vector< vector< float > > > allcolors
 Default colors. More...
 
v1d lambdagrid
 Pixel grid in latitude. More...
 
v1d thetagrid
 Pixel grid in longitude. More...
 
string BasePath = "../Samples/"
 Default directory for simulation results. More...
 
string DirectorySave = "../Textures/"
 Default directory for saving the resulting textures. More...
 
int N
 Number of grains. More...
 
v2d Boundaries
 List of boundaries. More...
 
vector< TimestepTs
 List of Timestep. More...
 
vector< int > TsName
 Actual integer timestep. More...
 
v1d R
 Particle radii. More...
 
v1d View
 Location of the rendering in the ND space. More...
 
vector< int > ViewPoint
 Current location&timestep for rendering. More...
 
vector< int > NewViewPoint
 Used if the location&timestep require a modification. Eventually transfered to ViewPoint when the rendering has been processed. More...
 
vector< int > RenderedAlready
 Keeps track of what location/timesteps have already been rendered and do not need to be recomputed. More...
 
bool runfast
 Render only the current location&timestep, not doing any additional rendering for caching purposes. More...
 
bool singlerendered
 Render a single location&timestep. More...
 
bool justloaded
 Keep track if no render happened yet (used for the 3D simulation) More...
 
int nrotate
 
vector< vector< string > > FileList
 Data file list. More...
 
vector< std::thread > Threads
 Rendering thread list. More...
 
const bool singlefiles = true
 

Detailed Description

template<int d>
class Texturing< d >

Handles all the computation for the textures.

Member Function Documentation

◆ rescale()

template<int d>
void Texturing< d >::rescale ( v1f c,
cv1f  sum 
)

Coloring rescaling.

Member Data Documentation

◆ allcolors

template<int d>
const vector<vector<vector<float> > > Texturing< d >::allcolors
Initial value:
= {
{{231./256., 37./256., 100./256.}},
{{1,1,0},{0,1,1}}}

Default colors.

◆ allcolorslist

template<int d>
const vector<vector<float> > Texturing< d >::allcolorslist
Initial value:
= {
{1,0,0},
{0,1,0},
{0,0,1},
{1,1,0},
{0,1,1},
{1,0,1}}

Default colors.

◆ BasePath

template<int d>
string Texturing< d >::BasePath = "../Samples/"

Default directory for simulation results.

◆ Boundaries

template<int d>
v2d Texturing< d >::Boundaries

List of boundaries.

◆ colors

template<int d>
vector<vector<float> > Texturing< d >::colors

Colors vector for the different dimensions.

◆ DirectorySave

template<int d>
string Texturing< d >::DirectorySave = "../Textures/"

Default directory for saving the resulting textures.

◆ FileList

template<int d>
vector<vector<string> > Texturing< d >::FileList

Data file list.

◆ justloaded

template<int d>
bool Texturing< d >::justloaded

Keep track if no render happened yet (used for the 3D simulation)

◆ lambdagrid

template<int d>
v1d Texturing< d >::lambdagrid

Pixel grid in latitude.

◆ N

template<int d>
int Texturing< d >::N

Number of grains.

◆ NewViewPoint

template<int d>
vector<int> Texturing< d >::NewViewPoint

Used if the location&timestep require a modification. Eventually transfered to ViewPoint when the rendering has been processed.

◆ Nlambda

template<int d>
int Texturing< d >::Nlambda =32

Resolution in latitude.

◆ nrotate

template<int d>
int Texturing< d >::nrotate
Deprecated:
used to keep track if the rendered view is not using the first 3 dimensions. Effectively not used currently as this feature is not implemented in the visualisation side.
Todo:
Implement in the visualisation the possible of rendering other dimensions than 1-2-3

◆ Ntheta

template<int d>
int Texturing< d >::Ntheta =32

Resolution in longitude.

◆ R

template<int d>
v1d Texturing< d >::R

Particle radii.

◆ RenderedAlready

template<int d>
vector<int> Texturing< d >::RenderedAlready

Keeps track of what location/timesteps have already been rendered and do not need to be recomputed.

◆ runfast

template<int d>
bool Texturing< d >::runfast

Render only the current location&timestep, not doing any additional rendering for caching purposes.

◆ singlefiles

template<int d>
const bool Texturing< d >::singlefiles = true
Deprecated:
Render the textures as a tilemap instead of individual files.
Todo:
implement tile rendering in the visualisation.

◆ singlerendered

template<int d>
bool Texturing< d >::singlerendered

Render a single location&timestep.

◆ thetagrid

template<int d>
v1d Texturing< d >::thetagrid

Pixel grid in longitude.

◆ Threads

template<int d>
vector<std::thread> Texturing< d >::Threads

Rendering thread list.

◆ Ts

template<int d>
vector<Timestep> Texturing< d >::Ts

List of Timestep.

◆ TsName

template<int d>
vector<int> Texturing< d >::TsName

Actual integer timestep.

◆ View

template<int d>
v1d Texturing< d >::View

Location of the rendering in the ND space.

◆ ViewPoint

template<int d>
vector<int> Texturing< d >::ViewPoint

Current location&timestep for rendering.


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