Pass EvaluationContext argument everywhere
[blender.git] / source / blender / alembic / intern / abc_hair.h
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * Contributor(s): Esteban Tovagliari, Cedric Paille, Kevin Dietrich
19  *
20  * ***** END GPL LICENSE BLOCK *****
21  */
22
23 #ifndef __ABC_HAIR_H__
24 #define __ABC_HAIR_H__
25
26 #include "abc_object.h"
27
28 struct DerivedMesh;
29 struct ParticleSettings;
30 struct ParticleSystem;
31
32 /* ************************************************************************** */
33
34 class AbcHairWriter : public AbcObjectWriter {
35         ParticleSystem *m_psys;
36
37         Alembic::AbcGeom::OCurvesSchema m_schema;
38         Alembic::AbcGeom::OCurvesSchema::Sample m_sample;
39
40         bool m_uv_warning_shown;
41
42 public:
43         AbcHairWriter(EvaluationContext *eval_ctx,
44                       Scene *scene,
45                       Object *ob,
46                       AbcTransformWriter *parent,
47                       uint32_t time_sampling,
48                       ExportSettings &settings,
49                       ParticleSystem *psys);
50
51 private:
52         virtual void do_write();
53
54         void write_hair_sample(DerivedMesh *dm,
55                                ParticleSettings *part,
56                                std::vector<Imath::V3f> &verts,
57                                std::vector<Imath::V3f> &norm_values,
58                                std::vector<Imath::V2f> &uv_values,
59                                std::vector<int32_t> &hvertices);
60
61         void write_hair_child_sample(DerivedMesh *dm,
62                                      ParticleSettings *part,
63                                      std::vector<Imath::V3f> &verts,
64                                      std::vector<Imath::V3f> &norm_values,
65                                      std::vector<Imath::V2f> &uv_values,
66                                      std::vector<int32_t> &hvertices);
67 };
68
69 #endif  /* __ABC_HAIR_H__ */