Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mantaio.h « fileio « preprocessed « mantaflow « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fbfe4bdd5d41f2dc1efb33b989b2d2048bbb99ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83


// DO NOT EDIT !
// This file is generated using the MantaFlow preprocessor (prep generate).

/******************************************************************************
 *
 * MantaFlow fluid solver framework
 * Copyright 2011 Tobias Pfaff, Nils Thuerey
 *
 * This program is free software, distributed under the terms of the
 * Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Loading and writing grids and meshes to disk
 *
 ******************************************************************************/

#ifndef _FILEIO_H
#define _FILEIO_H

#include <string>

namespace Manta {

// forward decl.
class Mesh;
class FlagGrid;
template<class T> class Grid;
template<class T> class Grid4d;
class BasicParticleSystem;
template<class T> class ParticleDataImpl;
template<class T> class MeshDataImpl;

void writeObjFile(const std::string &name, Mesh *mesh);
void writeBobjFile(const std::string &name, Mesh *mesh);
void readObjFile(const std::string &name, Mesh *mesh, bool append);
void readBobjFile(const std::string &name, Mesh *mesh, bool append);

template<class T> void writeGridRaw(const std::string &name, Grid<T> *grid);
template<class T> void writeGridUni(const std::string &name, Grid<T> *grid);
template<class T> void writeGridVol(const std::string &name, Grid<T> *grid);
template<class T> void writeGridTxt(const std::string &name, Grid<T> *grid);

#if OPENVDB == 1
template<class T> void writeGridVDB(const std::string &name, Grid<T> *grid);
template<class T> void readGridVDB(const std::string &name, Grid<T> *grid);
#endif  // OPENVDB==1
template<class T> void writeGridNumpy(const std::string &name, Grid<T> *grid);
template<class T> void readGridNumpy(const std::string &name, Grid<T> *grid);

template<class T> void readGridUni(const std::string &name, Grid<T> *grid);
template<class T> void readGridRaw(const std::string &name, Grid<T> *grid);
template<class T> void readGridVol(const std::string &name, Grid<T> *grid);

template<class T> void writeGrid4dUni(const std::string &name, Grid4d<T> *grid);
template<class T>
void readGrid4dUni(const std::string &name,
                   Grid4d<T> *grid,
                   int readTslice = -1,
                   Grid4d<T> *slice = NULL,
                   void **fileHandle = NULL);
void readGrid4dUniCleanup(void **fileHandle);
template<class T> void writeGrid4dRaw(const std::string &name, Grid4d<T> *grid);
template<class T> void readGrid4dRaw(const std::string &name, Grid4d<T> *grid);

void writeParticlesUni(const std::string &name, const BasicParticleSystem *parts);
void readParticlesUni(const std::string &name, BasicParticleSystem *parts);

template<class T> void writePdataUni(const std::string &name, ParticleDataImpl<T> *pdata);
template<class T> void readPdataUni(const std::string &name, ParticleDataImpl<T> *pdata);

template<class T> void writeMdataUni(const std::string &name, MeshDataImpl<T> *mdata);
template<class T> void readMdataUni(const std::string &name, MeshDataImpl<T> *mdata);

void getUniFileSize(
    const std::string &name, int &x, int &y, int &z, int *t = NULL, std::string *info = NULL);

void *safeGzopen(const char *filename, const char *mode);

}  // namespace Manta

#endif