2 * ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
18 * Contributor(s): Esteban Tovagliari, Cedric Paille, Kevin Dietrich
20 * ***** END GPL LICENSE BLOCK *****
23 #ifndef __ABC_HAIR_H__
24 #define __ABC_HAIR_H__
26 #include "abc_object.h"
29 struct ParticleSettings;
30 struct ParticleSystem;
32 /* ************************************************************************** */
34 class AbcHairWriter : public AbcObjectWriter {
35 ParticleSystem *m_psys;
37 Alembic::AbcGeom::OCurvesSchema m_schema;
38 Alembic::AbcGeom::OCurvesSchema::Sample m_sample;
40 bool m_uv_warning_shown;
43 AbcHairWriter(Scene *scene,
45 AbcTransformWriter *parent,
46 uint32_t time_sampling,
47 ExportSettings &settings,
48 ParticleSystem *psys);
51 virtual void do_write();
53 void write_hair_sample(DerivedMesh *dm,
54 ParticleSettings *part,
55 std::vector<Imath::V3f> &verts,
56 std::vector<Imath::V3f> &norm_values,
57 std::vector<Imath::V2f> &uv_values,
58 std::vector<int32_t> &hvertices);
60 void write_hair_child_sample(DerivedMesh *dm,
61 ParticleSettings *part,
62 std::vector<Imath::V3f> &verts,
63 std::vector<Imath::V3f> &norm_values,
64 std::vector<Imath::V2f> &uv_values,
65 std::vector<int32_t> &hvertices);
68 #endif /* __ABC_HAIR_H__ */