blob: b549a31cf34a24904041dcdf6124c8a180d1365a (
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
|
/*
* Copyright 2014, Blender Foundation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PTC_ABC_SIMDEBUG_H
#define PTC_ABC_SIMDEBUG_H
#include <Alembic/Abc/IObject.h>
#include <Alembic/Abc/OObject.h>
#include <Alembic/AbcGeom/Foundation.h>
#include "ptc_types.h"
#include "abc_reader.h"
#include "abc_writer.h"
extern "C" {
#include "BKE_effect.h"
}
namespace PTC {
class AbcSimDebugWriter : public AbcWriter {
public:
AbcSimDebugWriter(const std::string &name, SimDebugData *data);
~AbcSimDebugWriter();
void init_abc(Abc::OObject parent);
void write_sample();
private:
std::string m_name;
SimDebugData *m_data;
Abc::OObject m_object;
AbcGeom::OUInt32ArrayProperty m_prop_category_hash;
AbcGeom::OUInt32ArrayProperty m_prop_hash;
AbcGeom::OInt32ArrayProperty m_prop_type;
AbcGeom::OC3fArrayProperty m_prop_color;
AbcGeom::OV3fArrayProperty m_prop_v1;
AbcGeom::OV3fArrayProperty m_prop_v2;
};
class AbcSimDebugReader : public AbcReader {
public:
AbcSimDebugReader(SimDebugData *data);
~AbcSimDebugReader();
void init_abc(Abc::IObject object);
PTCReadSampleResult read_sample_abc(chrono_t time);
private:
SimDebugData *m_data;
Abc::IObject m_object;
AbcGeom::IUInt32ArrayProperty m_prop_category_hash;
AbcGeom::IUInt32ArrayProperty m_prop_hash;
AbcGeom::IInt32ArrayProperty m_prop_type;
AbcGeom::IC3fArrayProperty m_prop_color;
AbcGeom::IV3fArrayProperty m_prop_v1;
AbcGeom::IV3fArrayProperty m_prop_v2;
};
} /* namespace PTC */
#endif /* PTC_SIMDEBUG_H */
|